1 # Makefile template for Configure for the BFD library.
2 # Copyright (C) 1990, 1991, 1992 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
43 docdir
= $(srcdir)/doc
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 ctor.o seclet.o
75 # This is an independent variable so that targets can override it if
76 # they want. Until we get around to fixing the defaults for various targets,
77 # default to all opcode tables.
80 BFD_MACHINES
= cpu-h8300.o cpu-i960.o cpu-sparc.o cpu-m68k.o cpu-m88k.o \
81 cpu-vax.o cpu-mips.o cpu-a29k.o cpu-i386.o cpu-rs6000.o cpu-hppa.o \
82 cpu-z8k.o cpu-we32k.o \
85 BFD_BACKENDS
= oasys.o ieee.o srec.o elf.o stab-syms.o\
86 aout64.o aout32.o demo64.o sunos.o newsos3.o i386aout.o bout.o \
87 coff-i960.o coff-a29k.o coff-m68k.o coff-i386.o coff-m88k.o \
88 coff-mips.o coff-rs6000.o coff-h8300.o coff-msym.o hppa.o i386linux.o \
89 coff-z8k.o coff-we32k.o
91 OPTIONAL_BACKENDS
= trad-core.o
93 #### host and target dependent Makefile fragments come in here.
97 "against=$(against)" \
99 "AR_FLAGS=$(AR_FLAGS)" \
103 "MAKEINFO=$(MAKEINFO)" \
104 "INSTALL=$(INSTALL)" \
105 "INSTALL_DATA=$(INSTALL_DATA)" \
106 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
110 $(CC
) -c
$(CFLAGS
) $(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) $<
112 BFD_H
=$(INCDIR
)/bfd.h
114 # C source files that correspond to .o's.
115 CFILES
= libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \
116 coff-i386.c aout64.c aout32.c sunos.c demo64.c coff-i960.c srec.c tekhex.c \
117 oasys.c ieee.c coff-m68k.c coff-a29k.c coff-rs6000.c coff-msym.c \
118 format.c section.c core.c syms.c stab-syms.c reloc.c init.c ctor.c \
119 seclet.c coff-m88k.c coff-mips.c trad-core.c newsos3.c i386aout.c \
120 i386linux.c bout.c elf.c \
121 cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c cpu-m88k.c cpu-vax.c \
122 cpu-mips.c cpu-a29k.c cpu-i386.c cpu-rs6000.c coff-h8300.c hppa.c \
123 cpu-hppa.c coff-we32k.c cpu-we32k.c \
124 sparc-opc.c opc-i960.c
126 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
129 @
$(MAKE
) subdir_do DO
=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
136 @
$(MAKE
) subdir_do DO
=info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
139 @
$(MAKE
) subdir_do DO
=clean-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
142 @
$(MAKE
) subdir_do DO
=install-info
"DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
144 # HDEPFILES comes from the host config; TDEPFILES from the target config.
145 OFILES
= $(BFD_LIBS
) $(BFD_BACKENDS
) $(BFD_MACHINES
) $(HDEPFILES
) $(TDEPFILES
)
147 $(TARGETLIB
): $(OFILES
)
149 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
150 $(RANLIB
) $(TARGETLIB
)
152 # When compiling archures.c and targets.c, supply the default target
153 # info from configure.
157 $(CC
) $(CFLAGS
) -c
$(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
159 archures.o
: archures.c
160 $(CC
) $(CFLAGS
) -c
$(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) -DMINIMIZE
=$(MINIMIZE
) $(TDEFAULTS
) $<
163 @for i in
$(DODIRS
); do \
164 if
[ -d .
/$$i ] ; then \
166 $(MAKE
) $(FLAGS_TO_PASS
) $(DO
)) ; then true
; \
174 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
177 rm -f
*.o
*~ core
*.E
*.p
*.ip aout-params.h gen-aout
178 do_clean
: do_mostlyclean
:
180 do_distclean
: do_clean
181 rm -f Makefile config.status
182 do_realclean
: do_distclean
184 mostlyclean: do_mostlyclean
185 $(MAKE
) subdir_do DO
=mostlyclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
187 $(MAKE
) subdir_do DO
=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
188 distclean: do_distclean
189 $(MAKE
) subdir_do DO
=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
190 clobber realclean: do_readlclean
191 $(MAKE
) subdir_do DO
=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
193 # Mark everything as depending on config.status, since the timestamp on
194 # sysdep.h might actually move backwards if we reconfig and relink it
195 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
196 RECONFIG
= config.status
197 $(BFD_LIBS
): libbfd.h
$(BFD_H
) $(RECONFIG
)
198 $(BFD_MACHINES
): libbfd.h
$(BFD_H
) $(RECONFIG
)
199 $(BFD_BACKENDS
): libbfd.h
$(BFD_H
) $(RECONFIG
)
200 $(OPTIONAL_BACKENDS
): libbfd.h
$(BFD_H
) $(RECONFIG
)
202 # Get around a Sun Make bug in SunOS 4.1.1 with VPATH
203 cpu-i386.o
:cpu-i386.c
206 #suppress 65 on bfd_map_over_sections
207 #suppress 66 on bfd_map_over_sections
208 #suppress 67 on bfd_map_over_sections
209 #suppress 68 on bfd_map_over_sections
210 #suppress 69 on bfd_map_over_sections
211 #suppress 70 on bfd_map_over_sections
212 #suppress 110 in bfd_map_over_sections
213 #suppress 112 in bfd_map_over_sections
215 #suppress 590 in swap_exec_header
216 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
217 #suppress 590 in bfd_dont_truncate_arname
218 #suppress 590 on ignore
219 #suppress 590 on abfd
220 #setopt load_flags $(CFLAGS)
224 #-----------------------------------------------------------------------------
225 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
227 # 'VERSION' file must be present and contain a string of the form "x.y"
228 #-----------------------------------------------------------------------------
232 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
235 # This target should be invoked before building a new release.
236 # 'VERSION' file must be present and contain a string of the form "x.y"
240 MAJ
=`sed 's/\..*//' VERSION` ; \
241 MIN
=`sed 's/.*\.//' VERSION` ; \
242 V
=$$MAJ.
`expr $$MIN + 1` ; \
244 echo
$$V >VERSION
; \
247 # Dummy target to force execution of dependent targets.
252 -parent
=`echo $(libdir)|sed -e 's@/[^/]*$$@@'`; \
253 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
254 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; fi
255 $(INSTALL_DATA
) libbfd.a
$(libdir)/libbfd.a
256 $(RANLIB
) $(libdir)/libbfd.a
257 -parent
=`echo $(includedir)|sed -e 's@/[^/]*$$@@'`; \
258 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
259 -if
[ -d
$(includedir) ] ; then true
; else mkdir
$(includedir) ; fi
260 $(INSTALL_DATA
) $(INCDIR
)/bfd.h
$(includedir)/bfd.h
261 -if
[ -z
"$(oldincludedir)" ] ; then true
; else if
[ -d
$(oldincludedir) ] ; then true
; else mkdir
$(oldincludedir) ; fi
; $(INSTALL_DATA
) $(INCDIR
)/bfd.h
$(oldincludedir)/bfd.h
; fi
262 @
$(MAKE
) subdir_do DO
=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS
)
264 # Target to uncomment host-specific lines in this makefile. Such lines must
265 # have the following string beginning in column 1: #__<hostname>__#
266 # Original Makefile is backed up as 'Makefile.old'.
268 # Invoke with: make make HOST=xxx
271 -@if
test $(HOST
)x
= x
; then \
272 echo
'\aSpecify "make make HOST=???"'; \
275 grep
-s
"^#The next line was generated by 'make make'" Makefile
; \
276 if
test $$?
= 0 ; then \
277 echo
"\aMakefile has already been processed with 'make make'";\
280 mv
-f Makefile Makefile.old
; \
281 echo
"#The next line was generated by 'make make'" >Makefile
; \
282 echo
"HOST=$(HOST)" >>Makefile
; \
284 sed
"s/^#__$(HOST)__#//" < Makefile.old
>>Makefile
286 Makefile
: $(srcdir)/Makefile.in
$(host_makefile_frag
) $(target_makefile_frag
)
287 $(SHELL
) .
/config.status
292 host-aout.o
: Makefile
294 # The following program can be used to generate a simple config file
295 # which can be folded into an h-XXX file for a new host, with some editing.
296 aout-params.h
: gen-aout
297 .
/gen-aout
> aout-params.h
298 gen-aout
: $(srcdir)/gen-aout.c Makefile
299 $(CC
) -o gen-aout
$(CFLAGS
) $(LFLAGS
) $(srcdir)/gen-aout.c
302 (cd
$(docdir
); $(MAKE
) protos
$(FLAGS_TO_PASS
))
303 # Could really use a "copy-if-change"...
304 cp
$(docdir
)/bfd.h bfd.h-new
305 $(srcdir)/..
/move-if-change bfd.h-new
$(BFD_H
)
306 cp
$(docdir
)/libbfd.h libbfd.h-new
307 $(srcdir)/..
/move-if-change libbfd.h-new
$(srcdir)/libbfd.h
308 cp
$(docdir
)/libcoff.h libcoff.h-new
309 $(srcdir)/..
/move-if-change libcoff.h-new
$(srcdir)/libcoff.h
312 ( cd
$(docdir
); $(MAKE
) bfd.
info $(FLAGS_TO_PASS
))
315 (cd
$(docdir
); $(MAKE
) bfd.
dvi $(FLAGS_TO_PASS
))
318 (cd
$(docdir
); $(MAKE
) bfd.ps
$(FLAGS_TO_PASS
))
320 # What appears below is generated by a hacked mkdep using gcc -MM.
322 # DO NOT DELETE THIS LINE -- mkdep uses it.
323 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
325 libbfd.o
: libbfd.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
326 opncls.o
: opncls.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
327 bfd.o
: bfd.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
328 archive.o
: archive.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
329 $(INCDIR
)/aout
/ar.h
$(INCDIR
)/aout
/ranlib.h
330 targets.o
: targets.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
331 cache.o
: cache.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
332 archures.o
: archures.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h
334 aout32.o
: aout32.c aoutx.h
$(INCDIR
)/bfd.h
$(INCDIR
)/ansidecl.h \
335 $(INCDIR
)/obstack.h libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h \
336 $(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
337 sunos.o
: sunos.c aoutf1.h
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h \
338 libaout.h libbfd.h
$(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h \
339 $(INCDIR
)/aout
/stab.def
$(INCDIR
)/aout
/ar.h
342 srec.o
: srec.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h
343 oasys.o
: oasys.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
344 $(INCDIR
)/oasys.h liboasys.h
345 ieee.o
: ieee.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
346 $(INCDIR
)/ieee.h libieee.h
347 coff-h8300.o
: coff-h8300.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
348 $(INCDIR
)/coff
/h8300.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h
349 coff-a29k.o
: coff-a29k.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
350 $(INCDIR
)/coff
/a29k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h
351 coff-i386.o
: coff-i386.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
352 $(INCDIR
)/coff
/i386.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h
353 coff-i960.o
: coff-i960.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
354 $(INCDIR
)/coff
/i960.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h
355 coff-m68k.o
: coff-m68k.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
356 $(INCDIR
)/coff
/m68k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h
357 coff-m88k.o
: coff-m88k.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
358 $(INCDIR
)/coff
/m88k.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h
359 coff-mips.o
: coff-mips.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
360 $(INCDIR
)/coff
/mips.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h
361 coff-rs6000.o
: coff-rs6000.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
362 $(INCDIR
)/coff
/rs6000.h
$(INCDIR
)/coff
/internal.h libcoff.h coffcode.h
363 format.o
: format.c
$(INCDIR
)/bfd.h \
364 $(INCDIR
)/obstack.h libbfd.h
365 section.o
: section.c
$(INCDIR
)/bfd.h \
366 $(INCDIR
)/obstack.h libbfd.h
367 core.o
: core.c
$(INCDIR
)/bfd.h \
368 $(INCDIR
)/obstack.h libbfd.h
369 syms.o
: syms.c
$(INCDIR
)/bfd.h \
370 $(INCDIR
)/obstack.h libbfd.h
372 reloc.o
: reloc.c
$(INCDIR
)/bfd.h \
373 $(INCDIR
)/obstack.h libbfd.h
375 trad-core.o
: trad-core.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h \
378 coff-msym.o
: coff-msym.c
$(INCDIR
)/bfd.h
$(INCDIR
)/coff
/ecoff-ext.h \
379 $(INCDIR
)/coff
/sym.h
$(INCDIR
)/coff
/symconst.h
381 newsos3.o
: newsos3.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
382 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
383 $(INCDIR
)/aout
/ar.h libaout.h
384 i386aout.o
: i386aout.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
385 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
386 $(INCDIR
)/aout
/ar.h libaout.h
387 i386linux.o
: i386linux.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
388 $(INCDIR
)/aout
/aout64.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def \
389 $(INCDIR
)/aout
/ar.h libaout.h
390 bout.o
: bout.c
$(INCDIR
)/bfd.h
$(INCDIR
)/obstack.h libbfd.h \
391 $(INCDIR
)/bout.h
$(INCDIR
)/aout
/stab_gnu.h
$(INCDIR
)/aout
/stab.def libaout.h
393 sparc-opc.o
: sparc-opc.c
$(INCDIR
)/opcode
/sparc.h
395 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY