3 # Copyright (C) 1992 Cygnus Support
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
21 # Makefile for mmalloc directory
24 # Directory containing source files. Don't clean up the spacing,
25 # this exact string is matched for by the "configure" script.
30 bindir = $(prefix)/bin
31 datadir = $(prefix)/lib
32 libdir = $(prefix)/lib
33 mandir = $(datadir)/man
34 man1dir = $(mandir)/man1
35 man2dir = $(mandir)/man2
36 man3dir = $(mandir)/man3
37 man4dir = $(mandir)/man4
38 man5dir = $(mandir)/man5
39 man6dir = $(mandir)/man6
40 man7dir = $(mandir)/man7
41 man8dir = $(mandir)/man8
42 man9dir = $(mandir)/man9
43 infodir = $(datadir)/info
44 includedir = $(prefix)/include
45 docdir
= $(datadir)/doc
50 INSTALL_PROGRAM
= $(INSTALL
)
51 INSTALL_DATA
= $(INSTALL
)
60 TARGETLIB
= libmmalloc.a
63 CFLAGS
= $(MINUS_G
) -I.
-I
$(srcdir)/..
/include $(HDEFINES
)
65 CFILES
= mcalloc.c mfree.c mmalloc.c mmcheck.c mmemalign.c mmstats.c \
66 mmtrace.c mrealloc.c mvalloc.c mmap-sup.c attach.c detach.c \
71 OFILES
= mcalloc.o mfree.o mmalloc.o mmcheck.o mmemalign.o mmstats.o \
72 mmtrace.o mrealloc.o mvalloc.o mmap-sup.o attach.o detach.o \
75 #### Host, target, and site specific Makefile fragments come in here.
78 # Do we want/need any config overrides?
81 STAGESTUFF
= $(TARGETLIB
) *.o
86 $(INSTALL_DATA
) $(TARGETLIB
) $(libdir)/$(TARGETLIB
).n
87 $(RANLIB
) $(libdir)/$(TARGETLIB
).n
88 mv
-f
$(libdir)/$(TARGETLIB
).n
$(libdir)/$(TARGETLIB
)
90 $(TARGETLIB
): $(OFILES
)
92 $(AR
) $(AR_FLAGS
) $@
$(OFILES
)
100 .PHONEY
: all etags
tags ls
clean stage1 stage2 .always.
104 -mv
-f
$(STAGESTUFF
) stage1
108 -mv
-f
$(STAGESTUFF
) stage2
112 -mv
-f
$(STAGESTUFF
) stage3
116 -mv
-f
$(STAGESTUFF
) stage4
121 for i in
*.o
; do cmp
$$i $(against
)/$$i || exit
1 ; done
124 -(cd stage1
; mv
-f
* ..
)
128 -(cd stage2
; mv
-f
* ..
)
132 -(cd stage3
; mv
-f
* ..
)
136 -(cd stage4
; mv
-f
* ..
)
142 etags
$(HFILES
) $(CFILES
)
145 @echo Makefile
$(HFILES
) $(CFILES
)
147 # Need to deal with profiled libraries, too.
150 rm -f
*.a
*.o core errs
*~ \
#* TAGS *.E a.out errors
154 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) \
155 $(target_makefile_frag
)
156 $(SHELL
) .
/config.status