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
)
58 INCDIR
= $(srcdir)/..
/include
59 CSEARCH
= -I.
-I
$(srcdir) -I
$(INCDIR
)
65 # Change this (to MINIMIZE=1) to save space in executables.
66 # Currently, all this does is control the target_vector in targets.c.
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
80 BFD_BACKENDS
= aout32.o sunos.o newsos3.o mipsbsd.o aout-adobe.o \
81 i386aout.o i386bsd.o i386linux.o \
83 coff-i960.o coff-a29k.o coff-m68k.o coff-i386.o coff-m88k.o \
84 coff-rs6000.o coff-h8300.o coff-h8500.o coff-z8k.o coff-we32k.o \
85 coff-mips.o coff-msym.o \
86 elf32.o elf32-sparc.o elf32-i386.o elf32-i860.o elf32-m68k.o \
88 hppa.o oasys.o ieee.o srec.o stab-syms.o
90 OPTIONAL_BACKENDS
= trad-core.o
92 #### host and target dependent Makefile fragments come in here.
97 "exec_prefix=$(exec_prefix)" \
98 "against=$(against)" \
100 "AR_FLAGS=$(AR_FLAGS)" \
104 "MAKEINFO=$(MAKEINFO)" \
105 "INSTALL=$(INSTALL)" \
106 "INSTALL_DATA=$(INSTALL_DATA)" \
107 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
111 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) $<
113 BFD_H
=$(INCDIR
)/bfd.h
115 # C source files that correspond to .o's.
116 CFILES
= libbfd.c opncls.c bfd.c archive.c targets.c cache.c \
117 archures.c coff-i386.c aout64.c aout32.c sunos.c demo64.c \
118 coff-i960.c srec.c tekhex.c oasys.c ieee.c coff-m68k.c \
119 coff-a29k.c coff-rs6000.c coff-msym.c coffgen.c format.c \
120 section.c core.c syms.c stab-syms.c reloc.c init.c ctor.c \
121 seclet.c coff-m88k.c coff-mips.c trad-core.c newsos3.c \
122 i386aout.c i386linux.c bout.c aout-adobe.c coff-we32k.c \
123 i386bsd.c cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c \
124 cpu-m88k.c cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.c \
125 cpu-rs6000.c coff-h8300.c hppa.c cpu-hppa.c cpu-we32k.c reloc16.c \
127 elf32.c elf32-sparc.c elf32-i386.c elf32-i860.c elf32-m68k.c
129 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
131 all: Makefile
$(TARGETLIB
)
132 @
$(MAKE
) subdir_do DO
=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
141 @
$(MAKE
) subdir_do DO
=info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
144 @
$(MAKE
) subdir_do DO
=clean-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
147 @
$(MAKE
) subdir_do DO
=install-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
149 # HDEPFILES comes from the host config; TDEPFILES from the target config.
150 OFILES
= $(BFD_LIBS
) $(BFD_BACKENDS
) $(BFD_MACHINES
) $(HDEPFILES
) $(TDEPFILES
)
152 $(TARGETLIB
): $(OFILES
)
154 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
155 $(RANLIB
) $(TARGETLIB
)
157 # When compiling archures.c and targets.c, supply the default target
158 # info from configure.
162 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
164 archures.o
: archures.c
165 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
168 @for i in
$(DODIRS
); do \
169 if
[ -d .
/$$i ] ; then \
171 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
179 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
182 rm -f
*.o
*~ core
*.E
*.p
*.ip aout-params.h gen-aout
183 do_clean
: do_mostlyclean
185 do_distclean
: do_clean
186 rm -f Makefile config.status sysdep.h
187 do_realclean
: do_distclean
189 mostlyclean: do_mostlyclean
190 $(MAKE
) subdir_do DO
=mostlyclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
192 $(MAKE
) subdir_do DO
=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
194 $(MAKE
) subdir_do DO
=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
197 $(MAKE
) subdir_do DO
=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
200 # Mark everything as depending on config.status, since the timestamp on
201 # sysdep.h might actually move backwards if we reconfig and relink it
202 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
203 RECONFIG
= config.status
204 $(BFD_LIBS
): libbfd.h
$(BFD_H
) $(RECONFIG
)
205 $(BFD_MACHINES
): libbfd.h
$(BFD_H
) $(RECONFIG
)
206 $(BFD_BACKENDS
): libbfd.h
$(BFD_H
) $(RECONFIG
)
207 $(OPTIONAL_BACKENDS
): libbfd.h
$(BFD_H
) $(RECONFIG
)
209 # Get around a Sun Make bug in SunOS 4.1.1 with VPATH
210 cpu-i386.o
:cpu-i386.c
212 cpu-h8500.o
: cpu-h8500.c
213 cpu-we32k.o
: cpu-we32k.c
216 #suppress 65 on bfd_map_over_sections
217 #suppress 66 on bfd_map_over_sections
218 #suppress 67 on bfd_map_over_sections
219 #suppress 68 on bfd_map_over_sections
220 #suppress 69 on bfd_map_over_sections
221 #suppress 70 on bfd_map_over_sections
222 #suppress 110 in bfd_map_over_sections
223 #suppress 112 in bfd_map_over_sections
225 #suppress 590 in swap_exec_header
226 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
227 #suppress 590 in bfd_dont_truncate_arname
228 #suppress 590 on ignore
229 #suppress 590 on abfd
230 #setopt load_flags $(CFLAGS)
234 #-----------------------------------------------------------------------------
235 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
237 # 'VERSION' file must be present and contain a string of the form "x.y"
238 #-----------------------------------------------------------------------------
242 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
245 # This target should be invoked before building a new release.
246 # 'VERSION' file must be present and contain a string of the form "x.y"
250 MAJ
=`sed 's/\..*//' VERSION` ; \
251 MIN
=`sed 's/.*\.//' VERSION` ; \
252 V
=$$MAJ.
`expr $$MIN + 1` ; \
254 echo
$$V >VERSION
; \
257 # Dummy target to force execution of dependent targets.
262 -parent
=`echo $(libdir)|sed -e 's@/[^/]*$$@@'`; \
263 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
264 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; fi
265 $(INSTALL_DATA
) libbfd.a
$(libdir)/libbfd.a
266 $(RANLIB
) $(libdir)/libbfd.a
267 -parent
=`echo $(includedir)|sed -e 's@/[^/]*$$@@'`; \
268 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
269 -if
[ -d
$(includedir) ] ; then true
; else mkdir
$(includedir) ; fi
270 # Install BFD include file, and others that it needs. Install them
271 # both in GCC's include directory, and in the system include dir
272 # if configured as $(oldincludedir) -- which it usually isnt.
273 $(INSTALL_DATA
) $(INCDIR
)/bfd.h
$(includedir)/bfd.h
274 $(INSTALL_DATA
) $(INCDIR
)/ansidecl.h
$(includedir)/ansidecl.h
275 $(INSTALL_DATA
) $(INCDIR
)/obstack.h
$(includedir)/obstack.h
276 -if
[ -z
"$(oldincludedir)" ] ; then true
; \
277 else if
[ -d
$(oldincludedir) ] ; then true
; \
278 else mkdir
$(oldincludedir) ; \
280 $(INSTALL_DATA
) $(INCDIR
)/bfd.h
$(oldincludedir)/bfd.h
;\
281 $(INSTALL_DATA
) $(INCDIR
)/ansidecl.h
$(oldincludedir)/ansidecl.h
;\
282 $(INSTALL_DATA
) $(INCDIR
)/obstack.h
$(oldincludedir)/obstack.h
;\
284 @
$(MAKE
) subdir_do DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
287 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
288 $(SHELL
) .
/config.status
293 host-aout.o
: Makefile
295 # The following program can be used to generate a simple config file
296 # which can be folded into an h-XXX file for a new host, with some editing.
297 aout-params.h
: gen-aout
298 .
/gen-aout
> aout-params.h
299 gen-aout
: $(srcdir)/gen-aout.c Makefile
300 $(CC
) -o gen-aout
$(CFLAGS
) $(LFLAGS
) $(srcdir)/gen-aout.c
303 (cd
$(docdir
); $(MAKE
) protos
$(FLAGS_TO_PASS
))
304 # Could really use a "copy-if-change"...
305 cp
$(docdir
)/bfd.h bfd.h-new
306 $(srcdir)/..
/move-if-change bfd.h-new
$(BFD_H
)
307 cp
$(docdir
)/libbfd.h libbfd.h-new
308 $(srcdir)/..
/move-if-change libbfd.h-new
$(srcdir)/libbfd.h
309 cp
$(docdir
)/libcoff.h libcoff.h-new
310 $(srcdir)/..
/move-if-change libcoff.h-new
$(srcdir)/libcoff.h
313 (cd
$(docdir
); $(MAKE
) bfd.
info $(FLAGS_TO_PASS
))
316 (cd
$(docdir
); $(MAKE
) bfd.
dvi $(FLAGS_TO_PASS
))
319 (cd
$(docdir
); $(MAKE
) bfd.ps
$(FLAGS_TO_PASS
))
321 # What appears below is generated by a hacked mkdep using gcc -MM.
323 # DO NOT DELETE THIS LINE -- mkdep uses it.
324 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
326 libbfd.o
: libbfd.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
327 opncls.o
: opncls.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
328 bfd.o
: bfd.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
329 archive.o
: archive.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
330 $(INCDIR
)/aout
/ar.h
$(INCDIR
)/aout
/ranlib.h
331 targets.o
: targets.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
332 cache.o
: cache.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
333 archures.o
: archures.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h
335 aout32.o
: aout32.c aoutx.h
$(INCDIR
)/bfd.h
$(INCDIR
)/ansidecl.h \
336 $(INCDIR
)/obstack.h libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h \
337 $(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
338 sunos.o
: sunos.c aoutf1.h
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h \
339 libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h \
340 $(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
343 srec.o
: srec.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
344 oasys.o
: oasys.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
345 $(INCDIR
)/oasys.h liboasys.h
346 ieee.o
: ieee.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
347 $(INCDIR
)/ieee.h libieee.h
348 coff-h8300.o
: coff-h8300.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
349 $(INCDIR
)/coff
/h8300.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
351 coff-h8500.o
: coff-h8500.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
352 $(INCDIR
)/coff
/h8300.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
354 coff-a29k.o
: coff-a29k.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
355 $(INCDIR
)/coff
/a29k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
357 coff-i386.o
: coff-i386.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
358 $(INCDIR
)/coff
/i386.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
360 coff-i960.o
: coff-i960.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
361 $(INCDIR
)/coff
/i960.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
363 coff-m68k.o
: coff-m68k.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
364 $(INCDIR
)/coff
/m68k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
366 coff-m88k.o
: coff-m88k.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
367 $(INCDIR
)/coff
/m88k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
369 coff-mips.o
: coff-mips.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
370 $(INCDIR
)/coff
/mips.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
371 coffswap.h seclet.h libecoff.h
372 coff-rs6000.o
: coff-rs6000.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
373 $(INCDIR
)/coff
/rs6000.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
375 coff-z8k.o
: coff-z8k.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
376 $(INCDIR
)/coff
/z8k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
378 coff-we32k.o
: coff-we32k.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
379 $(INCDIR
)/coff
/we32k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h \
381 coffgen.o
: coffgen.c
$(INCDIR
)/bfd.h libbfd.h
$(INCDIR
)/coff
/internal.h \
383 reloc16.o
: reloc16.c
$(INCDIR
)/bfd.h libbfd.h
$(INCDIR
)/coff
/internal.h \
385 format.o
: format.c
$(INCDIR
)/bfd.h \
386 $(INCDIR
)/obstack.h libbfd.h
387 section.o
: section.c
$(INCDIR
)/bfd.h \
388 $(INCDIR
)/obstack.h libbfd.h
389 core.o
: core.c
$(INCDIR
)/bfd.h \
390 $(INCDIR
)/obstack.h libbfd.h
391 syms.o
: syms.c
$(INCDIR
)/bfd.h \
392 $(INCDIR
)/obstack.h libbfd.h
394 reloc.o
: reloc.c
$(INCDIR
)/bfd.h \
395 $(INCDIR
)/obstack.h libbfd.h
397 trad-core.o
: trad-core.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h \
400 coff-msym.o
: coff-msym.c
$(INCDIR
)/bfd.h
$(INCDIR
)/coff
/ecoff-ext.h \
401 $(INCDIR
)/coff
/sym.h
$(INCDIR
)/coff
/symconst.h
403 newsos3.o
: newsos3.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
404 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
405 $(INCDIR
)/aout
/ar.h libaout.h
406 i386aout.o
: i386aout.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
407 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
408 $(INCDIR
)/aout
/ar.h libaout.h
409 i386linux.o
: i386linux.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
410 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
411 $(INCDIR
)/aout
/ar.h libaout.h
412 i386bsd.o
: i386bsd.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
413 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
414 $(INCDIR
)/aout
/ar.h libaout.h
415 bout.o
: bout.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
416 $(INCDIR
)/bout.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def libaout.h
417 mipsbsd.o
: mipsbsd.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h \
419 elf32.o
: elf32.c libelf.h libbfd.h
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h
420 elf32-sparc.o
: elf32-sparc.c libelf.h libbfd.h
$(INCDIR
)/bfd.h \
422 elf32-m68k.o
: elf32-m68k.c libelf.h libbfd.h
$(INCDIR
)/bfd.h \
424 elf32-i860.o
: elf32-i860.c libelf.h libbfd.h
$(INCDIR
)/bfd.h \
426 elf32-i386.o
: elf32-i386.c libelf.h libbfd.h
$(INCDIR
)/bfd.h \
429 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY