2004-11-04 Kei Sakamoto <sakamoto.kei@denesas.com>
[deliverable/binutils-gdb.git] / mmalloc / Makefile.in
CommitLineData
c906108c
SS
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
26VPATH = @srcdir@
27srcdir = @srcdir@
28
29prefix = @prefix@
30exec_prefix = @exec_prefix@
31
32bindir = @bindir@
33libdir = @libdir@
34
35datadir = @datadir@
36mandir = @mandir@
37man1dir = $(mandir)/man1
38man2dir = $(mandir)/man2
39man3dir = $(mandir)/man3
40man4dir = $(mandir)/man4
41man5dir = $(mandir)/man5
42man6dir = $(mandir)/man6
43man7dir = $(mandir)/man7
44man8dir = $(mandir)/man8
45man9dir = $(mandir)/man9
46infodir = @infodir@
47includedir = @includedir@
48
49SHELL = @SHELL@
50
51INSTALL = @INSTALL@
52INSTALL_PROGRAM=@INSTALL_PROGRAM@
53INSTALL_DATA = @INSTALL_DATA@
54
55AR = @AR@
56AR_FLAGS = qv
57CFLAGS = -g
58MAKEINFO = makeinfo
59RANLIB = @RANLIB@
60RM = rm
61
62# where to find makeinfo
63MAKEINFO=makeinfo
64
65SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$$TEXINPUTS
66
f1d78672
EZ
67# Files which should be generated via 'info' and installed by 'install-info'
68INFO_DEPS = mmalloc.info
69
c906108c
SS
70# The TeX formatter
71TEX = tex
72
73TARGETLIB = libmmalloc.a
74
75CFILES = 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
79HFILES = mmalloc.h
80
81OFILES = 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
85DEFS = @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)
90TARGETOBJS = 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
98STAGESTUFF = $(TARGETLIB) *.o
99
90254e4a 100all: $(TARGETLIB)
c906108c 101
f1d78672 102info: $(INFO_DEPS)
c906108c
SS
103dvi: mmalloc.dvi
104clean-info:
105installcheck:
106
107mmalloc.info: mmalloc.texi
108 $(MAKEINFO) -I $(srcdir) -o ./mmalloc.info mmalloc.texi
109
110# This file doesn't need texindex currently.
111mmalloc.dvi: mmalloc.texi
112 $(SET_TEXINPUTS) $(TEX) mmalloc.texi
113 rm -f mmalloc.?? mmalloc.??s mmalloc.log mmalloc.aux mmalloc.toc
114
115install-info: info
c938e9b0 116 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(infodir)
f1d78672
EZ
117 @list='$(INFO_DEPS)'; \
118 for file in $$list; do \
119 if test -f $$file; then d=.; else d=$(srcdir); fi; \
120 for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
121 if test -f $$d/$$ifile; then \
122 echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
123 $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
124 else : ; fi; \
125 done; \
126 done
127 $(POST_INSTALL)
d3229ae3 128 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
f1d78672
EZ
129 list='$(INFO_DEPS)'; \
130 for file in $$list; do \
131 echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
132 install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
133 done; \
d3229ae3 134 else : ; fi
c906108c 135
f1d78672
EZ
136uninstall-info:
137 $(PRE_UNINSTALL)
138 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
139 ii=yes; \
140 else ii=; fi; \
141 list='$(INFO_DEPS)'; \
142 for file in $$list; do \
143 test -z "$$ii" \
144 || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
145 done
146 $(NORMAL_UNINSTALL)
147 list='$(INFO_DEPS)'; \
148 for file in $$list; do \
149 (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
150 done
151
c906108c
SS
152check: test1.c
153# $(CC) -g $(srcdir)/test1.c libmmalloc.a
154# This loses for Canadian cross (building mmalloc with a cross-compiler).
155# There is probably some dejagnu-ish solution (such as what we are doing
156# for gdb, perhaps).
157# ./a.out
158
90254e4a 159install: all install-info
c938e9b0
L
160 $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libdir)
161 $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(TARGETLIB)n
162 $(RANLIB) $(DESTDIR)$(libdir)/$(TARGETLIB)n
163 mv -f $(DESTDIR)$(libdir)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(TARGETLIB)
c906108c 164
f1d78672
EZ
165uninstall: uninstall-info
166
c906108c
SS
167$(TARGETLIB): $(TARGETOBJS)
168 $(RM) -rf $@
169 $(AR) $(AR_FLAGS) $@ $(TARGETOBJS)
170 $(RANLIB) $@
171
172$(OFILES) : $(HFILES) Makefile
173
174mm.o: $(HFILES) $(CFILES)
175 $(CC) -c $(CFLAGS) $(DEFS) -I. -I$(srcdir)/../include $(srcdir)/mm.c
176
177.always.:
178# Do nothing.
179
180.PHONEY: all etags tags ls clean stage1 stage2 .always.
181
182stage1: force
183 -mkdir stage1
184 -mv -f $(STAGESTUFF) stage1
185
186stage2: force
187 -mkdir stage2
188 -mv -f $(STAGESTUFF) stage2
189
190stage3: force
191 -mkdir stage3
192 -mv -f $(STAGESTUFF) stage3
193
194stage4: force
195 -mkdir stage4
196 -mv -f $(STAGESTUFF) stage4
197
198against=stage2
199
200comparison: force
201 for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done
202
203de-stage1: force
204 -(cd stage1 ; mv -f * ..)
205 -rmdir stage1
206
207de-stage2: force
208 -(cd stage2 ; mv -f * ..)
209 -rmdir stage2
210
211de-stage3: force
212 -(cd stage3 ; mv -f * ..)
213 -rmdir stage3
214
215de-stage4: force
216 -(cd stage4 ; mv -f * ..)
217 -rmdir stage4
218
219etags tags: TAGS
220
221TAGS: $(CFILES)
222 etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done`
223
224ls:
225 @echo Makefile $(HFILES) $(CFILES)
226
227# Need to deal with profiled libraries, too.
228
229mostlyclean clean:
230 rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors
231
232distclean: clean
233 rm -f config.cache config.log config.status
234 rm -f Makefile depend
235
236maintainer-clean realclean: distclean clean
237 @echo "This command is intended for maintainers to use;"
238 @echo "it deletes files that may require special tools to rebuild."
239 rm -f mmalloc.info
240
241force:
242
243Makefile: Makefile.in config.status
244 $(SHELL) config.status
245
246config.status: configure
247 $(SHELL) config.status --recheck
This page took 0.240431 seconds and 4 git commands to generate.