Updated French translation
[binutils.git] / libiberty / Makefile.in
blob5fa96302812f24e7415a0bf8636bc1de0b7036f6
2 # Makefile
3 # Copyright (C) 1990, 91-99, 2000, 2001
4 # Free Software Foundation
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.
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.
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.
23 # This file was written by K. Richard Pixley <rich@cygnus.com>.
26 # Makefile for libiberty directory
29 srcdir = @srcdir@
30 VPATH = @srcdir@
32 prefix = @prefix@
34 exec_prefix = @exec_prefix@
35 bindir = @bindir@
36 libdir = @libdir@
38 SHELL = @SHELL@
40 # Multilib support variables.
41 MULTISRCTOP =
42 MULTIBUILDTOP =
43 MULTIDIRS =
44 MULTISUBDIR =
45 MULTIDO = true
46 MULTICLEAN = true
48 INSTALL = @INSTALL@
49 INSTALL_PROGRAM = @INSTALL_PROGRAM@
50 INSTALL_DATA = @INSTALL_DATA@
52 AR = @AR@
53 AR_FLAGS = rc
55 CC = @CC@
56 CFLAGS = @CFLAGS@
57 LIBCFLAGS = $(CFLAGS)
58 RANLIB = @RANLIB@
59 MAKEINFO = @MAKEINFO@
60 PERL = @PERL@
62 PICFLAG =
64 MAKEOVERRIDES =
66 TARGETLIB = libiberty.a
67 TESTLIB = testlib.a
69 LIBOBJS = @LIBOBJS@
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.)
73 EXTRA_OFILES =
75 # Flags to pass to a recursive make.
76 FLAGS_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)"
97 # Subdirectories to recurse into. We need to override this during cleaning
98 SUBDIRS = testsuite
100 # FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
101 all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
102 @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
104 .PHONY: check installcheck
105 check: check-subdir
106 installcheck: installcheck-subdir
108 @host_makefile_frag@
110 INCDIR=$(srcdir)/$(MULTISRCTOP)../include
112 COMPILE.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) $<
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.
122 CFILES = 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
146 # These are always included in the library. The first four are listed
147 # first and by compile time to optimize parallel builds.
148 REQUIRED_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
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".
167 CONFIGURED_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
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
197 $(TESTLIB): $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
198 -rm -f $(TESTLIB)
199 $(AR) $(AR_FLAGS) $(TESTLIB) \
200 $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
201 $(RANLIB) $(TESTLIB)
203 info: libiberty.info info-subdir
204 install-info: install-info-subdir
205 clean-info: clean-info-subdir
206 dvi: libiberty.dvi dvi-subdir
207 html: libiberty.html
209 TEXISRC = \
210 $(srcdir)/libiberty.texi \
211 $(srcdir)/copying-lib.texi \
212 $(srcdir)/obstacks.texi \
213 $(srcdir)/functions.texi
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.
218 TEXIFILES = fnmatch.txh
220 libiberty.info : $(srcdir)/libiberty.texi $(TEXISRC)
221 $(MAKEINFO) -I$(srcdir) $(srcdir)/libiberty.texi
223 libiberty.dvi : $(srcdir)/libiberty.texi $(TEXISRC)
224 texi2dvi $(srcdir)/libiberty.texi
226 libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
227 $(MAKEINFO) --html -I$(srcdir) $(srcdir)/libiberty.texi
229 @MAINT@$(srcdir)/functions.texi : stamp-functions
230 @MAINT@ @true
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
236 INSTALL_DEST = @INSTALL_DEST@
237 install: install_to_$(INSTALL_DEST) install-subdir
239 install_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
245 install_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
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.
254 NEEDED = 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
257 needed-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
267 # required-list was used when building a shared bfd/opcodes/libiberty
268 # library. I don't know if it used by anything currently.
269 required-list: Makefile
270 echo $(REQUIRED_OFILES) > required-list
272 stamp-picdir:
273 if [ x"$(PICFLAG)" != x ] && [ ! -d pic ]; then \
274 mkdir pic; \
275 else true; fi
276 touch stamp-picdir
278 .PHONY: all etags tags ls clean stage1 stage2
280 etags tags: TAGS etags-subdir
282 TAGS: $(CFILES)
283 etags `for i in $(CFILES); do echo $(srcdir)/$$i ; done`
285 # The standalone demangler (c++filt) has been moved to binutils.
286 demangle:
287 @echo "The standalone demangler, now named c++filt, is now"
288 @echo "a part of binutils."
289 @false
292 @echo Makefile $(CFILES)
294 # Various targets for maintainers.
296 maint-missing :
297 @$(PERL) $(srcdir)/maint-tool -s $(srcdir) missing $(CFILES) $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
299 maint-buildall : $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
300 @true
302 maint-undoc : $(srcdir)/functions.texi
303 @$(PERL) $(srcdir)/maint-tool -s $(srcdir) undoc
305 maint-deps :
306 @$(PERL) $(srcdir)/maint-tool -s $(srcdir) deps $(INCDIR)
308 # Need to deal with profiled libraries, too.
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.
312 mostlyclean: 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
321 clean: 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
326 distclean: 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
332 maintainer-clean realclean: maintainer-clean-subdir
333 $(MAKE) SUBDIRS="" distclean
335 force:
337 Makefile: $(srcdir)/Makefile.in config.status
338 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
340 # Depending on Makefile makes sure that config.status has been re-run
341 # if needed. This prevents problems with parallel builds.
342 config.h: stamp-h ; @true
343 stamp-h: config.in config.status Makefile
344 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
346 config.status: $(srcdir)/configure $(srcdir)/config.table
347 $(SHELL) ./config.status --recheck
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.
352 all-subdir check-subdir installcheck-subdir info-subdir \
353 install-info-subdir clean-info-subdir dvi-subdir install-subdir \
354 etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \
355 maintainer-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
362 $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS): stamp-picdir
363 $(CONFIGURED_OFILES): stamp-picdir
365 # The dependencies in the remainder of this file are automatically
366 # generated by "make maint-deps". Manual edits will be lost.
368 _doprnt.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
369 alloca.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
370 argv.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
371 asprintf.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
372 atexit.o: config.h
373 basename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
374 $(INCDIR)/safe-ctype.h
375 bsearch.o: config.h $(INCDIR)/ansidecl.h
376 calloc.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
377 choose-temp.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
378 clock.o: config.h
379 concat.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
380 copysign.o: $(INCDIR)/ansidecl.h
381 cp-demangle.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
382 $(INCDIR)/dyn-string.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h
383 cplus-dem.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
384 $(INCDIR)/getopt.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
385 dyn-string.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/dyn-string.h \
386 $(INCDIR)/libiberty.h
387 fdmatch.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
388 fibheap.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/fibheap.h \
389 $(INCDIR)/libiberty.h
390 floatformat.o: $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h
391 fnmatch.o: config.h $(INCDIR)/fnmatch.h $(INCDIR)/safe-ctype.h
392 getcwd.o: config.h
393 getopt.o: config.h $(INCDIR)/getopt.h
394 getopt1.o: config.h $(INCDIR)/getopt.h
395 getpagesize.o: config.h
396 getpwd.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
397 getruntime.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
398 hashtab.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/hashtab.h \
399 $(INCDIR)/libiberty.h
400 hex.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
401 lbasename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
402 $(INCDIR)/safe-ctype.h
403 make-temp-file.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
404 md5.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
405 memchr.o: $(INCDIR)/ansidecl.h
406 memcmp.o: $(INCDIR)/ansidecl.h
407 memcpy.o: $(INCDIR)/ansidecl.h
408 memmove.o: $(INCDIR)/ansidecl.h
409 memset.o: $(INCDIR)/ansidecl.h
410 mkstemps.o: config.h $(INCDIR)/ansidecl.h
411 objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h
412 obstack.o: config.h $(INCDIR)/obstack.h
413 partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
414 $(INCDIR)/partition.h
415 pexecute.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
416 $(INCDIR)/safe-ctype.h
417 putenv.o: config.h $(INCDIR)/ansidecl.h
418 random.o: $(INCDIR)/ansidecl.h
419 regex.o: config.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
420 rename.o: config.h
421 safe-ctype.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
422 setenv.o: config.h $(INCDIR)/ansidecl.h
423 sigsetmask.o: $(INCDIR)/ansidecl.h
424 sort.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
425 $(INCDIR)/sort.h
426 spaces.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
427 splay-tree.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
428 $(INCDIR)/splay-tree.h
429 strcasecmp.o: $(INCDIR)/ansidecl.h
430 strchr.o: $(INCDIR)/ansidecl.h
431 strerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
432 strncasecmp.o: $(INCDIR)/ansidecl.h
433 strncmp.o: $(INCDIR)/ansidecl.h
434 strrchr.o: $(INCDIR)/ansidecl.h
435 strsignal.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
436 strtod.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
437 strtol.o: config.h $(INCDIR)/safe-ctype.h
438 strtoul.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
439 ternary.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
440 $(INCDIR)/ternary.h
441 vasprintf.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
442 vfork.o: $(INCDIR)/ansidecl.h
443 vprintf.o: $(INCDIR)/ansidecl.h
444 vsprintf.o: $(INCDIR)/ansidecl.h
445 waitpid.o: config.h
446 xatexit.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
447 xexit.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
448 xmalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
449 xmemdup.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
450 xstrdup.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
451 xstrerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h