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