source: trunk/src/gcc/libiberty/Makefile.in@ 3

Last change on this file since 3 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 15.6 KB
Line 
1#
2# Makefile
3# Copyright (C) 1990, 91-99, 2000, 2001, 2003
4# Free Software Foundation
5#
6# This file is part of the libiberty library.
7# Libiberty is free software; you can redistribute it and/or
8# modify it under the terms of the GNU Library General Public
9# License as published by the Free Software Foundation; either
10# version 2 of the License, or (at your option) any later version.
11#
12# Libiberty is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15# Library General Public License for more details.
16#
17# You should have received a copy of the GNU Library General Public
18# License along with libiberty; see the file COPYING.LIB. If not,
19# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20# Boston, MA 02111-1307, USA.
21#
22
23# This file was written by K. Richard Pixley <rich@cygnus.com>.
24
25#
26# Makefile for libiberty directory
27#
28
29libiberty_topdir = @libiberty_topdir@
30srcdir = @srcdir@
31VPATH = @srcdir@
32
33prefix = @prefix@
34
35exec_prefix = @exec_prefix@
36bindir = @bindir@
37libdir = @libdir@
38
39SHELL = @SHELL@
40
41# Multilib support variables.
42MULTISRCTOP =
43MULTIBUILDTOP =
44MULTIDIRS =
45MULTISUBDIR =
46MULTIDO = true
47MULTICLEAN = true
48
49INSTALL = @INSTALL@
50INSTALL_PROGRAM = @INSTALL_PROGRAM@
51INSTALL_DATA = @INSTALL_DATA@
52mkinstalldirs = $(SHELL) $(libiberty_topdir)/mkinstalldirs
53
54AR = @AR@
55AR_FLAGS = rc
56
57CC = @CC@
58CFLAGS = @CFLAGS@
59LIBCFLAGS = $(CFLAGS)
60RANLIB = @RANLIB@
61MAKEINFO = @MAKEINFO@
62PERL = @PERL@
63
64PICFLAG =
65
66MAKEOVERRIDES =
67
68TARGETLIB = libiberty.a
69TESTLIB = testlib.a
70
71LIBOBJS = @LIBOBJS@
72
73# A configuration can specify extra .o files that should be included,
74# even if they are in libc. (Perhaps the libc version is buggy.)
75EXTRA_OFILES =
76
77# Flags to pass to a recursive make.
78FLAGS_TO_PASS = \
79 "AR=$(AR)" \
80 "AR_FLAGS=$(AR_FLAGS)" \
81 "CC=$(CC)" \
82 "CFLAGS=$(CFLAGS)" \
83 "DESTDIR=$(DESTDIR)" \
84 "LIBCFLAGS=$(LIBCFLAGS)" \
85 "EXTRA_OFILES=$(EXTRA_OFILES)" \
86 "HDEFINES=$(HDEFINES)" \
87 "INSTALL=$(INSTALL)" \
88 "INSTALL_DATA=$(INSTALL_DATA)" \
89 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
90 "LDFLAGS=$(LDFLAGS)" \
91 "LOADLIBES=$(LOADLIBES)" \
92 "RANLIB=$(RANLIB)" \
93 "SHELL=$(SHELL)" \
94 "prefix=$(prefix)" \
95 "exec_prefix=$(exec_prefix)" \
96 "libdir=$(libdir)" \
97 "libsubdir=$(libsubdir)" \
98 "tooldir=$(tooldir)"
99
100# Subdirectories to recurse into. We need to override this during cleaning
101SUBDIRS = testsuite
102
103# FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
104all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
105 @: $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
106
107.PHONY: check installcheck
108check: check-subdir
109installcheck: installcheck-subdir
110
111@host_makefile_frag@
112
113INCDIR=$(srcdir)/$(MULTISRCTOP)../include
114
115COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
116.c.o:
117 if [ x"$(PICFLAG)" != x ]; then \
118 $(COMPILE.c) $(PICFLAG) $< -o pic/$@; \
119 else true; fi
120 $(COMPILE.c) $<
121
122# NOTE: If you add new files to the library, add them to this list
123# (alphabetical), and add them to REQUIRED_OFILES, or
124# CONFIGURED_OFILES and funcs in configure.in.
125CFILES = alloca.c argv.c asprintf.c atexit.c \
126 basename.c bcmp.c bcopy.c bsearch.c bzero.c \
127 calloc.c choose-temp.c clock.c concat.c cp-demangle.c \
128 cplus-dem.c \
129 dyn-string.c \
130 fdmatch.c ffs.c fibheap.c floatformat.c fnmatch.c \
131 getcwd.c getopt.c getopt1.c getpagesize.c getpwd.c getruntime.c \
132 hashtab.c hex.c \
133 index.c insque.c \
134 lbasename.c \
135 make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c \
136 memset.c mkstemps.c \
137 objalloc.c obstack.c \
138 partition.c pexecute.c putenv.c \
139 random.c regex.c rename.c rindex.c \
140 safe-ctype.c setenv.c sigsetmask.c sort.c spaces.c \
141 splay-tree.c strcasecmp.c strchr.c strdup.c strerror.c \
142 strncasecmp.c strncmp.c strrchr.c strsignal.c strstr.c \
143 strtod.c strtol.c strtoul.c \
144 ternary.c tmpnam.c \
145 vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c \
146 waitpid.c \
147 xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
148
149# These are always included in the library. The first four are listed
150# first and by compile time to optimize parallel builds.
151REQUIRED_OFILES = regex.o cplus-dem.o cp-demangle.o md5.o \
152 alloca.o argv.o \
153 choose-temp.o concat.o \
154 dyn-string.o \
155 fdmatch.o fibheap.o floatformat.o fnmatch.o \
156 getopt.o getopt1.o getpwd.o getruntime.o \
157 hashtab.o hex.o \
158 lbasename.o \
159 make-temp-file.o \
160 objalloc.o obstack.o \
161 partition.o pexecute.o \
162 safe-ctype.o sort.o spaces.o splay-tree.o strerror.o \
163 strsignal.o \
164 ternary.o \
165 xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o
166
167# These are all the objects that configure may add to the library via
168# $funcs or EXTRA_OFILES. This list exists here only for "make
169# maint-missing" and "make check".
170CONFIGURED_OFILES = asprintf.o atexit.o \
171 basename.o bcmp.o bcopy.o bsearch.o bzero.o \
172 calloc.o clock.o copysign.o \
173 _doprnt.o \
174 ffs.o \
175 getcwd.o getpagesize.o \
176 index.o insque.o \
177 memchr.o memcmp.o memcpy.o memmove.o memset.o mkstemps.o \
178 putenv.o \
179 random.o rename.o rindex.o \
180 setenv.o sigsetmask.o strcasecmp.o strchr.o strdup.o \
181 strncasecmp.o strncmp.o strrchr.o strstr.o strtod.o strtol.o \
182 strtoul.o \
183 tmpnam.o \
184 vasprintf.o vfork.o vfprintf.o vprintf.o vsprintf.o \
185 waitpid.o
186
187$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
188 -rm -f $(TARGETLIB) pic/$(TARGETLIB)
189 $(AR) $(AR_FLAGS) $(TARGETLIB) \
190 $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
191 $(RANLIB) $(TARGETLIB)
192 if [ x"$(PICFLAG)" != x ]; then \
193 cd pic; \
194 $(AR) $(AR_FLAGS) $(TARGETLIB) \
195 $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
196 $(RANLIB) $(TARGETLIB); \
197 cd ..; \
198 else true; fi
199
200$(TESTLIB): $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
201 -rm -f $(TESTLIB)
202 $(AR) $(AR_FLAGS) $(TESTLIB) \
203 $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
204 $(RANLIB) $(TESTLIB)
205
206info: libiberty.info info-subdir
207install-info: install-info-subdir
208clean-info: clean-info-subdir
209dvi: libiberty.dvi dvi-subdir
210html: libiberty.html
211
212TEXISRC = \
213 $(srcdir)/libiberty.texi \
214 $(srcdir)/copying-lib.texi \
215 $(srcdir)/obstacks.texi \
216 $(srcdir)/functions.texi
217
218# Additional files that have texi snippets that need to be collected
219# and sorted. Some are here because the sources are imported from
220# elsewhere. Others represent headers in ../include.
221TEXIFILES = fnmatch.txh
222
223libiberty.info : $(srcdir)/libiberty.texi $(TEXISRC)
224 $(MAKEINFO) -I$(srcdir) $(srcdir)/libiberty.texi
225
226libiberty.dvi : $(srcdir)/libiberty.texi $(TEXISRC)
227 texi2dvi $(srcdir)/libiberty.texi
228
229libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
230 $(MAKEINFO) --html -I$(srcdir) $(srcdir)/libiberty.texi
231
232@MAINT@$(srcdir)/functions.texi : stamp-functions
233@MAINT@ @true
234
235@MAINT@stamp-functions : $(CFILES) $(TEXIFILES) $(srcdir)/gather-docs Makefile
236@MAINT@@HAVE_PERL@ $(PERL) $(srcdir)/gather-docs $(srcdir) $(srcdir)/functions.texi $(CFILES) $(TEXIFILES)
237@MAINT@ echo stamp > stamp-functions
238
239INSTALL_DEST = @INSTALL_DEST@
240install: install_to_$(INSTALL_DEST) install-subdir
241
242install_to_libdir: all
243 $(mkinstalldirs) $(DESTDIR)$(libdir)$(MULTISUBDIR)
244 $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
245 ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) && \
246 $(RANLIB) $(TARGETLIB)n && \
247 mv -f $(TARGETLIB)n $(TARGETLIB) )
248 @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
249
250install_to_tooldir: all
251 $(mkinstalldirs) $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`
252 $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n
253 ( cd $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory` && \
254 $(RANLIB) $(TARGETLIB)n && \
255 mv -f $(TARGETLIB)n $(TARGETLIB) )
256 @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
257
258# needed-list is used by libstdc++. NEEDED is the list of functions
259# to include there. Do not add anything LGPL to this list; libstdc++
260# can't use anything encumbering.
261NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
262 strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
263 vfork waitpid bcmp bcopy bzero
264needed-list: Makefile
265 rm -f needed-list; touch needed-list; \
266 for f in $(NEEDED); do \
267 for g in $(LIBOBJS) $(EXTRA_OFILES); do \
268 case "$$g" in \
269 *$$f*) echo $$g >> needed-list ;; \
270 esac; \
271 done; \
272 done
273
274# required-list was used when building a shared bfd/opcodes/libiberty
275# library. I don't know if it used by anything currently.
276required-list: Makefile
277 echo $(REQUIRED_OFILES) > required-list
278
279stamp-picdir:
280 if [ x"$(PICFLAG)" != x ] && [ ! -d pic ]; then \
281 mkdir pic; \
282 else true; fi
283 touch stamp-picdir
284
285.PHONY: all etags tags ls clean stage1 stage2
286
287etags tags: TAGS etags-subdir
288
289TAGS: $(CFILES)
290 etags `for i in $(CFILES); do echo $(srcdir)/$$i ; done`
291
292# The standalone demangler (c++filt) has been moved to binutils.
293demangle:
294 @echo "The standalone demangler, now named c++filt, is now"
295 @echo "a part of binutils."
296 @false
297
298ls:
299 @echo Makefile $(CFILES)
300
301# Various targets for maintainers.
302
303maint-missing :
304 @$(PERL) $(srcdir)/maint-tool -s $(srcdir) missing $(CFILES) $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
305
306maint-buildall : $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
307 @true
308
309maint-undoc : $(srcdir)/functions.texi
310 @$(PERL) $(srcdir)/maint-tool -s $(srcdir) undoc
311
312maint-deps :
313 @$(PERL) $(srcdir)/maint-tool -s $(srcdir) deps $(INCDIR)
314
315# Need to deal with profiled libraries, too.
316
317# Cleaning has to be done carefully to ensure that we don't clean our SUBDIRS
318# multiple times, hence our explicit recursion with an empty SUBDIRS.
319mostlyclean: mostlyclean-subdir
320 -rm -rf *.o pic core errs \#* *.E a.out
321 -rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
322 -rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
323 -rm -f libiberty.aux libiberty.cp libiberty.cps libiberty.fn libiberty.ky
324 -rm -f libiberty.log libiberty.tmp libiberty.tps libiberty.pg
325 -rm -f libiberty.pgs libiberty.toc libiberty.tp libiberty.tpl libiberty.vr
326 -rm -f libtexi.stamp
327 @$(MULTICLEAN) multi-clean DO=mostlyclean
328clean: clean-subdir
329 $(MAKE) SUBDIRS="" mostlyclean
330 -rm -f *.a required-list tmpmulti.out
331 -rm -f libiberty.dvi libiberty.info* libiberty.html
332 @$(MULTICLEAN) multi-clean DO=clean
333distclean: distclean-subdir
334 $(MAKE) SUBDIRS="" clean
335 @$(MULTICLEAN) multi-clean DO=distclean
336 -rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out
337 -rm -f config.log
338 -rmdir testsuite 2>/dev/null
339maintainer-clean realclean: maintainer-clean-subdir
340 $(MAKE) SUBDIRS="" distclean
341
342force:
343
344Makefile: $(srcdir)/Makefile.in config.status
345 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
346
347# Depending on Makefile makes sure that config.status has been re-run
348# if needed. This prevents problems with parallel builds.
349config.h: stamp-h ; @true
350stamp-h: config.in config.status Makefile
351 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
352
353config.status: $(srcdir)/configure $(srcdir)/config.table
354 $(SHELL) ./config.status --recheck
355
356# Depending on config.h makes sure that config.status has been re-run
357# if needed. This prevents problems with parallel builds, in case
358# subdirectories need to run config.status also.
359all-subdir check-subdir installcheck-subdir info-subdir \
360install-info-subdir clean-info-subdir dvi-subdir install-subdir \
361etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \
362maintainer-clean-subdir: config.h
363 @subdirs='$(SUBDIRS)'; \
364 target=`echo $@ | sed -e 's/-subdir//'`; \
365 for dir in $$subdirs ; do \
366 cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $$target; \
367 done
368
369$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS): stamp-picdir
370$(CONFIGURED_OFILES): stamp-picdir
371
372# The dependencies in the remainder of this file are automatically
373# generated by "make maint-deps". Manual edits will be lost.
374
375_doprnt.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
376alloca.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
377argv.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
378asprintf.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
379atexit.o: config.h
380basename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
381 $(INCDIR)/safe-ctype.h
382bsearch.o: config.h $(INCDIR)/ansidecl.h
383calloc.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
384choose-temp.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
385clock.o: config.h
386concat.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
387copysign.o: $(INCDIR)/ansidecl.h
388cp-demangle.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
389 $(INCDIR)/dyn-string.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h
390cplus-dem.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
391 $(INCDIR)/getopt.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
392dyn-string.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/dyn-string.h \
393 $(INCDIR)/libiberty.h
394fdmatch.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
395fibheap.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/fibheap.h \
396 $(INCDIR)/libiberty.h
397floatformat.o: $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h
398fnmatch.o: config.h $(INCDIR)/fnmatch.h $(INCDIR)/safe-ctype.h
399getcwd.o: config.h
400getopt.o: config.h $(INCDIR)/getopt.h
401getopt1.o: config.h $(INCDIR)/getopt.h
402getpagesize.o: config.h
403getpwd.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
404getruntime.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
405hashtab.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/hashtab.h \
406 $(INCDIR)/libiberty.h
407hex.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
408lbasename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
409 $(INCDIR)/safe-ctype.h
410make-temp-file.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
411md5.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
412memchr.o: $(INCDIR)/ansidecl.h
413memcmp.o: $(INCDIR)/ansidecl.h
414memcpy.o: $(INCDIR)/ansidecl.h
415memmove.o: $(INCDIR)/ansidecl.h
416memset.o: $(INCDIR)/ansidecl.h
417mkstemps.o: config.h $(INCDIR)/ansidecl.h
418objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h
419obstack.o: config.h $(INCDIR)/obstack.h
420partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
421 $(INCDIR)/partition.h
422pexecute.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
423 $(INCDIR)/safe-ctype.h
424putenv.o: config.h $(INCDIR)/ansidecl.h
425random.o: $(INCDIR)/ansidecl.h
426regex.o: config.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
427rename.o: config.h
428safe-ctype.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
429setenv.o: config.h $(INCDIR)/ansidecl.h
430sigsetmask.o: $(INCDIR)/ansidecl.h
431sort.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
432 $(INCDIR)/sort.h
433spaces.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
434splay-tree.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
435 $(INCDIR)/splay-tree.h
436strcasecmp.o: $(INCDIR)/ansidecl.h
437strchr.o: $(INCDIR)/ansidecl.h
438strerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
439strncasecmp.o: $(INCDIR)/ansidecl.h
440strncmp.o: $(INCDIR)/ansidecl.h
441strrchr.o: $(INCDIR)/ansidecl.h
442strsignal.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
443strtod.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
444strtol.o: config.h $(INCDIR)/safe-ctype.h
445strtoul.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
446ternary.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
447 $(INCDIR)/ternary.h
448vasprintf.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
449vfork.o: $(INCDIR)/ansidecl.h
450vprintf.o: $(INCDIR)/ansidecl.h
451vsprintf.o: $(INCDIR)/ansidecl.h
452waitpid.o: config.h
453xatexit.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
454xexit.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
455xmalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
456xmemdup.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
457xstrdup.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
458xstrerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
Note: See TracBrowser for help on using the repository browser.