1 # Makefile template for Configure for the BFD library.
2 # Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
3 # Written by Cygnus Support.
5 # This file is part of BFD, the Binary File Descriptor library.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program 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
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 exec_prefix = $(prefix)
26 bindir = $(exec_prefix)/bin
27 libdir = $(exec_prefix)/lib
29 datadir = $(prefix)/lib
30 mandir = $(prefix)/man
31 man1dir = $(mandir)/man1
32 man2dir = $(mandir)/man2
33 man3dir = $(mandir)/man3
34 man4dir = $(mandir)/man4
35 man5dir = $(mandir)/man5
36 man6dir = $(mandir)/man6
37 man7dir = $(mandir)/man7
38 man8dir = $(mandir)/man8
39 man9dir = $(mandir)/man9
40 infodir = $(prefix)/info
41 includedir = $(prefix)/include
48 INSTALL_PROGRAM
= $(INSTALL
)
49 INSTALL_DATA
= $(INSTALL
)
60 INCDIR
= $(srcdir)/..
/include
61 CSEARCH
= -I.
-I
$(srcdir) -I..
/include -I
$(INCDIR
)
69 # bfd.h goes here, for now
72 BFD_LIBS
= libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
73 archures.o core.o section.o format.o syms.o reloc.o init.o \
74 ctor.o seclet.o coffgen.o reloc16.o
76 BFD_MACHINES
= cpu-h8300.o cpu-i960.o cpu-sparc.o cpu-m68k.o cpu-m88k.o \
77 cpu-vax.o cpu-mips.o cpu-a29k.o cpu-i386.o cpu-rs6000.o cpu-hppa.o \
78 cpu-z8k.o cpu-we32k.o cpu-h8500.o cpu-alpha.o cpu-sh.o
80 BFD32_BACKENDS
= aout32.o sunos.o newsos3.o mipsbsd.o aout-adobe.o \
81 i386aout.o i386bsd.o i386linux.o i386lynx.o \
82 coff-i960.o coff-a29k.o coff-m68k.o coff-i386.o coff-m88k.o \
83 coff-rs6000.o coff-h8300.o coff-h8500.o coff-z8k.o coff-we32k.o \
84 coff-mips.o coff-msym.o \
86 elf32.o elf32-sparc.o elf32-i386.o elf32-i860.o elf32-m68k.o \
87 elf32-hppa.o elf32-mips.o elf32-m88k.o elf32-generic.o \
89 hppa.o oasys.o ieee.o srec.o stab-syms.o coff-alpha.o coff-sh.o \
96 OPTIONAL_BACKENDS
= trad-core.o
98 # These are defined by configure.in:
100 # BFD_BACKENDS = $(BFD32_BACKENDS)
101 # Change this (to MINIMIZE=1) to save space in executables.
102 # Currently, all this does is control the target_vector in targets.c.
105 #### host and target dependent Makefile fragments come in here.
110 "exec_prefix=$(exec_prefix)" \
111 "against=$(against)" \
113 "AR_FLAGS=$(AR_FLAGS)" \
115 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
118 "MAKEINFO=$(MAKEINFO)" \
119 "INSTALL=$(INSTALL)" \
120 "INSTALL_DATA=$(INSTALL_DATA)" \
121 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
125 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) $<
127 # C source files that correspond to .o's.
128 CFILES
= libbfd.c opncls.c bfd.c archive.c targets.c cache.c \
129 archures.c coff-i386.c aout64.c aout32.c sunos.c demo64.c \
130 coff-i960.c srec.c tekhex.c oasys.c ieee.c coff-m68k.c \
131 coff-a29k.c coff-rs6000.c coff-msym.c coffgen.c format.c \
132 section.c core.c syms.c stab-syms.c reloc.c init.c ctor.c \
133 seclet.c coff-m88k.c coff-mips.c coff-sh.c trad-core.c newsos3.c \
134 i386aout.c i386linux.c bout.c aout-adobe.c coff-we32k.c \
135 i386bsd.c cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c \
136 cpu-m88k.c cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.c \
137 cpu-rs6000.c coff-h8300.c hppa.c cpu-hppa.c cpu-we32k.c reloc16.c \
139 elf32.c elf32-sparc.c elf32-i386.c elf32-i860.c elf32-m68k.c \
140 elf32-hppa.c elf32-m88k.c elf32-mips.c elf32-generic.c \
142 coff-alpha.c cpu-alpha.c \
143 hp300hpux.c i386lynx.c
145 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
147 all: Makefile
$(TARGETLIB
)
148 @
$(MAKE
) subdir_do DO
=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
157 @
$(MAKE
) subdir_do DO
=$@
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
160 @
$(MAKE
) subdir_do DO
=clean-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
163 @
$(MAKE
) subdir_do DO
=install-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
165 # HDEPFILES comes from the host config; TDEPFILES from the target config.
166 OFILES
= $(BFD_LIBS
) $(BFD_BACKENDS
) $(BFD_MACHINES
) $(HDEPFILES
) $(TDEPFILES
)
168 $(TARGETLIB
): $(OFILES
)
170 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
171 $(RANLIB
) $(TARGETLIB
)
173 # When compiling archures.c and targets.c, supply the default target
174 # info from configure.
177 targets.o
: targets.c Makefile
178 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
180 archures.o
: archures.c Makefile
181 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
184 @for i in
$(DODIRS
); do \
185 if
[ -d .
/$$i ] ; then \
187 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
195 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
198 rm -f
*.o
*~ core
*.E
*.p
*.ip aout-params.h gen-aout
199 do_clean
: do_mostlyclean
201 do_distclean
: do_clean
202 rm -f Makefile config.status sysdep.h
203 do_realclean
: do_distclean
205 mostlyclean: do_mostlyclean
206 $(MAKE
) subdir_do DO
=mostlyclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
208 $(MAKE
) subdir_do DO
=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
210 $(MAKE
) subdir_do DO
=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
213 $(MAKE
) subdir_do DO
=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
216 # Mark everything as depending on config.status, since the timestamp on
217 # sysdep.h might actually move backwards if we reconfig and relink it
218 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
219 RECONFIG
= config.status
220 $(BFD_LIBS
): libbfd.h
$(BFD_H
) $(RECONFIG
)
221 $(BFD_MACHINES
): libbfd.h
$(BFD_H
) $(RECONFIG
)
222 $(BFD_BACKENDS
): libbfd.h
$(BFD_H
) $(RECONFIG
)
223 $(OPTIONAL_BACKENDS
): libbfd.h
$(BFD_H
) $(RECONFIG
)
225 # Get around a Sun Make bug in SunOS 4.1.1 with VPATH
226 cpu-i386.o
:cpu-i386.c
228 cpu-h8500.o
: cpu-h8500.c
229 cpu-we32k.o
: cpu-we32k.c
232 #suppress 65 on bfd_map_over_sections
233 #suppress 66 on bfd_map_over_sections
234 #suppress 67 on bfd_map_over_sections
235 #suppress 68 on bfd_map_over_sections
236 #suppress 69 on bfd_map_over_sections
237 #suppress 70 on bfd_map_over_sections
238 #suppress 110 in bfd_map_over_sections
239 #suppress 112 in bfd_map_over_sections
241 #suppress 590 in swap_exec_header
242 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
243 #suppress 590 in bfd_dont_truncate_arname
244 #suppress 590 on ignore
245 #suppress 590 on abfd
246 #setopt load_flags $(CFLAGS)
250 #-----------------------------------------------------------------------------
251 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
253 # 'VERSION' file must be present and contain a string of the form "x.y"
254 #-----------------------------------------------------------------------------
258 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
261 # This target should be invoked before building a new release.
262 # 'VERSION' file must be present and contain a string of the form "x.y"
266 MAJ
=`sed 's/\..*//' VERSION` ; \
267 MIN
=`sed 's/.*\.//' VERSION` ; \
268 V
=$$MAJ.
`expr $$MIN + 1` ; \
270 echo
$$V >VERSION
; \
273 # Dummy target to force execution of dependent targets.
278 $(INSTALL_DATA
) libbfd.a
$(libdir)/libbfd.a
279 $(RANLIB
) $(libdir)/libbfd.a
280 # Install BFD include file, and others that it needs. Install them
281 # both in GCC's include directory, and in the system include dir
282 # if configured as $(oldincludedir) -- which it usually isnt.
283 $(INSTALL_DATA
) $(BFD_H
) $(includedir)/bfd.h
284 $(INSTALL_DATA
) $(INCDIR
)/ansidecl.h
$(includedir)/ansidecl.h
285 $(INSTALL_DATA
) $(INCDIR
)/obstack.h
$(includedir)/obstack.h
286 -if
[ -z
"$(oldincludedir)" ] ; then true
; \
287 else if
[ -d
$(oldincludedir) ] ; then true
; \
288 else mkdir
$(oldincludedir) ; \
290 $(INSTALL_DATA
) $(BFD_H
) $(oldincludedir)/bfd.h
;\
291 $(INSTALL_DATA
) $(INCDIR
)/ansidecl.h
$(oldincludedir)/ansidecl.h
;\
292 $(INSTALL_DATA
) $(INCDIR
)/obstack.h
$(oldincludedir)/obstack.h
;\
294 @
$(MAKE
) subdir_do DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
297 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
298 $(SHELL
) .
/config.status
303 host-aout.o
: Makefile
305 # The following program can be used to generate a simple config file
306 # which can be folded into an h-XXX file for a new host, with some editing.
307 aout-params.h
: gen-aout
308 .
/gen-aout
> aout-params.h
309 gen-aout
: $(srcdir)/gen-aout.c Makefile
310 $(CC
) -o gen-aout
$(CFLAGS
) $(LFLAGS
) $(srcdir)/gen-aout.c
312 BFDIN_H
= $(srcdir)/bfd-in2.h
314 $(BFD_H
): stmp-bfd.h
; @true
316 # The file ../include/bfd.h is from earlier attempts to get this right.
317 # If the file is still there, kill it.
318 stmp-bfd.h
: $(BFDIN_H
) Makefile
319 rm -f bfd.h2
64 ..
/include/bfd.h
320 -grep HOST_64_BIT sysdep.h
> 64
321 sed
-e
's/@WORDSIZE@/$(WORDSIZE)/' -e
'/64-bit.*sysdep.h/ r 64' < $(BFDIN_H
) > bfd.h2
322 $(srcdir)/..
/move-if-change bfd.h2
$(BFD_H
)
326 # Could really use a "copy-if-change"...
328 (cd
$(docdir
); $(MAKE
) protos
$(FLAGS_TO_PASS
))
329 cp
$(docdir
)/bfd.h bfd.h-new
330 $(srcdir)/..
/move-if-change bfd.h-new
$(BFDIN_H
)
331 cp
$(docdir
)/libbfd.h libbfd.h-new
332 $(srcdir)/..
/move-if-change libbfd.h-new
$(srcdir)/libbfd.h
333 cp
$(docdir
)/libcoff.h libcoff.h-new
334 $(srcdir)/..
/move-if-change libcoff.h-new
$(srcdir)/libcoff.h
337 (cd
$(docdir
); $(MAKE
) bfd.
info $(FLAGS_TO_PASS
))
340 (cd
$(docdir
); $(MAKE
) bfd.
dvi $(FLAGS_TO_PASS
))
343 (cd
$(docdir
); $(MAKE
) bfd.ps
$(FLAGS_TO_PASS
))
345 # What appears below is generated by a hacked mkdep using gcc -MM.
347 # DO NOT DELETE THIS LINE -- mkdep uses it.
348 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
350 libbfd.o
: libbfd.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h
351 opncls.o
: opncls.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h
352 bfd.o
: bfd.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
353 $(INCDIR
)/coff
/sym.h libecoff.h
354 archive.o
: archive.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
355 $(INCDIR
)/aout
/ar.h
$(INCDIR
)/aout
/ranlib.h
356 targets.o
: targets.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h
357 cache.o
: cache.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h
358 archures.o
: archures.c
$(BFD_H
) $(INCDIR
)/obstack.h
360 aout32.o
: aout32.c aoutx.h
$(BFD_H
) $(INCDIR
)/ansidecl.h \
361 $(INCDIR
)/obstack.h libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h \
362 $(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
363 sunos.o
: sunos.c aoutf1.h
$(BFD_H
) $(INCDIR
)/obstack.h \
364 libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h \
365 $(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
368 srec.o
: srec.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h
369 oasys.o
: oasys.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
370 $(INCDIR
)/oasys.h liboasys.h
371 ieee.o
: ieee.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
372 $(INCDIR
)/ieee.h libieee.h
373 coff-h8300.o
: coff-h8300.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
374 $(INCDIR
)/coff
/h8300.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
376 coff-h8500.o
: coff-h8500.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
377 $(INCDIR
)/coff
/h8300.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
379 coff-a29k.o
: coff-a29k.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
380 $(INCDIR
)/coff
/a29k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
382 coff-i386.o
: coff-i386.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
383 $(INCDIR
)/coff
/i386.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
385 coff-i960.o
: coff-i960.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
386 $(INCDIR
)/coff
/i960.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
388 coff-m68k.o
: coff-m68k.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
389 $(INCDIR
)/coff
/m68k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
391 coff-m88k.o
: coff-m88k.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
392 $(INCDIR
)/coff
/m88k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
394 coff-mips.o
: coff-mips.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
395 $(INCDIR
)/coff
/mips.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
396 coffswap.h seclet.h libecoff.h
397 coff-rs6000.o
: coff-rs6000.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
398 $(INCDIR
)/coff
/rs6000.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
400 coff-z8k.o
: coff-z8k.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
401 $(INCDIR
)/coff
/z8k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
403 coff-we32k.o
: coff-we32k.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
404 $(INCDIR
)/coff
/we32k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
406 coffgen.o
: coffgen.c
$(BFD_H
) libbfd.h
$(INCDIR
)/coff
/internal.h \
408 reloc16.o
: reloc16.c
$(BFD_H
) libbfd.h
$(INCDIR
)/coff
/internal.h \
410 format.o
: format.c
$(BFD_H
) \
411 $(INCDIR
)/obstack.h libbfd.h
412 section.o
: section.c
$(BFD_H
) \
413 $(INCDIR
)/obstack.h libbfd.h
414 core.o
: core.c
$(BFD_H
) \
415 $(INCDIR
)/obstack.h libbfd.h
416 syms.o
: syms.c
$(BFD_H
) \
417 $(INCDIR
)/obstack.h libbfd.h
419 reloc.o
: reloc.c
$(BFD_H
) \
420 $(INCDIR
)/obstack.h libbfd.h
422 trad-core.o
: trad-core.c
$(BFD_H
) $(INCDIR
)/obstack.h \
425 coff-msym.o
: coff-msym.c
$(BFD_H
) $(INCDIR
)/coff
/ecoff-ext.h \
426 $(INCDIR
)/coff
/sym.h
$(INCDIR
)/coff
/symconst.h
428 newsos3.o
: newsos3.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
429 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
430 $(INCDIR
)/aout
/ar.h libaout.h
431 i386lynx.o
: i386lynx.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
432 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
433 $(INCDIR
)/aout
/ar.h libaout.h
434 i386aout.o
: i386aout.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
435 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
436 $(INCDIR
)/aout
/ar.h libaout.h
437 i386linux.o
: i386linux.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
438 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
439 $(INCDIR
)/aout
/ar.h libaout.h
440 i386bsd.o
: i386bsd.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
441 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
442 $(INCDIR
)/aout
/ar.h libaout.h
443 bout.o
: bout.c
$(BFD_H
) $(INCDIR
)/obstack.h libbfd.h \
444 $(INCDIR
)/bout.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def libaout.h
445 mipsbsd.o
: mipsbsd.c
$(BFD_H
) $(INCDIR
)/obstack.h \
447 elf.o
: $(BFD_H
) $(INCDIR
)/obstack.h
448 elf32.o
: elf32.c elfcode.h libelf.h libbfd.h
$(BFD_H
) \
450 elf32-sparc.o
: elf32-sparc.c libelf.h libbfd.h
$(BFD_H
) \
452 elf32-m68k.o
: elf32-m68k.c libelf.h libbfd.h
$(BFD_H
) \
454 elf32-i860.o
: elf32-i860.c libelf.h libbfd.h
$(BFD_H
) \
456 elf32-i386.o
: elf32-i386.c libelf.h libbfd.h
$(BFD_H
) \
458 elf32-hppa.o
: elf32-hppa.c
$(srcdir)/elf32-hppa.h libelf.h libbfd.h \
459 $(BFD_H
) $(INCDIR
)/obstack.h
460 elf32-m88k.o
: elf32-m88k.c libelf.h libbfd.h \
461 $(BFD_H
) $(INCDIR
)/obstack.h
462 elf32-mips.o
: elf32-mips.c libelf.h libbfd.h \
463 $(BFD_H
) $(INCDIR
)/obstack.h
464 elf32-generic.o
: elf32-generic.c libelf.h libbfd.h \
465 $(BFD_H
) $(INCDIR
)/obstack.h
466 elf64.o
: elf64.c elfcode.h libelf.h libbfd.h
$(BFD_H
) \
469 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY