* oasys.c (oasys_write_object_contents): Lint.
[deliverable/binutils-gdb.git] / bfd / Makefile.in
1 # Makefile template for Configure for the BFD library.
2 # Copyright (C) 1990, 1991, 1992 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 srcdir = .
22
23 prefix = /usr/local
24
25 exec_prefix = $(prefix)
26 bindir = $(exec_prefix)/bin
27 libdir = $(exec_prefix)/lib
28
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
42 oldincludedir =
43 docdir = doc
44
45 SHELL = /bin/sh
46
47 INSTALL = install -c
48 INSTALL_PROGRAM = $(INSTALL)
49 INSTALL_DATA = $(INSTALL)
50
51 AR = ar
52 AR_FLAGS = rc
53 CFLAGS = -g
54 BISON = bison
55 MAKEINFO = makeinfo
56 RANLIB = ranlib
57
58 INCDIR = $(srcdir)/../include
59 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
60 DEP = mkdep
61
62 SUBDIRS = doc
63
64
65 # Change this (to MINIMIZE=1) to save space in executables.
66 # Currently, all this does is control the target_vector in targets.c.
67 MINIMIZE=0
68
69 TARGETLIB = libbfd.a
70
71
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 \
74 ctor.o seclet.o coffgen.o reloc16.o
75
76 BFD_MACHINES = cpu-h8300.o cpu-i960.o cpu-sparc.o cpu-m68k.o cpu-m88k.o \
77 cpu-vax.o cpu-mips.o cpu-a29k.o cpu-i386.o cpu-rs6000.o cpu-hppa.o \
78 cpu-z8k.o cpu-we32k.o
79
80 BFD_BACKENDS = oasys.o ieee.o srec.o elf.o stab-syms.o\
81 aout64.o aout32.o demo64.o sunos.o newsos3.o i386aout.o bout.o \
82 aout-adobe.o \
83 coff-i960.o coff-a29k.o coff-m68k.o coff-i386.o coff-m88k.o \
84 coff-mips.o coff-rs6000.o coff-h8300.o coff-msym.o hppa.o i386linux.o \
85 coff-z8k.o coff-we32k.o i386bsd.o
86
87 OPTIONAL_BACKENDS = trad-core.o
88
89 #### host and target dependent Makefile fragments come in here.
90 ###
91
92 FLAGS_TO_PASS = \
93 "prefix=$(prefix)" \
94 "exec_prefix=$(exec_prefix)" \
95 "against=$(against)" \
96 "AR=$(AR)" \
97 "AR_FLAGS=$(AR_FLAGS)" \
98 "CC=$(CC)" \
99 "CFLAGS=$(CFLAGS)" \
100 "RANLIB=$(RANLIB)" \
101 "MAKEINFO=$(MAKEINFO)" \
102 "INSTALL=$(INSTALL)" \
103 "INSTALL_DATA=$(INSTALL_DATA)" \
104 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
105 "BISON=$(BISON)"
106
107 .c.o:
108 $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
109
110 BFD_H=$(INCDIR)/bfd.h
111
112 # C source files that correspond to .o's.
113 CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c \
114 archures.c coff-i386.c aout64.c aout32.c sunos.c demo64.c \
115 coff-i960.c srec.c tekhex.c oasys.c ieee.c coff-m68k.c \
116 coff-a29k.c coff-rs6000.c coff-msym.c coffgen.c format.c \
117 section.c core.c syms.c stab-syms.c reloc.c init.c ctor.c \
118 seclet.c coff-m88k.c coff-mips.c trad-core.c newsos3.c \
119 i386aout.c i386linux.c bout.c elf.c aout-adobe.c coff-we32k.c \
120 i386bsd.c cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c \
121 cpu-m88k.c cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.c \
122 cpu-rs6000.c coff-h8300.c hppa.c cpu-hppa.c cpu-we32k.c reloc16.c
123
124 STAGESTUFF = $(TARGETLIB) $(OFILES)
125
126 all: Makefile $(TARGETLIB)
127 @$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
128
129 .NOEXPORT:
130
131 check:
132
133 info dvi : force
134 @$(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
135
136 clean-info:
137 @$(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
138
139 install-info: force
140 @$(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
141
142 # HDEPFILES comes from the host config; TDEPFILES from the target config.
143 OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(BFD_MACHINES) $(HDEPFILES) $(TDEPFILES)
144
145 $(TARGETLIB): $(OFILES)
146 rm -f $(TARGETLIB)
147 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
148 $(RANLIB) $(TARGETLIB)
149
150 # When compiling archures.c and targets.c, supply the default target
151 # info from configure.
152
153
154 targets.o: targets.c
155 $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) -DMINIMIZE=$(MINIMIZE) $(TDEFAULTS) $<
156
157 archures.o: archures.c
158 $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) -DMINIMIZE=$(MINIMIZE) $(TDEFAULTS) $<
159
160 subdir_do: force
161 @for i in $(DODIRS); do \
162 if [ -d ./$$i ] ; then \
163 if (cd ./$$i; \
164 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
165 else exit 1 ; fi ; \
166 else true ; fi ; \
167 done
168
169 tags etags: TAGS
170
171 TAGS: force
172 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
173
174 do_mostlyclean:
175 rm -f *.o *~ core *.E *.p *.ip aout-params.h gen-aout
176 do_clean: do_mostlyclean
177 rm -f libbfd.a TAGS
178 do_distclean: do_clean
179 rm -f Makefile config.status sysdep.h
180 do_realclean: do_distclean
181
182 mostlyclean: do_mostlyclean
183 $(MAKE) subdir_do DO=mostlyclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
184 clean: do_clean
185 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
186 distclean:
187 $(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
188 make do_distclean
189 clobber realclean:
190 $(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
191 make do_realclean
192
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)
201
202 # Get around a Sun Make bug in SunOS 4.1.1 with VPATH
203 cpu-i386.o:cpu-i386.c
204 cpu-z8k.o: cpu-z8k.c
205 cpu-we32k.o: cpu-we32k.c
206
207 saber:
208 #suppress 65 on bfd_map_over_sections
209 #suppress 66 on bfd_map_over_sections
210 #suppress 67 on bfd_map_over_sections
211 #suppress 68 on bfd_map_over_sections
212 #suppress 69 on bfd_map_over_sections
213 #suppress 70 on bfd_map_over_sections
214 #suppress 110 in bfd_map_over_sections
215 #suppress 112 in bfd_map_over_sections
216 #suppress 530
217 #suppress 590 in swap_exec_header
218 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
219 #suppress 590 in bfd_dont_truncate_arname
220 #suppress 590 on ignore
221 #suppress 590 on abfd
222 #setopt load_flags $(CFLAGS)
223 #load $(CFILES)
224
225
226 #-----------------------------------------------------------------------------
227 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
228 #
229 # 'VERSION' file must be present and contain a string of the form "x.y"
230 #-----------------------------------------------------------------------------
231
232 ver960.c: FORCE
233 rm -f ver960.c
234 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
235
236
237 # This target should be invoked before building a new release.
238 # 'VERSION' file must be present and contain a string of the form "x.y"
239 #
240 roll:
241 @V=`cat VERSION` ; \
242 MAJ=`sed 's/\..*//' VERSION` ; \
243 MIN=`sed 's/.*\.//' VERSION` ; \
244 V=$$MAJ.`expr $$MIN + 1` ; \
245 rm -f VERSION ; \
246 echo $$V >VERSION ; \
247 echo Version $$V
248
249 # Dummy target to force execution of dependent targets.
250 #
251 force:
252
253 install:
254 -parent=`echo $(libdir)|sed -e 's@/[^/]*$$@@'`; \
255 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
256 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
257 $(INSTALL_DATA) libbfd.a $(libdir)/libbfd.a
258 $(RANLIB) $(libdir)/libbfd.a
259 -parent=`echo $(includedir)|sed -e 's@/[^/]*$$@@'`; \
260 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
261 -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
262 # Install BFD include file, and others that it needs. Install them
263 # both in GCC's include directory, and in the system include dir
264 # if configured as $(oldincludedir) -- which it usually isnt.
265 $(INSTALL_DATA) $(INCDIR)/bfd.h $(includedir)/bfd.h
266 $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h
267 $(INSTALL_DATA) $(INCDIR)/obstack.h $(includedir)/obstack.h
268 -if [ -z "$(oldincludedir)" ] ; then true ; \
269 else if [ -d $(oldincludedir) ] ; then true ; \
270 else mkdir $(oldincludedir) ; \
271 fi ; \
272 $(INSTALL_DATA) $(INCDIR)/bfd.h $(oldincludedir)/bfd.h;\
273 $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(oldincludedir)/ansidecl.h;\
274 $(INSTALL_DATA) $(INCDIR)/obstack.h $(oldincludedir)/obstack.h;\
275 fi
276 @$(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS)
277
278
279 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
280 $(SHELL) ./config.status
281
282 dep: $(CFILES)
283 mkdep $(CFLAGS) $?
284
285 host-aout.o: Makefile
286
287 # The following program can be used to generate a simple config file
288 # which can be folded into an h-XXX file for a new host, with some editing.
289 aout-params.h: gen-aout
290 ./gen-aout > aout-params.h
291 gen-aout: $(srcdir)/gen-aout.c Makefile
292 $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c
293
294 headers:
295 (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS))
296 # Could really use a "copy-if-change"...
297 cp $(docdir)/bfd.h bfd.h-new
298 $(srcdir)/../move-if-change bfd.h-new $(BFD_H)
299 cp $(docdir)/libbfd.h libbfd.h-new
300 $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
301 cp $(docdir)/libcoff.h libcoff.h-new
302 $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
303
304 bfd.info:
305 (cd $(docdir); $(MAKE) bfd.info $(FLAGS_TO_PASS))
306
307 bfd.dvi:
308 (cd $(docdir); $(MAKE) bfd.dvi $(FLAGS_TO_PASS))
309
310 bfd.ps:
311 (cd $(docdir); $(MAKE) bfd.ps $(FLAGS_TO_PASS))
312
313 # What appears below is generated by a hacked mkdep using gcc -MM.
314
315 # DO NOT DELETE THIS LINE -- mkdep uses it.
316 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
317
318 libbfd.o : libbfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
319 opncls.o : opncls.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
320 bfd.o : bfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
321 archive.o : archive.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
322 $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h
323 targets.o : targets.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
324 cache.o : cache.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
325 archures.o : archures.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h
326 aout64.o : aout64.c
327 aout32.o : aout32.c aoutx.h $(INCDIR)/bfd.h $(INCDIR)/ansidecl.h \
328 $(INCDIR)/obstack.h libaout.h libbfd.h $(INCDIR)/aout/aout64.h \
329 $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
330 sunos.o : sunos.c aoutf1.h $(INCDIR)/bfd.h $(INCDIR)/obstack.h \
331 libaout.h libbfd.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
332 $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
333 demo64.o : demo64.c
334
335 srec.o : srec.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
336 oasys.o : oasys.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
337 $(INCDIR)/oasys.h liboasys.h
338 ieee.o : ieee.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
339 $(INCDIR)/ieee.h libieee.h
340 coff-h8300.o: coff-h8300.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
341 $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \
342 coffswap.h seclet.h
343 coff-a29k.o: coff-a29k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
344 $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \
345 coffswap.h seclet.h
346 coff-i386.o: coff-i386.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
347 $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \
348 coffswap.h seclet.h
349 coff-i960.o: coff-i960.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
350 $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \
351 coffswap.h seclet.h
352 coff-m68k.o: coff-m68k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
353 $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \
354 coffswap.h seclet.h
355 coff-m88k.o: coff-m88k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
356 $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \
357 coffswap.h seclet.h
358 coff-mips.o: coff-mips.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
359 $(INCDIR)/coff/mips.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \
360 coffswap.h seclet.h libecoff.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 coffswap.h seclet.h
364 coff-z8k.o: coff-z8k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
365 $(INCDIR)/coff/z8k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \
366 coffswap.h seclet.h
367 coff-we32k.o: coff-we32k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
368 $(INCDIR)/coff/we32k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \
369 coffswap.h seclet.h
370 coffgen.o: coffgen.c $(INCDIR)/bfd.h libbfd.h $(INCDIR)/coff/internal.h \
371 libcoff.h
372 reloc16.o: reloc16.c $(INCDIR)/bfd.h libbfd.h $(INCDIR)/coff/internal.h \
373 libcoff.h seclet.h
374 format.o : format.c $(INCDIR)/bfd.h \
375 $(INCDIR)/obstack.h libbfd.h
376 section.o : section.c $(INCDIR)/bfd.h \
377 $(INCDIR)/obstack.h libbfd.h
378 core.o : core.c $(INCDIR)/bfd.h \
379 $(INCDIR)/obstack.h libbfd.h
380 syms.o : syms.c $(INCDIR)/bfd.h \
381 $(INCDIR)/obstack.h libbfd.h
382 syms.o : stab-syms.c
383 reloc.o : reloc.c $(INCDIR)/bfd.h \
384 $(INCDIR)/obstack.h libbfd.h
385
386 trad-core.o : trad-core.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h \
387 libbfd.h libaout.h
388
389 coff-msym.o: coff-msym.c $(INCDIR)/bfd.h $(INCDIR)/coff/ecoff-ext.h \
390 $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h
391
392 newsos3.o : newsos3.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
393 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
394 $(INCDIR)/aout/ar.h libaout.h
395 i386aout.o : i386aout.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
396 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
397 $(INCDIR)/aout/ar.h libaout.h
398 i386linux.o : i386linux.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
399 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
400 $(INCDIR)/aout/ar.h libaout.h
401 i386bsd.o : i386bsd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
402 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
403 $(INCDIR)/aout/ar.h libaout.h
404 bout.o : bout.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
405 $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
406
407 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
408
This page took 0.040779 seconds and 4 git commands to generate.