* Makefile.tpl (configure-target-rda): Depend on $(ALL_GCC_C).
[deliverable/binutils-gdb.git] / mmalloc / Makefile.in
1 # Copyright (C) 1992 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
3
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.
8
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.
13
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., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
18
19 #
20 # Makefile for mmalloc directory
21 #
22
23 # Directory containing source files. Don't clean up the spacing,
24 # this exact string is matched for by the "configure" script.
25
26 VPATH = @srcdir@
27 srcdir = @srcdir@
28
29 prefix = @prefix@
30 exec_prefix = @exec_prefix@
31
32 bindir = @bindir@
33 libdir = @libdir@
34
35 datadir = @datadir@
36 mandir = @mandir@
37 man1dir = $(mandir)/man1
38 man2dir = $(mandir)/man2
39 man3dir = $(mandir)/man3
40 man4dir = $(mandir)/man4
41 man5dir = $(mandir)/man5
42 man6dir = $(mandir)/man6
43 man7dir = $(mandir)/man7
44 man8dir = $(mandir)/man8
45 man9dir = $(mandir)/man9
46 infodir = @infodir@
47 includedir = @includedir@
48
49 SHELL = @SHELL@
50
51 INSTALL = @INSTALL@
52 INSTALL_PROGRAM=@INSTALL_PROGRAM@
53 INSTALL_DATA = @INSTALL_DATA@
54
55 AR = @AR@
56 AR_FLAGS = qv
57 CFLAGS = -g
58 MAKEINFO = makeinfo
59 RANLIB = @RANLIB@
60 RM = rm
61
62 # where to find makeinfo
63 MAKEINFO=makeinfo
64
65 SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$$TEXINPUTS
66
67 # Files which should be generated via 'info' and installed by 'install-info'
68 INFO_DEPS = mmalloc.info
69
70 # The TeX formatter
71 TEX = tex
72
73 TARGETLIB = libmmalloc.a
74
75 CFILES = mcalloc.c mfree.c mmalloc.c mmcheck.c mmemalign.c mmstats.c \
76 mmtrace.c mrealloc.c mvalloc.c mmap-sup.c attach.c detach.c \
77 keys.c sbrk-sup.c mm.c
78
79 HFILES = mmalloc.h
80
81 OFILES = mcalloc.o mfree.o mmalloc.o mmcheck.o mmemalign.o mmstats.o \
82 mmtrace.o mrealloc.o mvalloc.o mmap-sup.o attach.o detach.o \
83 keys.o sbrk-sup.o
84
85 DEFS = @DEFS@
86
87 # The current default is to build a single object module with all the mmalloc
88 # functions. To build a more traditional library, flip this macro definition.
89 #TARGETOBJS = $(OFILES)
90 TARGETOBJS = mm.o
91
92 .c.o:
93 $(CC) -c $(CFLAGS) $(DEFS) -I. -I$(srcdir)/../include $<
94
95 # Do we want/need any config overrides?
96 #
97
98 STAGESTUFF = $(TARGETLIB) *.o
99
100 all: $(TARGETLIB)
101
102 info: $(INFO_DEPS)
103 dvi: mmalloc.dvi
104 clean-info:
105 installcheck:
106
107 mmalloc.info: mmalloc.texi
108 $(MAKEINFO) -I $(srcdir) -o ./mmalloc.info mmalloc.texi
109
110 # This file doesn't need texindex currently.
111 mmalloc.dvi: mmalloc.texi
112 $(SET_TEXINPUTS) $(TEX) mmalloc.texi
113 rm -f mmalloc.?? mmalloc.??s mmalloc.log mmalloc.aux mmalloc.toc
114
115 install-info: info
116 @list='$(INFO_DEPS)'; \
117 for file in $$list; do \
118 if test -f $$file; then d=.; else d=$(srcdir); fi; \
119 for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
120 if test -f $$d/$$ifile; then \
121 echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
122 $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
123 else : ; fi; \
124 done; \
125 done
126 $(POST_INSTALL)
127 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
128 list='$(INFO_DEPS)'; \
129 for file in $$list; do \
130 echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
131 install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
132 done; \
133 else : ; fi
134
135 uninstall-info:
136 $(PRE_UNINSTALL)
137 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
138 ii=yes; \
139 else ii=; fi; \
140 list='$(INFO_DEPS)'; \
141 for file in $$list; do \
142 test -z "$$ii" \
143 || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
144 done
145 $(NORMAL_UNINSTALL)
146 list='$(INFO_DEPS)'; \
147 for file in $$list; do \
148 (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
149 done
150
151 check: test1.c
152 # $(CC) -g $(srcdir)/test1.c libmmalloc.a
153 # This loses for Canadian cross (building mmalloc with a cross-compiler).
154 # There is probably some dejagnu-ish solution (such as what we are doing
155 # for gdb, perhaps).
156 # ./a.out
157
158 install: all install-info
159 $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB)n
160 $(RANLIB) $(libdir)/$(TARGETLIB)n
161 mv -f $(libdir)/$(TARGETLIB)n $(libdir)/$(TARGETLIB)
162
163 uninstall: uninstall-info
164
165 $(TARGETLIB): $(TARGETOBJS)
166 $(RM) -rf $@
167 $(AR) $(AR_FLAGS) $@ $(TARGETOBJS)
168 $(RANLIB) $@
169
170 $(OFILES) : $(HFILES) Makefile
171
172 mm.o: $(HFILES) $(CFILES)
173 $(CC) -c $(CFLAGS) $(DEFS) -I. -I$(srcdir)/../include $(srcdir)/mm.c
174
175 .always.:
176 # Do nothing.
177
178 .PHONEY: all etags tags ls clean stage1 stage2 .always.
179
180 stage1: force
181 -mkdir stage1
182 -mv -f $(STAGESTUFF) stage1
183
184 stage2: force
185 -mkdir stage2
186 -mv -f $(STAGESTUFF) stage2
187
188 stage3: force
189 -mkdir stage3
190 -mv -f $(STAGESTUFF) stage3
191
192 stage4: force
193 -mkdir stage4
194 -mv -f $(STAGESTUFF) stage4
195
196 against=stage2
197
198 comparison: force
199 for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done
200
201 de-stage1: force
202 -(cd stage1 ; mv -f * ..)
203 -rmdir stage1
204
205 de-stage2: force
206 -(cd stage2 ; mv -f * ..)
207 -rmdir stage2
208
209 de-stage3: force
210 -(cd stage3 ; mv -f * ..)
211 -rmdir stage3
212
213 de-stage4: force
214 -(cd stage4 ; mv -f * ..)
215 -rmdir stage4
216
217 etags tags: TAGS
218
219 TAGS: $(CFILES)
220 etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done`
221
222 ls:
223 @echo Makefile $(HFILES) $(CFILES)
224
225 # Need to deal with profiled libraries, too.
226
227 mostlyclean clean:
228 rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors
229
230 distclean: clean
231 rm -f config.cache config.log config.status
232 rm -f Makefile depend
233
234 maintainer-clean realclean: distclean clean
235 @echo "This command is intended for maintainers to use;"
236 @echo "it deletes files that may require special tools to rebuild."
237 rm -f mmalloc.info
238
239 force:
240
241 Makefile: Makefile.in config.status
242 $(SHELL) config.status
243
244 config.status: configure
245 $(SHELL) config.status --recheck
This page took 0.034 seconds and 4 git commands to generate.