Commit | Line | Data |
---|---|---|
204ae00c ILT |
1 | # Makefile template for Configure for the BFD library. |
2 | # Copyright (C) 1990, 1991, 1992, 1993 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 | 21 | srcdir = . |
fde8212e RP |
22 | |
23 | prefix = /usr/local | |
24 | ||
5868184b FF |
25 | exec_prefix = $(prefix) |
26 | bindir = $(exec_prefix)/bin | |
27 | libdir = $(exec_prefix)/lib | |
28 | ||
fde8212e | 29 | datadir = $(prefix)/lib |
5868184b | 30 | mandir = $(prefix)/man |
fde8212e RP |
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 | |
5868184b | 40 | infodir = $(prefix)/info |
fde8212e | 41 | includedir = $(prefix)/include |
5868184b | 42 | oldincludedir = |
fbee3571 | 43 | docdir = doc |
fde8212e RP |
44 | |
45 | SHELL = /bin/sh | |
46 | ||
47 | INSTALL = install -c | |
48 | INSTALL_PROGRAM = $(INSTALL) | |
49 | INSTALL_DATA = $(INSTALL) | |
50 | ||
1b494bfa | 51 | AR = ar |
287c221d | 52 | AR_FLAGS = rc |
6e491a87 | 53 | CFLAGS = -g |
fde8212e RP |
54 | BISON = bison |
55 | MAKEINFO = makeinfo | |
56 | RANLIB = ranlib | |
57 | ||
51300bdb KR |
58 | CC_FOR_BUILD = $(CC) |
59 | ||
d6a554ae | 60 | INCDIR = $(srcdir)/../include |
bb552c64 | 61 | CSEARCH = -I. -I$(srcdir) -I$(INCDIR) |
a5c6b4b3 | 62 | DEP = mkdep |
12e7087f | 63 | |
f259290f | 64 | SUBDIRS = doc |
12e7087f | 65 | |
99a42820 | 66 | |
5176a6bc | 67 | TARGETLIB = libbfd.a |
99a42820 | 68 | |
a5220fb9 | 69 | # bfd.h goes here, for now |
12f367a1 | 70 | BFD_H = bfd.h |
99a42820 | 71 | |
15db2044 KR |
72 | # Some of these files should be in BFD*_BACKENDS below, but some programs |
73 | # won't link without them. So, in order for some of the minimal-bfd | |
74 | # hacks to work, they're also included here for now. | |
13cadf76 | 75 | # gdb: ecoff.o elf.o |
15db2044 | 76 | # objdump: elf.o |
180acef5 DM |
77 | # |
78 | # Also, Jim Kingdon notes: | |
79 | # Writing S-records should be included in all (or at least most) | |
80 | # *-*-coff, *-*-aout, etc., configurations, because people will want to | |
81 | # be able to use objcopy to create S-records. (S-records are not useful | |
82 | # for the debugger, so if you are downloading things as S-records you | |
83 | # need two copies of the executable, one to download and one for the | |
84 | # debugger). | |
01087713 DM |
85 | BFD_LIBS = \ |
86 | archive.o archures.o bfd.o cache.o coffgen.o core.o ctor.o \ | |
87 | format.o init.o libbfd.o opncls.o reloc.o \ | |
88 | seclet.o section.o syms.o targets.o \ | |
ac0d500c | 89 | ecoff.o elf.o srec.o |
63ffe5ef | 90 | |
01087713 DM |
91 | # This list is alphabetized to make it easier to keep in sync |
92 | # with the decls and initializer in archures.c. | |
93 | ALL_MACHINES = \ | |
94 | cpu-a29k.o \ | |
95 | cpu-alpha.o \ | |
96 | cpu-h8300.o \ | |
97 | cpu-h8500.o \ | |
98 | cpu-hppa.o \ | |
99 | cpu-i386.o \ | |
100 | cpu-i960.o \ | |
101 | cpu-m68k.o \ | |
102 | cpu-m88k.o \ | |
103 | cpu-mips.o \ | |
104 | cpu-rs6000.o \ | |
105 | cpu-sh.o \ | |
106 | cpu-sparc.o \ | |
107 | cpu-vax.o \ | |
108 | cpu-we32k.o \ | |
109 | cpu-z8k.o | |
110 | ||
111 | # The .o files needed by all of the 32 bit vectors that are configured into | |
112 | # target_vector in targets.c if configured with --with-targets=all. | |
bb552c64 | 113 | BFD32_BACKENDS = \ |
01087713 DM |
114 | aout-adobe.o \ |
115 | aout32.o \ | |
116 | bout.o \ | |
d5d53b0a JW |
117 | cf-i386lynx.o \ |
118 | cf-m68klynx.o \ | |
119 | cf-sparclynx.o \ | |
01087713 | 120 | coff-a29k.o \ |
653dd82a | 121 | coff-apollo.o \ |
01087713 DM |
122 | coff-h8300.o \ |
123 | coff-h8500.o \ | |
124 | coff-i386.o \ | |
125 | coff-i960.o \ | |
126 | coff-m68k.o \ | |
127 | coff-m88k.o \ | |
128 | coff-mips.o \ | |
129 | coff-rs6000.o \ | |
130 | coff-sh.o \ | |
131 | coff-u68k.o \ | |
132 | coff-we32k.o \ | |
133 | coff-z8k.o \ | |
134 | elf32-gen.o \ | |
135 | elf32-hppa.o \ | |
136 | elf32-i386.o \ | |
137 | elf32-i860.o \ | |
138 | elf32-m68k.o \ | |
139 | elf32-m88k.o \ | |
140 | elf32-mips.o \ | |
141 | elf32-sparc.o \ | |
142 | elf32.o \ | |
143 | hp300hpux.o \ | |
d5a30a08 | 144 | som.o \ |
01087713 DM |
145 | i386aout.o \ |
146 | i386bsd.o \ | |
147 | i386linux.o \ | |
148 | i386lynx.o \ | |
d5a30a08 | 149 | netbsd386.o \ |
01087713 DM |
150 | i386mach3.o \ |
151 | ieee.o \ | |
d5a30a08 | 152 | m68klynx.o \ |
01087713 DM |
153 | mipsbsd.o \ |
154 | newsos3.o \ | |
c3e964b9 | 155 | nlm.o \ |
01087713 DM |
156 | nlm32-gen.o \ |
157 | nlm32-i386.o \ | |
158 | nlm32.o \ | |
159 | oasys.o \ | |
160 | reloc16.o \ | |
d5d53b0a | 161 | sparclynx.o \ |
01087713 DM |
162 | stab-syms.o \ |
163 | sunos.o | |
164 | ||
165 | # The .o files needed by all of the 64 bit vectors that are configured into | |
166 | # target_vector in targets.c if configured with --with-targets=all | |
167 | # and --with-64-bit-bfd. | |
34075964 | 168 | BFD64_BACKENDS = \ |
01087713 DM |
169 | aout64.o \ |
170 | coff-alpha.o \ | |
171 | demo64.o \ | |
172 | elf64-gen.o \ | |
173 | elf64.o \ | |
174 | nlm64-gen.o \ | |
175 | nlm64.o | |
176 | ||
177 | OPTIONAL_BACKENDS = \ | |
178 | aix386-core.o \ | |
179 | hpux-core.o \ | |
d5a30a08 ILT |
180 | lynx-core.o \ |
181 | osf-core.o \ | |
01087713 DM |
182 | sco-core.o \ |
183 | trad-core.o | |
99a42820 | 184 | |
34075964 PB |
185 | # These are defined by configure.in: |
186 | # WORDSIZE=32 | |
187 | # BFD_BACKENDS = $(BFD32_BACKENDS) | |
34075964 | 188 | |
bb552c64 JK |
189 | all: |
190 | ||
22e98743 SC |
191 | #### host and target dependent Makefile fragments come in here. |
192 | ### | |
193 | ||
98c0c56d | 194 | FLAGS_TO_PASS = \ |
287c221d PB |
195 | "prefix=$(prefix)" \ |
196 | "exec_prefix=$(exec_prefix)" \ | |
98c0c56d BK |
197 | "against=$(against)" \ |
198 | "AR=$(AR)" \ | |
199 | "AR_FLAGS=$(AR_FLAGS)" \ | |
200 | "CC=$(CC)" \ | |
51300bdb | 201 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
98c0c56d BK |
202 | "CFLAGS=$(CFLAGS)" \ |
203 | "RANLIB=$(RANLIB)" \ | |
204 | "MAKEINFO=$(MAKEINFO)" \ | |
205 | "INSTALL=$(INSTALL)" \ | |
206 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
207 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
208 | "BISON=$(BISON)" | |
209 | ||
d684720f | 210 | ALL_CFLAGS=$(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) |
6e491a87 | 211 | .c.o: |
d684720f | 212 | $(CC) -c $(ALL_CFLAGS) $< |
6e491a87 | 213 | |
99a42820 | 214 | # C source files that correspond to .o's. |
a3b3dbdd ILT |
215 | CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c \ |
216 | archures.c coff-i386.c aout64.c aout32.c sunos.c demo64.c \ | |
4d09e8ac | 217 | coff-i960.c srec.c tekhex.c oasys.c ieee.c \ |
653dd82a | 218 | ecoff.c coff-m68k.c coff-u68k.c coff-apollo.c \ |
dae31cf5 | 219 | coff-a29k.c coff-rs6000.c coffgen.c format.c \ |
a3b3dbdd | 220 | section.c core.c syms.c stab-syms.c reloc.c init.c ctor.c \ |
51300bdb | 221 | seclet.c coff-m88k.c coff-mips.c coff-sh.c trad-core.c newsos3.c \ |
d5a30a08 | 222 | i386aout.c i386linux.c netbsd386.c i386mach3.c bout.c aout-adobe.c coff-we32k.c \ |
a3b3dbdd ILT |
223 | i386bsd.c cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c \ |
224 | cpu-m88k.c cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.c \ | |
d5a30a08 | 225 | cpu-rs6000.c coff-h8300.c som.c cpu-hppa.c cpu-we32k.c reloc16.c \ |
51300bdb | 226 | mipsbsd.c cpu-sh.c \ |
653dd82a | 227 | elf.c elf32.c elf32-sparc.c elf32-i386.c elf32-i860.c elf32-m68k.c \ |
c55665ea JK |
228 | elf32-hppa.c elf32-m88k.c elf32-mips.c elf32-gen.c \ |
229 | elf64.c elf64-gen.c \ | |
c6b399ce | 230 | nlm.c nlm32.c nlm32-gen.c nlm32-i386.c nlm64.c nlm64-gen.c \ |
51300bdb | 231 | coff-alpha.c cpu-alpha.c \ |
d5a30a08 | 232 | hp300bsd.c hp300hpux.c \ |
d5d53b0a JW |
233 | i386lynx.c cf-i386lynx.c m68klynx.c cf-m68klynx.c \ |
234 | sparclynx.c cf-sparclynx.c | |
63ffe5ef | 235 | |
c6b399ce KR |
236 | HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h \ |
237 | coffswap.h ecoffswap.h elf32-hppa.h elf32-target.h elf64-target.h \ | |
238 | elfcode.h hppa_stubs.h libaout.h libbfd.h \ | |
239 | libcoff.h libecoff.h libelf.h libhppa.h libieee.h libnlm.h \ | |
240 | liboasys.h nlm-target.h nlmcode.h seclet.h som.h | |
241 | ||
5176a6bc RP |
242 | STAGESTUFF = $(TARGETLIB) $(OFILES) |
243 | ||
fbee3571 | 244 | all: Makefile $(TARGETLIB) |
98c0c56d | 245 | @$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) |
5176a6bc | 246 | |
30662ca6 | 247 | .NOEXPORT: |
204ae00c | 248 | MAKEOVERRIDES= |
30662ca6 | 249 | |
d5d53b0a | 250 | .PHONY: check installcheck |
5868184b | 251 | check: |
d5d53b0a JW |
252 | @echo No testsuites exist. Nothing to check. |
253 | ||
76019c92 | 254 | installcheck: |
d5d53b0a | 255 | @echo No testsuites exist. Nothing to check. |
5868184b | 256 | |
74991624 | 257 | info dvi : force |
9faacb92 | 258 | @$(MAKE) subdir_do DO=$@ "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) |
2090ba83 | 259 | |
5868184b | 260 | clean-info: |
98c0c56d | 261 | @$(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) |
5868184b | 262 | |
2090ba83 | 263 | install-info: force |
98c0c56d | 264 | @$(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) |
2090ba83 | 265 | |
dcdfa32c DM |
266 | # Various kinds of .o files to put in libbfd.a: |
267 | # BFD_LIBS Generic routines, always needed. | |
5f9a2245 DM |
268 | # BFD_BACKENDS Routines the configured targets need. |
269 | # BFD_MACHINES Architecture-specific routines the configured targets need. | |
dcdfa32c DM |
270 | # HDEPFILES Routines the host needs, regardless of target. |
271 | # TDEPFILES Routines the target needs, regardless of host. | |
6a469027 | 272 | OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(BFD_MACHINES) $(HDEPFILES) $(TDEPFILES) |
5176a6bc | 273 | |
c812942f | 274 | ofiles : Makefile |
15db2044 | 275 | rm -f ofiles |
2fdca021 | 276 | f=""; \ |
c812942f | 277 | for i in $(OFILES) ; do \ |
2fdca021 | 278 | case " $$f " in \ |
dae31cf5 | 279 | *" $$i "*) ;; \ |
2fdca021 KR |
280 | *) f="$$f $$i" ;; \ |
281 | esac ; \ | |
282 | done ; \ | |
283 | echo $$f > ofiles | |
c812942f KR |
284 | |
285 | $(TARGETLIB): $(OFILES) ofiles | |
286 | rm -f $(TARGETLIB) | |
287 | @echo ofiles = `cat ofiles` | |
288 | $(AR) $(AR_FLAGS) $(TARGETLIB) `cat ofiles` | |
289 | $(RANLIB) $(TARGETLIB) | |
5176a6bc | 290 | |
98c0c56d BK |
291 | # When compiling archures.c and targets.c, supply the default target |
292 | # info from configure. | |
293 | ||
294 | ||
51300bdb | 295 | targets.o: targets.c Makefile |
5f9a2245 | 296 | $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $(TDEFAULTS) $< |
4a29cb1e | 297 | |
51300bdb | 298 | archures.o: archures.c Makefile |
5f9a2245 | 299 | $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $(TDEFAULTS) $< |
98c0c56d | 300 | |
f259290f | 301 | subdir_do: force |
6e491a87 | 302 | @for i in $(DODIRS); do \ |
5868184b FF |
303 | if [ -d ./$$i ] ; then \ |
304 | if (cd ./$$i; \ | |
98c0c56d | 305 | $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ |
f259290f RP |
306 | else exit 1 ; fi ; \ |
307 | else true ; fi ; \ | |
308 | done | |
309 | ||
99a42820 RP |
310 | tags etags: TAGS |
311 | ||
5176a6bc | 312 | TAGS: force |
453063fe | 313 | etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c |
99a42820 | 314 | |
ef2810d0 PB |
315 | do_mostlyclean: |
316 | rm -f *.o *~ core *.E *.p *.ip aout-params.h gen-aout | |
fbee3571 | 317 | do_clean: do_mostlyclean |
15db2044 | 318 | rm -f libbfd.a TAGS bfd.h stmp-bfd.h ofiles |
ef2810d0 | 319 | do_distclean: do_clean |
0e238aa7 | 320 | rm -f Makefile config.status sysdep.h |
ef2810d0 | 321 | do_realclean: do_distclean |
15db2044 | 322 | rm -f $(srcdir)/libcoff.h $(srcdir)/libbfd.h $(srcdir)/bfd-in2.h |
ef2810d0 PB |
323 | |
324 | mostlyclean: do_mostlyclean | |
325 | $(MAKE) subdir_do DO=mostlyclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) | |
fbee3571 | 326 | clean: do_clean |
ef2810d0 | 327 | $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) |
0e238aa7 | 328 | distclean: |
ef2810d0 | 329 | $(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) |
180acef5 | 330 | $(MAKE) do_distclean |
0e238aa7 | 331 | clobber realclean: |
ef2810d0 | 332 | $(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) |
180acef5 | 333 | $(MAKE) do_realclean |
99a42820 | 334 | |
23d44ec9 JG |
335 | # Mark everything as depending on config.status, since the timestamp on |
336 | # sysdep.h might actually move backwards if we reconfig and relink it | |
337 | # to a different hosts/h-xxx.h file. This will force a recompile anyway. | |
d684720f | 338 | BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h |
23d44ec9 | 339 | RECONFIG = config.status |
d684720f KR |
340 | $(BFD_LIBS): libbfd.h $(BFD_H) $(RECONFIG) $(BFD_H_DEPS) |
341 | $(BFD_MACHINES): libbfd.h $(BFD_H) $(RECONFIG) $(BFD_H_DEPS) | |
342 | $(BFD_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG) $(BFD_H_DEPS) | |
343 | $(OPTIONAL_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG) $(BFD_H_DEPS) | |
99a42820 | 344 | |
cbdc7909 JG |
345 | # Get around a Sun Make bug in SunOS 4.1.1 with VPATH |
346 | cpu-i386.o:cpu-i386.c | |
fbee3571 | 347 | cpu-z8k.o: cpu-z8k.c |
204ae00c | 348 | cpu-h8500.o: cpu-h8500.c |
fbee3571 | 349 | cpu-we32k.o: cpu-we32k.c |
cbdc7909 | 350 | |
99a42820 RP |
351 | saber: |
352 | #suppress 65 on bfd_map_over_sections | |
353 | #suppress 66 on bfd_map_over_sections | |
354 | #suppress 67 on bfd_map_over_sections | |
355 | #suppress 68 on bfd_map_over_sections | |
356 | #suppress 69 on bfd_map_over_sections | |
357 | #suppress 70 on bfd_map_over_sections | |
358 | #suppress 110 in bfd_map_over_sections | |
359 | #suppress 112 in bfd_map_over_sections | |
360 | #suppress 530 | |
361 | #suppress 590 in swap_exec_header | |
362 | #suppress 590 in _bfd_dummy_core_file_matches_executable_p | |
363 | #suppress 590 in bfd_dont_truncate_arname | |
364 | #suppress 590 on ignore | |
365 | #suppress 590 on abfd | |
366 | #setopt load_flags $(CFLAGS) | |
367 | #load $(CFILES) | |
a5c6b4b3 | 368 | |
99a42820 RP |
369 | |
370 | #----------------------------------------------------------------------------- | |
371 | # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT | |
372 | # | |
373 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
374 | #----------------------------------------------------------------------------- | |
375 | ||
376 | ver960.c: FORCE | |
377 | rm -f ver960.c | |
378 | echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c | |
379 | ||
380 | ||
381 | # This target should be invoked before building a new release. | |
382 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
383 | # | |
384 | roll: | |
385 | @V=`cat VERSION` ; \ | |
386 | MAJ=`sed 's/\..*//' VERSION` ; \ | |
387 | MIN=`sed 's/.*\.//' VERSION` ; \ | |
388 | V=$$MAJ.`expr $$MIN + 1` ; \ | |
389 | rm -f VERSION ; \ | |
390 | echo $$V >VERSION ; \ | |
391 | echo Version $$V | |
392 | ||
393 | # Dummy target to force execution of dependent targets. | |
394 | # | |
5176a6bc | 395 | force: |
99a42820 | 396 | |
99a42820 | 397 | install: |
fde8212e RP |
398 | $(INSTALL_DATA) libbfd.a $(libdir)/libbfd.a |
399 | $(RANLIB) $(libdir)/libbfd.a | |
75ff7895 DZ |
400 | # Install BFD include file, and others that it needs. Install them |
401 | # both in GCC's include directory, and in the system include dir | |
402 | # if configured as $(oldincludedir) -- which it usually isnt. | |
a5220fb9 | 403 | $(INSTALL_DATA) $(BFD_H) $(includedir)/bfd.h |
6cabab78 DZ |
404 | $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h |
405 | $(INSTALL_DATA) $(INCDIR)/obstack.h $(includedir)/obstack.h | |
5d4c714e DM |
406 | -if test -z "$(oldincludedir)"; then true; else \ |
407 | test -d $(oldincludedir) || mkdir $(oldincludedir); \ | |
408 | $(INSTALL_DATA) $(BFD_H) $(oldincludedir)/bfd.h; \ | |
409 | $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(oldincludedir)/ansidecl.h; \ | |
410 | $(INSTALL_DATA) $(INCDIR)/obstack.h $(oldincludedir)/obstack.h; \ | |
411 | @$(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS); \ | |
412 | fi | |
99a42820 | 413 | |
dae31cf5 ILT |
414 | Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) |
415 | $(SHELL) config.status | |
a5c6b4b3 | 416 | |
c6b399ce KR |
417 | # Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES). |
418 | .dep: dep.sed $(CFILES) $(HFILES) bfd.h | |
419 | rm -f .dep1 | |
420 | $(MAKE) DEP=$(DEP) .dep1 | |
421 | sed -f dep.sed <.dep1 >.dep | |
422 | ||
d684720f KR |
423 | # This rule really wants a mkdep that runs "gcc -MM". |
424 | .dep1: $(CFILES) | |
c6b399ce | 425 | rm -f .dep2 |
d684720f KR |
426 | echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2 |
427 | $(DEP) -f .dep2 $(ALL_CFLAGS) $? | |
653dd82a | 428 | $(srcdir)/../move-if-change .dep2 .dep1 |
d684720f | 429 | |
c6b399ce | 430 | dep.sed: dep-in.sed config.status |
d684720f KR |
431 | sed <$(srcdir)/dep-in.sed >dep.sed \ |
432 | -e 's!@BFD_H@!$(BFD_H)!' \ | |
433 | -e 's!@INCDIR@!$(INCDIR)!' \ | |
434 | -e 's!@srcdir@!$(srcdir)!' | |
435 | ||
d684720f KR |
436 | dep: .dep |
437 | sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile | |
438 | cat .dep >> tmp-Makefile | |
653dd82a SG |
439 | $(srcdir)/../move-if-change tmp-Makefile Makefile |
440 | ||
441 | dep-in: .dep | |
442 | sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in | |
443 | cat .dep >> tmp-Makefile.in | |
444 | $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in | |
6f715d66 | 445 | |
5868184b | 446 | host-aout.o: Makefile |
6f715d66 | 447 | |
5868184b FF |
448 | # The following program can be used to generate a simple config file |
449 | # which can be folded into an h-XXX file for a new host, with some editing. | |
d01cd8fc FF |
450 | aout-params.h: gen-aout |
451 | ./gen-aout > aout-params.h | |
5868184b FF |
452 | gen-aout: $(srcdir)/gen-aout.c Makefile |
453 | $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c | |
6f715d66 | 454 | |
34075964 PB |
455 | BFDIN_H= $(srcdir)/bfd-in2.h |
456 | ||
a5220fb9 | 457 | $(BFD_H): stmp-bfd.h ; @true |
75ff7895 | 458 | |
12f367a1 KR |
459 | # The file ../include/bfd.h is from earlier attempts to get this right. |
460 | # If the file is still there, kill it. | |
15db2044 KR |
461 | stmp-bfd.h : $(srcdir)/bfd-in2.h Makefile |
462 | rm -f bfd.h-new 64 ../include/bfd.h | |
12f367a1 | 463 | -grep HOST_64_BIT sysdep.h > 64 |
15db2044 KR |
464 | sed -e 's/@WORDSIZE@/$(WORDSIZE)/' -e '/64-bit.*sysdep.h/ r 64' < $(srcdir)/bfd-in2.h > bfd.h-new |
465 | $(srcdir)/../move-if-change bfd.h-new $(BFD_H) | |
12f367a1 | 466 | rm -f 64 |
75ff7895 | 467 | touch stmp-bfd.h |
34075964 | 468 | |
a5220fb9 | 469 | # Could really use a "copy-if-change"... |
12e7087f | 470 | headers: |
98c0c56d | 471 | (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS)) |
15db2044 KR |
472 | cp $(docdir)/bfd.h bfd-in2.h-new |
473 | $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h | |
6bb4c923 KR |
474 | cp $(docdir)/libbfd.h libbfd.h-new |
475 | $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h | |
476 | cp $(docdir)/libcoff.h libcoff.h-new | |
477 | $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h | |
12e7087f JG |
478 | |
479 | bfd.info: | |
fbee3571 | 480 | (cd $(docdir); $(MAKE) bfd.info $(FLAGS_TO_PASS)) |
12e7087f JG |
481 | |
482 | bfd.dvi: | |
98c0c56d | 483 | (cd $(docdir); $(MAKE) bfd.dvi $(FLAGS_TO_PASS)) |
12e7087f JG |
484 | |
485 | bfd.ps: | |
98c0c56d | 486 | (cd $(docdir); $(MAKE) bfd.ps $(FLAGS_TO_PASS)) |
12e7087f JG |
487 | |
488 | # What appears below is generated by a hacked mkdep using gcc -MM. | |
489 | ||
490 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
491 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
492 | ||
d684720f KR |
493 | libbfd.o : libbfd.c |
494 | opncls.o : opncls.c | |
d5d53b0a JW |
495 | bfd.o : bfd.c $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ |
496 | libcoff.h libecoff.h libelf.h $(INCDIR)/elf/common.h \ | |
497 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h | |
498 | archive.o : archive.c $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h | |
d684720f KR |
499 | targets.o : targets.c |
500 | cache.o : cache.c | |
501 | archures.o : archures.c | |
d5d53b0a JW |
502 | coff-i386.o : coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \ |
503 | libcoff.h coffcode.h seclet.h coffswap.h | |
504 | aout64.o : aout64.c aoutx.h libaout.h $(INCDIR)/aout/aout64.h \ | |
505 | $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h | |
506 | aout32.o : aout32.c aoutx.h libaout.h $(INCDIR)/aout/aout64.h \ | |
507 | $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h | |
508 | sunos.o : sunos.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \ | |
509 | $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ | |
510 | $(INCDIR)/aout/ar.h aout-target.h | |
511 | demo64.o : demo64.c aoutf1.h $(INCDIR)/aout/sun4.h \ | |
512 | libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ | |
513 | $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h | |
514 | coff-i960.o : coff-i960.c $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h \ | |
515 | libcoff.h coffcode.h seclet.h coffswap.h | |
d684720f KR |
516 | srec.o : srec.c |
517 | tekhex.o : tekhex.c | |
d5d53b0a JW |
518 | oasys.o : oasys.c $(INCDIR)/oasys.h liboasys.h |
519 | ieee.o : ieee.c $(INCDIR)/ieee.h libieee.h | |
520 | ecoff.o : ecoff.c seclet.h $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h \ | |
521 | libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/coff/internal.h \ | |
522 | $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ | |
523 | libcoff.h libecoff.h | |
524 | coff-m68k.o : coff-m68k.c $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h \ | |
525 | libcoff.h coffcode.h seclet.h coffswap.h | |
526 | coff-u68k.o : coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \ | |
527 | $(INCDIR)/coff/internal.h libcoff.h coffcode.h seclet.h \ | |
528 | coffswap.h | |
529 | coff-apollo.o : coff-apollo.c $(INCDIR)/coff/apollo.h \ | |
530 | $(INCDIR)/coff/internal.h libcoff.h coffcode.h seclet.h \ | |
531 | coffswap.h | |
532 | coff-a29k.o : coff-a29k.c $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h \ | |
533 | libcoff.h coffcode.h seclet.h coffswap.h | |
534 | coff-rs6000.o : coff-rs6000.c $(INCDIR)/coff/internal.h \ | |
535 | $(INCDIR)/coff/rs6000.h libcoff.h coffcode.h seclet.h \ | |
536 | coffswap.h | |
537 | coffgen.o : coffgen.c $(INCDIR)/coff/internal.h seclet.h \ | |
538 | libcoff.h | |
d684720f KR |
539 | format.o : format.c |
540 | section.o : section.c | |
541 | core.o : core.c | |
d5d53b0a JW |
542 | syms.o : syms.c $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def |
543 | stab-syms.o : stab-syms.c libaout.h $(INCDIR)/aout/aout64.h \ | |
544 | $(INCDIR)/aout/stab.def | |
545 | reloc.o : reloc.c seclet.h | |
d684720f KR |
546 | init.o : init.c |
547 | ctor.o : ctor.c | |
d5d53b0a JW |
548 | seclet.o : seclet.c seclet.h $(INCDIR)/coff/internal.h |
549 | coff-m88k.o : coff-m88k.c $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h \ | |
550 | libcoff.h coffcode.h seclet.h coffswap.h | |
551 | coff-mips.o : coff-mips.c seclet.h $(INCDIR)/coff/internal.h \ | |
552 | $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ | |
553 | $(INCDIR)/coff/mips.h libcoff.h libecoff.h coffswap.h \ | |
554 | ecoffswap.h | |
555 | coff-sh.o : coff-sh.c $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h \ | |
556 | libcoff.h seclet.h coffcode.h coffswap.h | |
557 | trad-core.o : trad-core.c libaout.h | |
558 | newsos3.o : newsos3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ | |
559 | $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ | |
560 | aout-target.h | |
561 | i386aout.o : i386aout.c libaout.h aout-target.h $(INCDIR)/aout/aout64.h \ | |
562 | $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h | |
563 | i386linux.o : i386linux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ | |
564 | $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ | |
565 | aout-target.h | |
566 | netbsd386.o : netbsd386.c libaout.h aout-target.h $(INCDIR)/aout/aout64.h \ | |
567 | $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h | |
568 | i386mach3.o : i386mach3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ | |
569 | $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ | |
570 | aout-target.h | |
571 | bout.o : bout.c seclet.h $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h \ | |
572 | $(INCDIR)/aout/stab.def libaout.h | |
573 | aout-adobe.o : aout-adobe.c $(INCDIR)/aout/adobe.h \ | |
574 | $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h | |
575 | coff-we32k.o : coff-we32k.c $(INCDIR)/coff/we32k.h \ | |
576 | $(INCDIR)/coff/internal.h libcoff.h coffcode.h seclet.h \ | |
577 | coffswap.h | |
578 | i386bsd.o : i386bsd.c libaout.h aout-target.h $(INCDIR)/aout/aout64.h \ | |
579 | $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h | |
d684720f KR |
580 | cpu-h8300.o : cpu-h8300.c |
581 | cpu-i960.o : cpu-i960.c | |
582 | cpu-sparc.o : cpu-sparc.c | |
583 | cpu-m68k.o : cpu-m68k.c | |
584 | cpu-m88k.o : cpu-m88k.c | |
585 | cpu-vax.o : cpu-vax.c | |
586 | cpu-mips.o : cpu-mips.c | |
587 | cpu-a29k.o : cpu-a29k.c | |
588 | cpu-i386.o : cpu-i386.c | |
589 | cpu-rs6000.o : cpu-rs6000.c | |
d5d53b0a JW |
590 | coff-h8300.o : coff-h8300.c $(INCDIR)/coff/h8300.h \ |
591 | $(INCDIR)/coff/internal.h seclet.h libcoff.h coffcode.h \ | |
592 | coffswap.h | |
d684720f KR |
593 | som.o : som.c |
594 | cpu-hppa.o : cpu-hppa.c | |
595 | cpu-we32k.o : cpu-we32k.c | |
d5d53b0a JW |
596 | reloc16.o : reloc16.c seclet.h $(INCDIR)/coff/internal.h \ |
597 | libcoff.h | |
598 | mipsbsd.o : mipsbsd.c libaout.h aout-target.h $(INCDIR)/aout/aout64.h \ | |
599 | $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h | |
d684720f | 600 | cpu-sh.o : cpu-sh.c |
d5d53b0a JW |
601 | elf.o : elf.c libelf.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ |
602 | $(INCDIR)/elf/external.h | |
603 | elf32.o : elf32.c elfcode.h libelf.h $(INCDIR)/elf/common.h \ | |
604 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h | |
605 | elf32-sparc.o : elf32-sparc.c libelf.h $(INCDIR)/elf/common.h \ | |
606 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-target.h | |
607 | elf32-i386.o : elf32-i386.c libelf.h $(INCDIR)/elf/common.h \ | |
608 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-target.h | |
609 | elf32-i860.o : elf32-i860.c libelf.h $(INCDIR)/elf/common.h \ | |
610 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-target.h | |
611 | elf32-m68k.o : elf32-m68k.c libelf.h $(INCDIR)/elf/common.h \ | |
612 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-target.h | |
613 | elf32-hppa.o : elf32-hppa.c libelf.h $(INCDIR)/elf/common.h \ | |
614 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-hppa.h \ | |
615 | libhppa.h $(INCDIR)/aout/aout64.h hppa_stubs.h elf32-target.h | |
616 | elf32-m88k.o : elf32-m88k.c libelf.h $(INCDIR)/elf/common.h \ | |
617 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-target.h | |
618 | elf32-mips.o : elf32-mips.c seclet.h libelf.h $(INCDIR)/elf/common.h \ | |
619 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \ | |
620 | elf32-target.h | |
621 | elf32-gen.o : elf32-gen.c libelf.h $(INCDIR)/elf/common.h \ | |
622 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-target.h | |
623 | elf64.o : elf64.c elfcode.h libelf.h $(INCDIR)/elf/common.h \ | |
624 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h | |
625 | elf64-gen.o : elf64-gen.c libelf.h $(INCDIR)/elf/common.h \ | |
626 | $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf64-target.h | |
627 | nlm.o : nlm.c libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ | |
628 | $(INCDIR)/nlm/external.h | |
629 | nlm32.o : nlm32.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \ | |
630 | $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h | |
631 | nlm32-gen.o : nlm32-gen.c libnlm.h $(INCDIR)/nlm/common.h \ | |
632 | $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlm-target.h | |
633 | nlm32-i386.o : nlm32-i386.c libnlm.h $(INCDIR)/nlm/common.h \ | |
634 | $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlm-target.h | |
635 | nlm64.o : nlm64.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \ | |
636 | $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h | |
637 | nlm64-gen.o : nlm64-gen.c libnlm.h $(INCDIR)/nlm/common.h \ | |
638 | $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlm-target.h | |
639 | coff-alpha.o : coff-alpha.c seclet.h $(INCDIR)/coff/internal.h \ | |
640 | $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ | |
641 | $(INCDIR)/coff/alpha.h libcoff.h libecoff.h coffswap.h \ | |
642 | ecoffswap.h | |
d684720f | 643 | cpu-alpha.o : cpu-alpha.c |
d5d53b0a JW |
644 | hp300bsd.o : hp300bsd.c libaout.h aout-target.h $(INCDIR)/aout/aout64.h \ |
645 | $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h | |
d684720f | 646 | hp300hpux.o : hp300hpux.c $(INCDIR)/aout/hp300hpux.h \ |
d5d53b0a JW |
647 | aoutx.h libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ |
648 | $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h | |
649 | i386lynx.o : i386lynx.c libaout.h $(INCDIR)/aout/aout64.h \ | |
650 | aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ | |
651 | $(INCDIR)/aout/ar.h | |
652 | cf-i386lynx.o : i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \ | |
653 | $(INCDIR)/coff/internal.h libcoff.h coffcode.h seclet.h \ | |
654 | coffswap.h | |
655 | m68klynx.o : m68klynx.c libaout.h $(INCDIR)/aout/aout64.h \ | |
656 | aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ | |
657 | $(INCDIR)/aout/ar.h | |
658 | cf-m68klynx.o : cf-m68klynx.c coff-m68k.c $(INCDIR)/coff/m68k.h \ | |
659 | $(INCDIR)/coff/internal.h libcoff.h coffcode.h seclet.h \ | |
660 | coffswap.h | |
661 | sparclynx.o : sparclynx.c libaout.h $(INCDIR)/aout/aout64.h \ | |
662 | aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ | |
663 | $(INCDIR)/aout/ar.h | |
664 | cf-sparclynx.o : cf-sparclynx.c coff-sparc.c $(INCDIR)/coff/sparc.h \ | |
665 | $(INCDIR)/coff/internal.h libcoff.h coffcode.h seclet.h \ | |
666 | coffswap.h | |
6bb4c923 | 667 | |
12e7087f | 668 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |