Remove refs to ../include/sysdep.h.
[binutils-gdb.git] / bfd / Makefile.in
1 # Makefile template for Configure for the BFD library.
2 # Copyright (C) 1990, 1991 Free Software Foundation, Inc.
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
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.
11 #
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.
16 #
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.
20
21 # $Id$
22
23 srcdir = .
24 destdir = /usr/local
25 libdir = $(destdir)/H-$(host_alias)/T-independent/lib
26 docdir = $(srcdir)/doc
27
28 RANLIB = ranlib
29 AR = ar
30 AR_FLAGS = clq
31 INCDIR = $(srcdir)/../include
32 CSEARCH = -I. -I$(INCDIR)
33 DEP = mkdep
34
35
36 #### host and target dependent Makefile fragments come in here.
37 ###
38
39 TARGETLIB = libbfd.a
40 CFLAGS = -g $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) # -DINTEL960VERSION
41
42
43 BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
44 archures.o core.o section.o format.o syms.o reloc.o init.o
45
46 BFD_MACHINES=cpu-h8300.o cpu-i960.o cpu-sparc.o cpu-m68k.o cpu-m88k.o \
47 cpu-vax.o cpu-mips.o cpu-a29k.o cpu-i386.o
48
49 BFD_BACKENDS = oasys.o ieee.o srec.o \
50 aout64.o aout32.o demo64.o sunos.o newsos3.o i386aout.o bout.o \
51 icoff.o amdcoff.o m68kcoff.o i386coff.o m88k-bcs.o ecoff.o elf.o
52
53
54 OPTIONAL_BACKENDS = trad-core.o
55
56 BFD_H=$(INCDIR)/bfd.h
57
58 # C source files that correspond to .o's.
59 CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \
60 i386coff.c aout64.c aout32.c sunos.c demo64.c icoff.c srec.c \
61 oasys.c ieee.c m68kcoff.c amdcoff.c \
62 format.c section.c core.c syms.c reloc.c init.c \
63 m88k-bcs.c ecoff.c trad-core.c newsos3.c i386aout.c bout.c elf.c \
64 cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c cpu-m88k.c \
65 cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.o
66
67 STAGESTUFF = $(TARGETLIB) $(OFILES)
68
69 all: $(TARGETLIB)
70
71 # HDEPFILES comes from the host config; TDEPFILES from the target config.
72 OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(BFD_MACHINES) $(HDEPFILES) $(TDEPFILES)
73
74 $(TARGETLIB): $(OFILES)
75 rm -f $(TARGETLIB)
76 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
77 $(RANLIB) $(TARGETLIB)
78
79 stage1: force
80 - mkdir stage1
81 - mv -f $(STAGESTUFF) stage1
82
83 stage2: force
84 - mkdir stage2
85 - mv -f $(STAGESTUFF) stage2
86
87 stage3: force
88 - mkdir stage3
89 - mv -f $(STAGESTUFF) stage3
90
91 against=stage2
92
93 comparison: force
94 for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done
95
96 de-stage1: force
97 - (cd stage1 ; mv -f $(STAGESTUFF) ..)
98 - rmdir stage1
99
100 de-stage2: force
101 - (cd stage2 ; mv -f $(STAGESTUFF) ..)
102 - rmdir stage2
103
104 de-stage3: force
105 - (cd stage3 ; mv -f $(STAGESTUFF) ..)
106 - rmdir stage3
107
108 tags etags: TAGS
109
110 TAGS: force
111 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
112
113 clean:
114 rm -f *.[oa] *~ core *.E *.p *.ip
115
116 clobber realclean: clean
117 rm -f libbfd.a TAGS
118
119 # Mark everything as depending on config.status, since the timestamp on
120 # sysdep.h might actually move backwards if we reconfig and relink it
121 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
122 RECONFIG = config.status
123 $(BFD_LIBS): libbfd.h $(BFD_H) $(RECONFIG)
124 $(BFD_MACHINES): libbfd.h $(BFD_H) $(RECONFIG)
125 $(BFD_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG)
126 $(OPTIONAL_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG)
127
128 saber:
129 #suppress 65 on bfd_map_over_sections
130 #suppress 66 on bfd_map_over_sections
131 #suppress 67 on bfd_map_over_sections
132 #suppress 68 on bfd_map_over_sections
133 #suppress 69 on bfd_map_over_sections
134 #suppress 70 on bfd_map_over_sections
135 #suppress 110 in bfd_map_over_sections
136 #suppress 112 in bfd_map_over_sections
137 #suppress 530
138 #suppress 590 in swap_exec_header
139 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
140 #suppress 590 in bfd_dont_truncate_arname
141 #suppress 590 on ignore
142 #suppress 590 on abfd
143 #setopt load_flags $(CFLAGS)
144 #load $(CFILES)
145
146
147 #-----------------------------------------------------------------------------
148 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
149 #
150 # 'VERSION' file must be present and contain a string of the form "x.y"
151 #-----------------------------------------------------------------------------
152
153 ver960.c: FORCE
154 rm -f ver960.c
155 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
156
157
158 # This target should be invoked before building a new release.
159 # 'VERSION' file must be present and contain a string of the form "x.y"
160 #
161 roll:
162 @V=`cat VERSION` ; \
163 MAJ=`sed 's/\..*//' VERSION` ; \
164 MIN=`sed 's/.*\.//' VERSION` ; \
165 V=$$MAJ.`expr $$MIN + 1` ; \
166 rm -f VERSION ; \
167 echo $$V >VERSION ; \
168 echo Version $$V
169
170 # Dummy target to force execution of dependent targets.
171 #
172 force:
173
174 install:
175 cp libbfd.a $(libdir)/libbfd.a.new
176 $(RANLIB) $(libdir)/libbfd.a.new
177 mv -f $(libdir)/libbfd.a.new $(libdir)/libbfd.a
178
179 # Target to uncomment host-specific lines in this makefile. Such lines must
180 # have the following string beginning in column 1: #__<hostname>__#
181 # Original Makefile is backed up as 'Makefile.old'.
182 #
183 # Invoke with: make make HOST=xxx
184 #
185 make:
186 -@if test $(HOST)x = x ; then \
187 echo '\aSpecify "make make HOST=???"'; \
188 exit 1; \
189 fi ; \
190 grep -s "^#The next line was generated by 'make make'" Makefile; \
191 if test $$? = 0 ; then \
192 echo "\aMakefile has already been processed with 'make make'";\
193 exit 1; \
194 fi ; \
195 mv -f Makefile Makefile.old; \
196 echo "#The next line was generated by 'make make'" >Makefile ; \
197 echo "HOST=$(HOST)" >>Makefile ; \
198 echo >>Makefile ; \
199 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
200
201 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
202 $(SHELL) ./config.status
203
204 dep: $(CFILES)
205 mkdep $(CFLAGS) $?
206
207
208
209 headers:
210 cp $(srcdir)/bfd-in.h $(docdir)
211 cp $(srcdir)/libbfd-in.h $(docdir)
212 cp $(srcdir)/libcoff-in.h $(docdir)
213 (cd $(docdir); $(MAKE) protos)
214 # Rebuild prototypes in bfd.h
215 cp $(docdir)/bfd.h $(BFD_H)
216 cp $(docdir)/libbfd.h $(srcdir)/libbfd.h
217 cp $(docdir)/libcoff.h $(srcdir)/libcoff.h
218 rm -f $(docdir)/bfd-in.h
219 rm -f $(docdir)/libbfd-in.h
220 rm -f $(docdir)/libcoff-in.h
221
222 bfd.info:
223 ( cd $(docdir); $(MAKE) bfd.info)
224
225 bfd.dvi:
226 (cd $(docdir); $(MAKE) bfd.dvi)
227
228 bfd.ps:
229 (cd $(docdir); $(MAKE) bfd.ps)
230
231 # What appears below is generated by a hacked mkdep using gcc -MM.
232
233 # DO NOT DELETE THIS LINE -- mkdep uses it.
234 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
235
236 libbfd.o : libbfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
237 opncls.o : opncls.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
238 bfd.o : bfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
239 archive.o : archive.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
240 $(INCDIR)/ar.h $(INCDIR)/ranlib.h
241 targets.o : targets.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
242 cache.o : cache.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
243 archures.o : archures.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h
244 i386coff.o : i386coff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
245 $(INCDIR)/i386coff.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h
246 aout64.o : aout64.c
247 aout32.o : aout32.c aoutx.h $(INCDIR)/bfd.h $(INCDIR)/ansidecl.h \
248 $(INCDIR)/obstack.h libaout.h libbfd.h $(INCDIR)/aout64.h \
249 $(INCDIR)/stab.gnu.h $(INCDIR)/stab.def $(INCDIR)/ar.h
250 sunos.o : sunos.c aoutf1.h $(INCDIR)/bfd.h $(INCDIR)/obstack.h \
251 libaout.h libbfd.h $(INCDIR)/aout64.h $(INCDIR)/stab.gnu.h \
252 $(INCDIR)/stab.def $(INCDIR)/ar.h
253 demo64.o : demo64.c
254 icoff.o : icoff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
255 $(INCDIR)/intel-coff.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h
256 srec.o : srec.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
257 oasys.o : oasys.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
258 $(INCDIR)/oasys.h liboasys.h
259 ieee.o : ieee.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
260 $(INCDIR)/ieee.h libieee.h
261 m68kcoff.o : m68kcoff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
262 $(INCDIR)/m68kcoff.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h
263 amdcoff.o : amdcoff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
264 $(INCDIR)/amdcoff.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h
265 format.o : format.c $(INCDIR)/bfd.h \
266 $(INCDIR)/obstack.h libbfd.h
267 section.o : section.c $(INCDIR)/bfd.h \
268 $(INCDIR)/obstack.h libbfd.h
269 core.o : core.c $(INCDIR)/bfd.h \
270 $(INCDIR)/obstack.h libbfd.h
271 syms.o : syms.c $(INCDIR)/bfd.h \
272 $(INCDIR)/obstack.h libbfd.h
273 reloc.o : reloc.c $(INCDIR)/bfd.h \
274 $(INCDIR)/obstack.h libbfd.h
275 m88k-bcs.o : m88k-bcs.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
276 $(INCDIR)/m88k-bcs.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h
277 ecoff.o : ecoff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
278 $(INCDIR)/ecoff.h $(INCDIR)/internalcoff.h libcoff.h trad-core.h \
279 coffcode.h
280 trad-core.o : trad-core.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h \
281 libbfd.h libaout.h
282 newsos3.o : newsos3.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
283 $(INCDIR)/aout64.h $(INCDIR)/stab.gnu.h $(INCDIR)/stab.def \
284 $(INCDIR)/ar.h libaout.h
285 i386aout.o : i386aout.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
286 $(INCDIR)/aout64.h $(INCDIR)/stab.gnu.h $(INCDIR)/stab.def \
287 $(INCDIR)/ar.h libaout.h
288 bout.o : bout.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
289 $(INCDIR)/bout.h $(INCDIR)/stab.gnu.h $(INCDIR)/stab.def libaout.h
290
291 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
292