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