]> Git Repo - binutils.git/blame - bfd/Makefile.in
Remove -gas variants; GDB doesn't care. Cross-check with config/*.mh
[binutils.git] / bfd / Makefile.in
CommitLineData
3c8a3c56 1# Makefile template for Configure for the BFD library.
5868184b 2# Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
3c8a3c56
JG
3# Written by Cygnus Support.
4#
5# This file is part of BFD, the Binary File Descriptor library.
6#
7# This program is free software; you can redistribute it and/or modify
99a42820 8# it under the terms of the GNU General Public License as published by
3c8a3c56
JG
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
99a42820
RP
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.
3c8a3c56 16#
99a42820 17# You should have received a copy of the GNU General Public License
3c8a3c56
JG
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
99a42820 20
99a42820 21srcdir = .
fde8212e
RP
22
23prefix = /usr/local
24
5868184b
FF
25exec_prefix = $(prefix)
26bindir = $(exec_prefix)/bin
27libdir = $(exec_prefix)/lib
28
fde8212e 29datadir = $(prefix)/lib
5868184b 30mandir = $(prefix)/man
fde8212e
RP
31man1dir = $(mandir)/man1
32man2dir = $(mandir)/man2
33man3dir = $(mandir)/man3
34man4dir = $(mandir)/man4
35man5dir = $(mandir)/man5
36man6dir = $(mandir)/man6
37man7dir = $(mandir)/man7
38man8dir = $(mandir)/man8
39man9dir = $(mandir)/man9
5868184b 40infodir = $(prefix)/info
fde8212e 41includedir = $(prefix)/include
5868184b 42oldincludedir =
6bb4c923 43docdir = $(srcdir)/doc
fde8212e
RP
44
45SHELL = /bin/sh
46
47INSTALL = install -c
48INSTALL_PROGRAM = $(INSTALL)
49INSTALL_DATA = $(INSTALL)
50
1b494bfa 51AR = ar
5868184b 52AR_FLAGS = qc
6e491a87 53CFLAGS = -g
fde8212e
RP
54BISON = bison
55MAKEINFO = makeinfo
56RANLIB = ranlib
57
d6a554ae 58INCDIR = $(srcdir)/../include
40773f7f 59CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
a5c6b4b3 60DEP = mkdep
12e7087f 61
f259290f 62SUBDIRS = doc
12e7087f 63
99a42820 64
7de245d3
PB
65# Change this (to MINIMIZE=1) to save space in executables.
66# Currently, all this does is control the target_vector in targets.c.
67MINIMIZE=0
68
5176a6bc 69TARGETLIB = libbfd.a
99a42820
RP
70
71
726cc6ef 72BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
d01cd8fc 73 archures.o core.o section.o format.o syms.o reloc.o init.o ctor.o seclet.o
63ffe5ef 74
6bb4c923
KR
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.
78OPC = opc-sparc.o
79
cbdc7909 80BFD_MACHINES = cpu-h8300.o cpu-i960.o cpu-sparc.o cpu-m68k.o cpu-m88k.o \
6bb4c923 81 cpu-vax.o cpu-mips.o cpu-a29k.o cpu-i386.o cpu-rs6000.o cpu-hppa.o \
98c0c56d 82 cpu-z8k.o cpu-we32k.o \
6bb4c923 83 $(OPC)
99a42820 84
69e0d34d 85BFD_BACKENDS = oasys.o ieee.o srec.o elf.o stab-syms.o\
b7de6963 86 aout64.o aout32.o demo64.o sunos.o newsos3.o i386aout.o bout.o \
156e3852 87 coff-i960.o coff-a29k.o coff-m68k.o coff-i386.o coff-m88k.o \
98c0c56d
BK
88 coff-mips.o coff-rs6000.o coff-h8300.o coff-msym.o hppa.o i386linux.o \
89 coff-z8k.o coff-we32k.o
63ffe5ef 90
c6e7b0ed 91OPTIONAL_BACKENDS = trad-core.o
99a42820 92
22e98743
SC
93#### host and target dependent Makefile fragments come in here.
94###
95
98c0c56d
BK
96FLAGS_TO_PASS = \
97 "against=$(against)" \
98 "AR=$(AR)" \
99 "AR_FLAGS=$(AR_FLAGS)" \
100 "CC=$(CC)" \
101 "CFLAGS=$(CFLAGS)" \
102 "RANLIB=$(RANLIB)" \
103 "MAKEINFO=$(MAKEINFO)" \
104 "INSTALL=$(INSTALL)" \
105 "INSTALL_DATA=$(INSTALL_DATA)" \
106 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
107 "BISON=$(BISON)"
108
6e491a87 109.c.o:
892205bc 110 $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
6e491a87 111
99a42820 112BFD_H=$(INCDIR)/bfd.h
99a42820
RP
113
114# C source files that correspond to .o's.
115CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \
6e491a87 116 coff-i386.c aout64.c aout32.c sunos.c demo64.c coff-i960.c srec.c tekhex.c \
5868184b 117 oasys.c ieee.c coff-m68k.c coff-a29k.c coff-rs6000.c coff-msym.c \
6bb4c923
KR
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 \
e3c01e92
SG
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 \
98c0c56d 123 cpu-hppa.c coff-we32k.c cpu-we32k.c \
6bb4c923 124 opc-sparc.c opc-i960.c
63ffe5ef 125
5176a6bc
RP
126STAGESTUFF = $(TARGETLIB) $(OFILES)
127
128all: $(TARGETLIB)
98c0c56d 129 @$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
5176a6bc 130
30662ca6
RP
131.NOEXPORT:
132
5868184b
FF
133check:
134
fde8212e 135info: force
98c0c56d 136 @$(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
2090ba83 137
5868184b 138clean-info:
98c0c56d 139 @$(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
5868184b 140
2090ba83 141install-info: force
98c0c56d 142 @$(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
2090ba83 143
6a469027
JG
144# HDEPFILES comes from the host config; TDEPFILES from the target config.
145OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(BFD_MACHINES) $(HDEPFILES) $(TDEPFILES)
5176a6bc
RP
146
147$(TARGETLIB): $(OFILES)
148 rm -f $(TARGETLIB)
1b494bfa
RP
149 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
150 $(RANLIB) $(TARGETLIB)
5176a6bc 151
98c0c56d
BK
152# When compiling archures.c and targets.c, supply the default target
153# info from configure.
154
155
4a29cb1e 156targets.o: targets.c
6e491a87 157 $(CC) $(CFLAGS) -c $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) -DMINIMIZE=$(MINIMIZE) $(TDEFAULTS) $<
4a29cb1e 158
98c0c56d
BK
159archures.o: archures.c
160 $(CC) $(CFLAGS) -c $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) -DMINIMIZE=$(MINIMIZE) $(TDEFAULTS) $<
161
f259290f 162subdir_do: force
6e491a87 163 @for i in $(DODIRS); do \
5868184b
FF
164 if [ -d ./$$i ] ; then \
165 if (cd ./$$i; \
98c0c56d 166 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
f259290f
RP
167 else exit 1 ; fi ; \
168 else true ; fi ; \
169 done
170
99a42820
RP
171tags etags: TAGS
172
5176a6bc 173TAGS: force
453063fe 174 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
99a42820
RP
175
176clean:
d01cd8fc 177 rm -f *.[oa] *~ core *.E *.p *.ip aout-params.h gen-aout
98c0c56d 178 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
99a42820
RP
179
180clobber realclean: clean
181 rm -f libbfd.a TAGS
98c0c56d 182 $(MAKE) subdir_do DO=clobber "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
99a42820 183
23d44ec9
JG
184# Mark everything as depending on config.status, since the timestamp on
185# sysdep.h might actually move backwards if we reconfig and relink it
186# to a different hosts/h-xxx.h file. This will force a recompile anyway.
187RECONFIG = config.status
188$(BFD_LIBS): libbfd.h $(BFD_H) $(RECONFIG)
189$(BFD_MACHINES): libbfd.h $(BFD_H) $(RECONFIG)
190$(BFD_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG)
191$(OPTIONAL_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG)
99a42820 192
cbdc7909
JG
193# Get around a Sun Make bug in SunOS 4.1.1 with VPATH
194cpu-i386.o:cpu-i386.c
195
99a42820
RP
196saber:
197 #suppress 65 on bfd_map_over_sections
198 #suppress 66 on bfd_map_over_sections
199 #suppress 67 on bfd_map_over_sections
200 #suppress 68 on bfd_map_over_sections
201 #suppress 69 on bfd_map_over_sections
202 #suppress 70 on bfd_map_over_sections
203 #suppress 110 in bfd_map_over_sections
204 #suppress 112 in bfd_map_over_sections
205 #suppress 530
206 #suppress 590 in swap_exec_header
207 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
208 #suppress 590 in bfd_dont_truncate_arname
209 #suppress 590 on ignore
210 #suppress 590 on abfd
211 #setopt load_flags $(CFLAGS)
212 #load $(CFILES)
a5c6b4b3 213
99a42820
RP
214
215#-----------------------------------------------------------------------------
216# 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
217#
218# 'VERSION' file must be present and contain a string of the form "x.y"
219#-----------------------------------------------------------------------------
220
221ver960.c: FORCE
222 rm -f ver960.c
223 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
224
225
226# This target should be invoked before building a new release.
227# 'VERSION' file must be present and contain a string of the form "x.y"
228#
229roll:
230 @V=`cat VERSION` ; \
231 MAJ=`sed 's/\..*//' VERSION` ; \
232 MIN=`sed 's/.*\.//' VERSION` ; \
233 V=$$MAJ.`expr $$MIN + 1` ; \
234 rm -f VERSION ; \
235 echo $$V >VERSION ; \
236 echo Version $$V
237
238# Dummy target to force execution of dependent targets.
239#
5176a6bc 240force:
99a42820 241
99a42820 242install:
98c0c56d
BK
243 -parent=`echo $(libdir)|sed -e 's@/[^/]*$$@@'`; \
244 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
245 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
fde8212e
RP
246 $(INSTALL_DATA) libbfd.a $(libdir)/libbfd.a
247 $(RANLIB) $(libdir)/libbfd.a
98c0c56d
BK
248 -parent=`echo $(includedir)|sed -e 's@/[^/]*$$@@'`; \
249 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
250 -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
fde8212e 251 $(INSTALL_DATA) $(INCDIR)/bfd.h $(includedir)/bfd.h
98c0c56d
BK
252 -if [ -z "$(oldincludedir)" ] ; then true ; else if [ -d $(oldincludedir) ] ; then true ; else mkdir $(oldincludedir) ; fi ; $(INSTALL_DATA) $(INCDIR)/bfd.h $(oldincludedir)/bfd.h ; fi
253 @$(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
99a42820
RP
254
255# Target to uncomment host-specific lines in this makefile. Such lines must
256# have the following string beginning in column 1: #__<hostname>__#
257# Original Makefile is backed up as 'Makefile.old'.
258#
259# Invoke with: make make HOST=xxx
260#
261make:
262 -@if test $(HOST)x = x ; then \
263 echo '\aSpecify "make make HOST=???"'; \
264 exit 1; \
265 fi ; \
266 grep -s "^#The next line was generated by 'make make'" Makefile; \
267 if test $$? = 0 ; then \
268 echo "\aMakefile has already been processed with 'make make'";\
269 exit 1; \
270 fi ; \
271 mv -f Makefile Makefile.old; \
272 echo "#The next line was generated by 'make make'" >Makefile ; \
273 echo "HOST=$(HOST)" >>Makefile ; \
274 echo >>Makefile ; \
275 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
276
b7de6963 277Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 278 $(SHELL) ./config.status
a5c6b4b3
SC
279
280dep: $(CFILES)
281 mkdep $(CFLAGS) $?
6f715d66 282
5868184b 283host-aout.o: Makefile
6f715d66 284
5868184b
FF
285# The following program can be used to generate a simple config file
286# which can be folded into an h-XXX file for a new host, with some editing.
d01cd8fc
FF
287aout-params.h: gen-aout
288 ./gen-aout > aout-params.h
5868184b
FF
289gen-aout: $(srcdir)/gen-aout.c Makefile
290 $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c
6f715d66 291
12e7087f 292headers:
98c0c56d 293 (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS))
6bb4c923
KR
294 # Could really use a "copy-if-change"...
295 cp $(docdir)/bfd.h bfd.h-new
296 $(srcdir)/../move-if-change bfd.h-new $(BFD_H)
297 cp $(docdir)/libbfd.h libbfd.h-new
298 $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
299 cp $(docdir)/libcoff.h libcoff.h-new
300 $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
12e7087f
JG
301
302bfd.info:
98c0c56d 303 ( cd $(docdir); $(MAKE) bfd.info $(FLAGS_TO_PASS))
12e7087f
JG
304
305bfd.dvi:
98c0c56d 306 (cd $(docdir); $(MAKE) bfd.dvi $(FLAGS_TO_PASS))
12e7087f
JG
307
308bfd.ps:
98c0c56d 309 (cd $(docdir); $(MAKE) bfd.ps $(FLAGS_TO_PASS))
12e7087f
JG
310
311# What appears below is generated by a hacked mkdep using gcc -MM.
312
313# DO NOT DELETE THIS LINE -- mkdep uses it.
314# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
315
a26878d1
RP
316libbfd.o : libbfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
317opncls.o : opncls.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
318bfd.o : bfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
319archive.o : archive.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
fde8212e 320 $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h
a26878d1
RP
321targets.o : targets.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
322cache.o : cache.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
323archures.o : archures.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h
12e7087f 324aout64.o : aout64.c
a26878d1 325aout32.o : aout32.c aoutx.h $(INCDIR)/bfd.h $(INCDIR)/ansidecl.h \
fde8212e
RP
326 $(INCDIR)/obstack.h libaout.h libbfd.h $(INCDIR)/aout/aout64.h \
327 $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
a26878d1 328sunos.o : sunos.c aoutf1.h $(INCDIR)/bfd.h $(INCDIR)/obstack.h \
fde8212e
RP
329 libaout.h libbfd.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
330 $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
12e7087f 331demo64.o : demo64.c
3b4f1a5d 332
a26878d1
RP
333srec.o : srec.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
334oasys.o : oasys.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
335 $(INCDIR)/oasys.h liboasys.h
336ieee.o : ieee.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
337 $(INCDIR)/ieee.h libieee.h
3b4f1a5d 338coff-h8300.o: coff-h8300.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
fde8212e 339 $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
d01cd8fc
FF
340coff-a29k.o: coff-a29k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
341 $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
342coff-i386.o: coff-i386.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
343 $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
344coff-i960.o: coff-i960.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
345 $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
346coff-m68k.o: coff-m68k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
347 $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
348coff-m88k.o: coff-m88k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
349 $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
350coff-mips.o: coff-mips.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
351 $(INCDIR)/coff/mips.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
352coff-rs6000.o: coff-rs6000.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
353 $(INCDIR)/coff/rs6000.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
23d44ec9 354format.o : format.c $(INCDIR)/bfd.h \
a26878d1 355 $(INCDIR)/obstack.h libbfd.h
23d44ec9 356section.o : section.c $(INCDIR)/bfd.h \
a26878d1 357 $(INCDIR)/obstack.h libbfd.h
23d44ec9 358core.o : core.c $(INCDIR)/bfd.h \
a26878d1 359 $(INCDIR)/obstack.h libbfd.h
23d44ec9 360syms.o : syms.c $(INCDIR)/bfd.h \
a26878d1 361 $(INCDIR)/obstack.h libbfd.h
7de245d3 362syms.o : stab-syms.c
23d44ec9 363reloc.o : reloc.c $(INCDIR)/bfd.h \
a26878d1 364 $(INCDIR)/obstack.h libbfd.h
3b4f1a5d 365
a26878d1 366trad-core.o : trad-core.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h \
12e7087f 367 libbfd.h libaout.h
5868184b
FF
368
369coff-msym.o: coff-msym.c $(INCDIR)/bfd.h $(INCDIR)/coff/ecoff-ext.h \
370 $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h
371
a26878d1 372newsos3.o : newsos3.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
fde8212e
RP
373 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
374 $(INCDIR)/aout/ar.h libaout.h
b7de6963 375i386aout.o : i386aout.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
fde8212e
RP
376 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
377 $(INCDIR)/aout/ar.h libaout.h
6bb4c923
KR
378i386linux.o : i386linux.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
379 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
380 $(INCDIR)/aout/ar.h libaout.h
a26878d1 381bout.o : bout.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
6bb4c923
KR
382 $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
383
384opc-sparc.o : opc-sparc.c $(INCDIR)/opcode/sparc.h
12e7087f
JG
385
386# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
a26878d1 387
This page took 0.141415 seconds and 4 git commands to generate.