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
$(INCDIR
)
70 BFD_LIBS
= libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
71 archures.o core.o section.o format.o syms.o reloc.o init.o \
72 ctor.o seclet.o coffgen.o reloc16.o
74 BFD_MACHINES
= cpu-h8300.o cpu-i960.o cpu-sparc.o cpu-m68k.o cpu-m88k.o \
75 cpu-vax.o cpu-mips.o cpu-a29k.o cpu-i386.o cpu-rs6000.o cpu-hppa.o \
76 cpu-z8k.o cpu-we32k.o cpu-h8500.o cpu-alpha.o cpu-sh.o
78 BFD32_BACKENDS
= aout32.o sunos.o newsos3.o mipsbsd.o aout-adobe.o \
79 i386aout.o i386bsd.o i386linux.o i386lynx.o \
80 coff-i960.o coff-a29k.o coff-m68k.o coff-i386.o coff-m88k.o \
81 coff-rs6000.o coff-h8300.o coff-h8500.o coff-z8k.o coff-we32k.o \
82 coff-mips.o coff-msym.o \
84 elf32.o elf32-sparc.o elf32-i386.o elf32-i860.o elf32-m68k.o \
87 hppa.o oasys.o ieee.o srec.o stab-syms.o coff-alpha.o coff-sh.o \
94 OPTIONAL_BACKENDS
= trad-core.o
96 # These are defined by configure.in:
98 # BFD_BACKENDS = $(BFD32_BACKENDS)
99 # Change this (to MINIMIZE=1) to save space in executables.
100 # Currently, all this does is control the target_vector in targets.c.
103 #### host and target dependent Makefile fragments come in here.
108 "exec_prefix=$(exec_prefix)" \
109 "against=$(against)" \
111 "AR_FLAGS=$(AR_FLAGS)" \
113 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
116 "MAKEINFO=$(MAKEINFO)" \
117 "INSTALL=$(INSTALL)" \
118 "INSTALL_DATA=$(INSTALL_DATA)" \
119 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
123 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) $<
125 # C source files that correspond to .o's.
126 CFILES
= libbfd.c opncls.c bfd.c archive.c targets.c cache.c \
127 archures.c coff-i386.c aout64.c aout32.c sunos.c demo64.c \
128 coff-i960.c srec.c tekhex.c oasys.c ieee.c coff-m68k.c \
129 coff-a29k.c coff-rs6000.c coff-msym.c coffgen.c format.c \
130 section.c core.c syms.c stab-syms.c reloc.c init.c ctor.c \
131 seclet.c coff-m88k.c coff-mips.c coff-sh.c trad-core.c newsos3.c \
132 i386aout.c i386linux.c bout.c aout-adobe.c coff-we32k.c \
133 i386bsd.c cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c \
134 cpu-m88k.c cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.c \
135 cpu-rs6000.c coff-h8300.c hppa.c cpu-hppa.c cpu-we32k.c reloc16.c \
137 elf32.c elf32-sparc.c elf32-i386.c elf32-i860.c elf32-m68k.c \
140 coff-alpha.c cpu-alpha.c \
141 hp300hpux.c i386lynx.c
143 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
145 all: Makefile
$(TARGETLIB
)
146 @
$(MAKE
) subdir_do DO
=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
155 @
$(MAKE
) subdir_do DO
=$@
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
158 @
$(MAKE
) subdir_do DO
=clean-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
161 @
$(MAKE
) subdir_do DO
=install-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
163 # HDEPFILES comes from the host config; TDEPFILES from the target config.
164 OFILES
= $(BFD_LIBS
) $(BFD_BACKENDS
) $(BFD_MACHINES
) $(HDEPFILES
) $(TDEPFILES
)
166 $(TARGETLIB
): $(OFILES
)
168 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
169 $(RANLIB
) $(TARGETLIB
)
171 # When compiling archures.c and targets.c, supply the default target
172 # info from configure.
175 targets.o
: targets.c Makefile
176 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
178 archures.o
: archures.c Makefile
179 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
182 @for i in
$(DODIRS
); do \
183 if
[ -d .
/$$i ] ; then \
185 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
193 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
196 rm -f
*.o
*~ core
*.E
*.p
*.ip aout-params.h gen-aout
197 do_clean
: do_mostlyclean
199 do_distclean
: do_clean
200 rm -f Makefile config.status sysdep.h
201 do_realclean
: do_distclean
203 mostlyclean: do_mostlyclean
204 $(MAKE
) subdir_do DO
=mostlyclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
206 $(MAKE
) subdir_do DO
=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
208 $(MAKE
) subdir_do DO
=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
211 $(MAKE
) subdir_do DO
=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
214 # Mark everything as depending on config.status, since the timestamp on
215 # sysdep.h might actually move backwards if we reconfig and relink it
216 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
217 RECONFIG
= config.status
218 $(BFD_LIBS
): libbfd.h bfd.h
$(RECONFIG
)
219 $(BFD_MACHINES
): libbfd.h bfd.h
$(RECONFIG
)
220 $(BFD_BACKENDS
): libbfd.h bfd.h
$(RECONFIG
)
221 $(OPTIONAL_BACKENDS
): libbfd.h bfd.h
$(RECONFIG
)
223 # Get around a Sun Make bug in SunOS 4.1.1 with VPATH
224 cpu-i386.o
:cpu-i386.c
226 cpu-h8500.o
: cpu-h8500.c
227 cpu-we32k.o
: cpu-we32k.c
230 #suppress 65 on bfd_map_over_sections
231 #suppress 66 on bfd_map_over_sections
232 #suppress 67 on bfd_map_over_sections
233 #suppress 68 on bfd_map_over_sections
234 #suppress 69 on bfd_map_over_sections
235 #suppress 70 on bfd_map_over_sections
236 #suppress 110 in bfd_map_over_sections
237 #suppress 112 in bfd_map_over_sections
239 #suppress 590 in swap_exec_header
240 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
241 #suppress 590 in bfd_dont_truncate_arname
242 #suppress 590 on ignore
243 #suppress 590 on abfd
244 #setopt load_flags $(CFLAGS)
248 #-----------------------------------------------------------------------------
249 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
251 # 'VERSION' file must be present and contain a string of the form "x.y"
252 #-----------------------------------------------------------------------------
256 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
259 # This target should be invoked before building a new release.
260 # 'VERSION' file must be present and contain a string of the form "x.y"
264 MAJ
=`sed 's/\..*//' VERSION` ; \
265 MIN
=`sed 's/.*\.//' VERSION` ; \
266 V
=$$MAJ.
`expr $$MIN + 1` ; \
268 echo
$$V >VERSION
; \
271 # Dummy target to force execution of dependent targets.
276 $(INSTALL_DATA
) libbfd.a
$(libdir)/libbfd.a
277 $(RANLIB
) $(libdir)/libbfd.a
278 # Install BFD include file, and others that it needs. Install them
279 # both in GCC's include directory, and in the system include dir
280 # if configured as $(oldincludedir) -- which it usually isnt.
281 $(INSTALL_DATA
) bfd.h
$(includedir)/bfd.h
282 $(INSTALL_DATA
) $(INCDIR
)/ansidecl.h
$(includedir)/ansidecl.h
283 $(INSTALL_DATA
) $(INCDIR
)/obstack.h
$(includedir)/obstack.h
284 -if
[ -z
"$(oldincludedir)" ] ; then true
; \
285 else if
[ -d
$(oldincludedir) ] ; then true
; \
286 else mkdir
$(oldincludedir) ; \
288 $(INSTALL_DATA
) bfd.h
$(oldincludedir)/bfd.h
;\
289 $(INSTALL_DATA
) $(INCDIR
)/ansidecl.h
$(oldincludedir)/ansidecl.h
;\
290 $(INSTALL_DATA
) $(INCDIR
)/obstack.h
$(oldincludedir)/obstack.h
;\
292 @
$(MAKE
) subdir_do DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
295 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
296 $(SHELL
) .
/config.status
301 host-aout.o
: Makefile
303 # The following program can be used to generate a simple config file
304 # which can be folded into an h-XXX file for a new host, with some editing.
305 aout-params.h
: gen-aout
306 .
/gen-aout
> aout-params.h
307 gen-aout
: $(srcdir)/gen-aout.c Makefile
308 $(CC
) -o gen-aout
$(CFLAGS
) $(LFLAGS
) $(srcdir)/gen-aout.c
310 BFDIN_H
= $(srcdir)/bfd-in2.h
312 bfd.h
: stmp-bfd.h
; @true
314 stmp-bfd.h
: $(BFDIN_H
) Makefile
315 sed
-e
's/@WORDSIZE@/$(WORDSIZE)/' < $(BFDIN_H
) > bfd.h2
316 $(srcdir)/..
/move-if-change bfd.h2 bfd.h
320 (cd
$(docdir
); $(MAKE
) protos
$(FLAGS_TO_PASS
))
321 # Could really use a "copy-if-change"...
322 cp
$(docdir
)/bfd.h bfd.h-new
323 $(srcdir)/..
/move-if-change bfd.h-new
$(BFDIN_H
)
324 cp
$(docdir
)/libbfd.h libbfd.h-new
325 $(srcdir)/..
/move-if-change libbfd.h-new
$(srcdir)/libbfd.h
326 cp
$(docdir
)/libcoff.h libcoff.h-new
327 $(srcdir)/..
/move-if-change libcoff.h-new
$(srcdir)/libcoff.h
330 (cd
$(docdir
); $(MAKE
) bfd.
info $(FLAGS_TO_PASS
))
333 (cd
$(docdir
); $(MAKE
) bfd.
dvi $(FLAGS_TO_PASS
))
336 (cd
$(docdir
); $(MAKE
) bfd.ps
$(FLAGS_TO_PASS
))
338 # What appears below is generated by a hacked mkdep using gcc -MM.
340 # DO NOT DELETE THIS LINE -- mkdep uses it.
341 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
343 libbfd.o
: libbfd.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
344 opncls.o
: opncls.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
345 bfd.o
: bfd.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
346 $(INCDIR
)/coff
/sym.h libecoff.h
347 archive.o
: archive.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
348 $(INCDIR
)/aout
/ar.h
$(INCDIR
)/aout
/ranlib.h
349 targets.o
: targets.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
350 cache.o
: cache.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
351 archures.o
: archures.c bfd.h
$(INCDIR
)/obstack.h
353 aout32.o
: aout32.c aoutx.h bfd.h
$(INCDIR
)/ansidecl.h \
354 $(INCDIR
)/obstack.h libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h \
355 $(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
356 sunos.o
: sunos.c aoutf1.h bfd.h
$(INCDIR
)/obstack.h \
357 libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h \
358 $(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
361 srec.o
: srec.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
362 oasys.o
: oasys.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
363 $(INCDIR
)/oasys.h liboasys.h
364 ieee.o
: ieee.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
365 $(INCDIR
)/ieee.h libieee.h
366 coff-h8300.o
: coff-h8300.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
367 $(INCDIR
)/coff
/h8300.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
369 coff-h8500.o
: coff-h8500.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
370 $(INCDIR
)/coff
/h8300.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
372 coff-a29k.o
: coff-a29k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
373 $(INCDIR
)/coff
/a29k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
375 coff-i386.o
: coff-i386.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
376 $(INCDIR
)/coff
/i386.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
378 coff-i960.o
: coff-i960.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
379 $(INCDIR
)/coff
/i960.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
381 coff-m68k.o
: coff-m68k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
382 $(INCDIR
)/coff
/m68k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
384 coff-m88k.o
: coff-m88k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
385 $(INCDIR
)/coff
/m88k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
387 coff-mips.o
: coff-mips.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
388 $(INCDIR
)/coff
/mips.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
389 coffswap.h seclet.h libecoff.h
390 coff-rs6000.o
: coff-rs6000.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
391 $(INCDIR
)/coff
/rs6000.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
393 coff-z8k.o
: coff-z8k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
394 $(INCDIR
)/coff
/z8k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
396 coff-we32k.o
: coff-we32k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
397 $(INCDIR
)/coff
/we32k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
399 coffgen.o
: coffgen.c bfd.h libbfd.h
$(INCDIR
)/coff
/internal.h \
401 reloc16.o
: reloc16.c bfd.h libbfd.h
$(INCDIR
)/coff
/internal.h \
403 format.o
: format.c bfd.h \
404 $(INCDIR
)/obstack.h libbfd.h
405 section.o
: section.c bfd.h \
406 $(INCDIR
)/obstack.h libbfd.h
407 core.o
: core.c bfd.h \
408 $(INCDIR
)/obstack.h libbfd.h
409 syms.o
: syms.c bfd.h \
410 $(INCDIR
)/obstack.h libbfd.h
412 reloc.o
: reloc.c bfd.h \
413 $(INCDIR
)/obstack.h libbfd.h
415 trad-core.o
: trad-core.c bfd.h
$(INCDIR
)/obstack.h \
418 coff-msym.o
: coff-msym.c bfd.h
$(INCDIR
)/coff
/ecoff-ext.h \
419 $(INCDIR
)/coff
/sym.h
$(INCDIR
)/coff
/symconst.h
421 newsos3.o
: newsos3.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
422 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
423 $(INCDIR
)/aout
/ar.h libaout.h
424 i386lynx.o
: i386lynx.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
425 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
426 $(INCDIR
)/aout
/ar.h libaout.h
427 i386aout.o
: i386aout.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
428 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
429 $(INCDIR
)/aout
/ar.h libaout.h
430 i386linux.o
: i386linux.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
431 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
432 $(INCDIR
)/aout
/ar.h libaout.h
433 i386bsd.o
: i386bsd.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
434 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
435 $(INCDIR
)/aout
/ar.h libaout.h
436 bout.o
: bout.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
437 $(INCDIR
)/bout.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def libaout.h
438 mipsbsd.o
: mipsbsd.c bfd.h
$(INCDIR
)/obstack.h \
440 elf.o
: bfd.h
$(INCDIR
)/obstack.h
441 elf32.o
: elf32.c elfcode.h libelf.h libbfd.h bfd.h \
443 elf32-sparc.o
: elf32-sparc.c libelf.h libbfd.h bfd.h \
445 elf32-m68k.o
: elf32-m68k.c libelf.h libbfd.h bfd.h \
447 elf32-i860.o
: elf32-i860.c libelf.h libbfd.h bfd.h \
449 elf32-i386.o
: elf32-i386.c libelf.h libbfd.h bfd.h \
451 elf32-hppa.o
: elf32-hppa.c
$(srcdir)/elf32-hppa.h libelf.h libbfd.h \
452 bfd.h
$(INCDIR
)/obstack.h
453 elf64.o
: elf64.c elfcode.h libelf.h libbfd.h bfd.h \
456 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY