source: trunk/third/gcc/libiberty/Makefile.in @ 18474

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