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

Last change on this file since 1036 was 64, checked in by bird, 22 years ago

OS/2 workaround for the parallel build workaround ': $(MAKE) ; $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do'.

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