1 # Copyright (C) 1992 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Library General Public License for more details.
14 # You should have received a copy of the GNU Library General Public
15 # License along with the GNU C Library; see the file COPYING.LIB. If
16 # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17 # Cambridge, MA 02139, USA.
20 # Makefile for mmalloc directory
23 # Directory containing source files. Don't clean up the spacing,
24 # this exact string is matched for by the "configure" script.
29 exec_prefix = $(prefix)
31 bindir = $(exec_prefix)/bin
32 libdir = $(exec_prefix)/lib
34 datadir = $(prefix)/lib
35 mandir = $(prefix)/man
36 man1dir = $(mandir)/man1
37 man2dir = $(mandir)/man2
38 man3dir = $(mandir)/man3
39 man4dir = $(mandir)/man4
40 man5dir = $(mandir)/man5
41 man6dir = $(mandir)/man6
42 man7dir = $(mandir)/man7
43 man8dir = $(mandir)/man8
44 man9dir = $(mandir)/man9
45 infodir = $(prefix)/info
46 includedir = $(prefix)/include
47 docdir = $(datadir)/doc
52 INSTALL_PROGRAM = $(INSTALL)
53 INSTALL_DATA = $(INSTALL)
63 TARGETLIB = libmmalloc.a
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.
79 $(CC) -c $(CFLAGS) -I. -I$(srcdir)/../include $(HDEFINES) $<
81 # Do we want/need any config overrides?
84 STAGESTUFF = $(TARGETLIB) *.o
96 $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
97 $(RANLIB) $(libdir)/$(TARGETLIB).n
98 mv -f $(libdir)/$(TARGETLIB).n $(libdir)/$(TARGETLIB)
100 $(TARGETLIB): $(OFILES)
102 $(AR) $(AR_FLAGS) $@ $(OFILES)
105 $(OFILES) : $(HFILES)
110 .PHONEY: all etags tags ls clean stage1 stage2 .always.
114 -mv -f $(STAGESTUFF) stage1
118 -mv -f $(STAGESTUFF) stage2
122 -mv -f $(STAGESTUFF) stage3
126 -mv -f $(STAGESTUFF) stage4
131 for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done
134 -(cd stage1 ; mv -f * ..)
138 -(cd stage2 ; mv -f * ..)
142 -(cd stage3 ; mv -f * ..)
146 -(cd stage4 ; mv -f * ..)
152 etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done`
155 @echo Makefile $(HFILES) $(CFILES)
157 # Need to deal with profiled libraries, too.
160 rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors
162 distclean realclean: clean
164 rm -f Makefile depend
168 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) \
169 $(target_makefile_frag)
170 $(SHELL) ./config.status