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 \
83 elf32.o elf32-sparc.o elf32-i386.o elf32-i860.o elf32-m68k.o \
86 hppa.o oasys.o ieee.o srec.o stab-syms.o coff-alpha.o coff-sh.o \
93 OPTIONAL_BACKENDS
= trad-core.o
95 # These are defined by configure.in:
97 # BFD_BACKENDS = $(BFD32_BACKENDS)
98 # Change this (to MINIMIZE=1) to save space in executables.
99 # Currently, all this does is control the target_vector in targets.c.
102 #### host and target dependent Makefile fragments come in here.
107 "exec_prefix=$(exec_prefix)" \
108 "against=$(against)" \
110 "AR_FLAGS=$(AR_FLAGS)" \
112 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
115 "MAKEINFO=$(MAKEINFO)" \
116 "INSTALL=$(INSTALL)" \
117 "INSTALL_DATA=$(INSTALL_DATA)" \
118 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
122 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) $<
124 # C source files that correspond to .o's.
125 CFILES
= libbfd.c opncls.c bfd.c archive.c targets.c cache.c \
126 archures.c coff-i386.c aout64.c aout32.c sunos.c demo64.c \
127 coff-i960.c srec.c tekhex.c oasys.c ieee.c coff-m68k.c \
128 coff-a29k.c coff-rs6000.c coff-msym.c coffgen.c format.c \
129 section.c core.c syms.c stab-syms.c reloc.c init.c ctor.c \
130 seclet.c coff-m88k.c coff-mips.c coff-sh.c trad-core.c newsos3.c \
131 i386aout.c i386linux.c bout.c aout-adobe.c coff-we32k.c \
132 i386bsd.c cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c \
133 cpu-m88k.c cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.c \
134 cpu-rs6000.c coff-h8300.c hppa.c cpu-hppa.c cpu-we32k.c reloc16.c \
136 elf32.c elf32-sparc.c elf32-i386.c elf32-i860.c elf32-m68k.c \
139 coff-alpha.c cpu-alpha.c \
140 hp300hpux.c i386lynx.c
142 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
144 all: Makefile
$(TARGETLIB
)
145 @
$(MAKE
) subdir_do DO
=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
154 @
$(MAKE
) subdir_do DO
=$@
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
157 @
$(MAKE
) subdir_do DO
=clean-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
160 @
$(MAKE
) subdir_do DO
=install-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
162 # HDEPFILES comes from the host config; TDEPFILES from the target config.
163 OFILES
= $(BFD_LIBS
) $(BFD_BACKENDS
) $(BFD_MACHINES
) $(HDEPFILES
) $(TDEPFILES
)
165 $(TARGETLIB
): $(OFILES
)
167 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
168 $(RANLIB
) $(TARGETLIB
)
170 # When compiling archures.c and targets.c, supply the default target
171 # info from configure.
174 targets.o
: targets.c Makefile
175 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
177 archures.o
: archures.c Makefile
178 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
181 @for i in
$(DODIRS
); do \
182 if
[ -d .
/$$i ] ; then \
184 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
192 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
195 rm -f
*.o
*~ core
*.E
*.p
*.ip aout-params.h gen-aout
196 do_clean
: do_mostlyclean
198 do_distclean
: do_clean
199 rm -f Makefile config.status sysdep.h
200 do_realclean
: do_distclean
202 mostlyclean: do_mostlyclean
203 $(MAKE
) subdir_do DO
=mostlyclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
205 $(MAKE
) subdir_do DO
=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
207 $(MAKE
) subdir_do DO
=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
210 $(MAKE
) subdir_do DO
=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
213 # Mark everything as depending on config.status, since the timestamp on
214 # sysdep.h might actually move backwards if we reconfig and relink it
215 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
216 RECONFIG
= config.status
217 $(BFD_LIBS
): libbfd.h bfd.h
$(RECONFIG
)
218 $(BFD_MACHINES
): libbfd.h bfd.h
$(RECONFIG
)
219 $(BFD_BACKENDS
): libbfd.h bfd.h
$(RECONFIG
)
220 $(OPTIONAL_BACKENDS
): libbfd.h bfd.h
$(RECONFIG
)
222 # Get around a Sun Make bug in SunOS 4.1.1 with VPATH
223 cpu-i386.o
:cpu-i386.c
225 cpu-h8500.o
: cpu-h8500.c
226 cpu-we32k.o
: cpu-we32k.c
229 #suppress 65 on bfd_map_over_sections
230 #suppress 66 on bfd_map_over_sections
231 #suppress 67 on bfd_map_over_sections
232 #suppress 68 on bfd_map_over_sections
233 #suppress 69 on bfd_map_over_sections
234 #suppress 70 on bfd_map_over_sections
235 #suppress 110 in bfd_map_over_sections
236 #suppress 112 in bfd_map_over_sections
238 #suppress 590 in swap_exec_header
239 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
240 #suppress 590 in bfd_dont_truncate_arname
241 #suppress 590 on ignore
242 #suppress 590 on abfd
243 #setopt load_flags $(CFLAGS)
247 #-----------------------------------------------------------------------------
248 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
250 # 'VERSION' file must be present and contain a string of the form "x.y"
251 #-----------------------------------------------------------------------------
255 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
258 # This target should be invoked before building a new release.
259 # 'VERSION' file must be present and contain a string of the form "x.y"
263 MAJ
=`sed 's/\..*//' VERSION` ; \
264 MIN
=`sed 's/.*\.//' VERSION` ; \
265 V
=$$MAJ.
`expr $$MIN + 1` ; \
267 echo
$$V >VERSION
; \
270 # Dummy target to force execution of dependent targets.
275 -parent
=`echo $(libdir)|sed -e 's@/[^/]*$$@@'`; \
276 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
277 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; fi
278 $(INSTALL_DATA
) libbfd.a
$(libdir)/libbfd.a
279 $(RANLIB
) $(libdir)/libbfd.a
280 -parent
=`echo $(includedir)|sed -e 's@/[^/]*$$@@'`; \
281 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
282 -if
[ -d
$(includedir) ] ; then true
; else mkdir
$(includedir) ; fi
283 # Install BFD include file, and others that it needs. Install them
284 # both in GCC's include directory, and in the system include dir
285 # if configured as $(oldincludedir) -- which it usually isnt.
286 $(INSTALL_DATA
) bfd.h
$(includedir)/bfd.h
287 $(INSTALL_DATA
) $(INCDIR
)/ansidecl.h
$(includedir)/ansidecl.h
288 $(INSTALL_DATA
) $(INCDIR
)/obstack.h
$(includedir)/obstack.h
289 -if
[ -z
"$(oldincludedir)" ] ; then true
; \
290 else if
[ -d
$(oldincludedir) ] ; then true
; \
291 else mkdir
$(oldincludedir) ; \
293 $(INSTALL_DATA
) bfd.h
$(oldincludedir)/bfd.h
;\
294 $(INSTALL_DATA
) $(INCDIR
)/ansidecl.h
$(oldincludedir)/ansidecl.h
;\
295 $(INSTALL_DATA
) $(INCDIR
)/obstack.h
$(oldincludedir)/obstack.h
;\
297 @
$(MAKE
) subdir_do DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
300 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
301 $(SHELL
) .
/config.status
306 host-aout.o
: Makefile
308 # The following program can be used to generate a simple config file
309 # which can be folded into an h-XXX file for a new host, with some editing.
310 aout-params.h
: gen-aout
311 .
/gen-aout
> aout-params.h
312 gen-aout
: $(srcdir)/gen-aout.c Makefile
313 $(CC
) -o gen-aout
$(CFLAGS
) $(LFLAGS
) $(srcdir)/gen-aout.c
315 BFDIN_H
= $(srcdir)/bfd-in2.h
317 bfd.h
: $(BFDIN_H
) Makefile
318 sed
-e
's/@WORDSIZE@/$(WORDSIZE)/' < $(BFDIN_H
) > bfd.h
321 (cd
$(docdir
); $(MAKE
) protos
$(FLAGS_TO_PASS
))
322 # Could really use a "copy-if-change"...
323 cp
$(docdir
)/bfd.h bfd.h-new
324 $(srcdir)/..
/move-if-change bfd.h-new
$(BFDIN_H
)
325 cp
$(docdir
)/libbfd.h libbfd.h-new
326 $(srcdir)/..
/move-if-change libbfd.h-new
$(srcdir)/libbfd.h
327 cp
$(docdir
)/libcoff.h libcoff.h-new
328 $(srcdir)/..
/move-if-change libcoff.h-new
$(srcdir)/libcoff.h
331 (cd
$(docdir
); $(MAKE
) bfd.
info $(FLAGS_TO_PASS
))
334 (cd
$(docdir
); $(MAKE
) bfd.
dvi $(FLAGS_TO_PASS
))
337 (cd
$(docdir
); $(MAKE
) bfd.ps
$(FLAGS_TO_PASS
))
339 # What appears below is generated by a hacked mkdep using gcc -MM.
341 # DO NOT DELETE THIS LINE -- mkdep uses it.
342 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
344 libbfd.o
: libbfd.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
345 opncls.o
: opncls.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
346 bfd.o
: bfd.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
347 $(INCDIR
)/coff
/sym.h libecoff.h
348 archive.o
: archive.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
349 $(INCDIR
)/aout
/ar.h
$(INCDIR
)/aout
/ranlib.h
350 targets.o
: targets.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
351 cache.o
: cache.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
352 archures.o
: archures.c bfd.h
$(INCDIR
)/obstack.h
354 aout32.o
: aout32.c aoutx.h bfd.h
$(INCDIR
)/ansidecl.h \
355 $(INCDIR
)/obstack.h libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h \
356 $(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
357 sunos.o
: sunos.c aoutf1.h bfd.h
$(INCDIR
)/obstack.h \
358 libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h \
359 $(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
362 srec.o
: srec.c bfd.h
$(INCDIR
)/obstack.h libbfd.h
363 oasys.o
: oasys.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
364 $(INCDIR
)/oasys.h liboasys.h
365 ieee.o
: ieee.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
366 $(INCDIR
)/ieee.h libieee.h
367 coff-h8300.o
: coff-h8300.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
368 $(INCDIR
)/coff
/h8300.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
370 coff-h8500.o
: coff-h8500.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
371 $(INCDIR
)/coff
/h8300.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
373 coff-a29k.o
: coff-a29k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
374 $(INCDIR
)/coff
/a29k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
376 coff-i386.o
: coff-i386.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
377 $(INCDIR
)/coff
/i386.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
379 coff-i960.o
: coff-i960.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
380 $(INCDIR
)/coff
/i960.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
382 coff-m68k.o
: coff-m68k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
383 $(INCDIR
)/coff
/m68k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
385 coff-m88k.o
: coff-m88k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
386 $(INCDIR
)/coff
/m88k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
388 coff-mips.o
: coff-mips.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
389 $(INCDIR
)/coff
/mips.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
390 coffswap.h seclet.h libecoff.h
391 coff-rs6000.o
: coff-rs6000.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
392 $(INCDIR
)/coff
/rs6000.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
394 coff-z8k.o
: coff-z8k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
395 $(INCDIR
)/coff
/z8k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
397 coff-we32k.o
: coff-we32k.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
398 $(INCDIR
)/coff
/we32k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
400 coffgen.o
: coffgen.c bfd.h libbfd.h
$(INCDIR
)/coff
/internal.h \
402 reloc16.o
: reloc16.c bfd.h libbfd.h
$(INCDIR
)/coff
/internal.h \
404 format.o
: format.c bfd.h \
405 $(INCDIR
)/obstack.h libbfd.h
406 section.o
: section.c bfd.h \
407 $(INCDIR
)/obstack.h libbfd.h
408 core.o
: core.c bfd.h \
409 $(INCDIR
)/obstack.h libbfd.h
410 syms.o
: syms.c bfd.h \
411 $(INCDIR
)/obstack.h libbfd.h
413 reloc.o
: reloc.c bfd.h \
414 $(INCDIR
)/obstack.h libbfd.h
416 trad-core.o
: trad-core.c bfd.h
$(INCDIR
)/obstack.h \
419 coff-msym.o
: coff-msym.c bfd.h
$(INCDIR
)/coff
/ecoff-ext.h \
420 $(INCDIR
)/coff
/sym.h
$(INCDIR
)/coff
/symconst.h
422 newsos3.o
: newsos3.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
423 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
424 $(INCDIR
)/aout
/ar.h libaout.h
425 i386lynx.o
: i386lynx.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
426 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
427 $(INCDIR
)/aout
/ar.h libaout.h
428 i386aout.o
: i386aout.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 i386linux.o
: i386linux.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 i386bsd.o
: i386bsd.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 bout.o
: bout.c bfd.h
$(INCDIR
)/obstack.h libbfd.h \
438 $(INCDIR
)/bout.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def libaout.h
439 mipsbsd.o
: mipsbsd.c 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