moved sparc opcode table to bfd
[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 = $(srcdir)/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 = qc
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 ctor.o seclet.o
74
75 # This is an independent variable so that targets can override it if
76 # they want. Until we get around to fixing the defaults for various targets,
77 # default to all opcode tables.
78 OPC = opc-sparc.o
79
80 BFD_MACHINES = cpu-h8300.o cpu-i960.o cpu-sparc.o cpu-m68k.o cpu-m88k.o \
81 cpu-vax.o cpu-mips.o cpu-a29k.o cpu-i386.o cpu-rs6000.o cpu-hppa.o \
82 $(OPC)
83
84 BFD_BACKENDS = oasys.o ieee.o srec.o elf.o stab-syms.o\
85 aout64.o aout32.o demo64.o sunos.o newsos3.o i386aout.o bout.o \
86 coff-i960.o coff-a29k.o coff-m68k.o coff-i386.o coff-m88k.o \
87 coff-mips.o coff-rs6000.o coff-h8300.o coff-msym.o hppa.o i386linux.o
88
89 OPTIONAL_BACKENDS = trad-core.o
90
91 #### host and target dependent Makefile fragments come in here.
92 ###
93
94 .c.o:
95 $(CC) -c $(CFLAGS) $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) $<
96
97 BFD_H=$(INCDIR)/bfd.h
98
99 # C source files that correspond to .o's.
100 CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \
101 coff-i386.c aout64.c aout32.c sunos.c demo64.c coff-i960.c srec.c tekhex.c \
102 oasys.c ieee.c coff-m68k.c coff-a29k.c coff-rs6000.c coff-msym.c \
103 format.c section.c core.c syms.c stab-syms.c reloc.c init.c ctor.c \
104 seclet.c coff-m88k.c coff-mips.c trad-core.c newsos3.c i386aout.c \
105 i386linux.c bout.c elf.c \
106 cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c cpu-m88k.c cpu-vax.c \
107 cpu-mips.c cpu-a29k.c cpu-i386.c cpu-rs6000.c coff-h8300.c hppa.c \
108 cpu-hppa.c \
109 opc-sparc.c opc-i960.c
110
111 STAGESTUFF = $(TARGETLIB) $(OFILES)
112
113 all: $(TARGETLIB)
114 @$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" \
115 "INSTALL=$(INSTALL)" \
116 "INSTALL_DATA=$(INSTALL_DATA)" \
117 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
118
119 .NOEXPORT:
120
121 check:
122
123 info: force
124 @$(MAKE) subdir_do DO=info "DODIRS=$(SUBDIRS)" "MAKEINFO=$(MAKEINFO)"
125
126 clean-info:
127 @$(MAKE) subdir_do DO=clean-info "DODIRS=$(SUBDIRS)"
128
129 install-info: force
130 @$(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)" \
131 "INSTALL=$(INSTALL)" \
132 "INSTALL_DATA=$(INSTALL_DATA)" \
133 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
134
135 # HDEPFILES comes from the host config; TDEPFILES from the target config.
136 OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(BFD_MACHINES) $(HDEPFILES) $(TDEPFILES)
137
138 $(TARGETLIB): $(OFILES)
139 rm -f $(TARGETLIB)
140 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
141 $(RANLIB) $(TARGETLIB)
142
143 # When compiling targets.c, supply the default target info from configure.
144 targets.o: targets.c
145 $(CC) $(CFLAGS) -c $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) -DMINIMIZE=$(MINIMIZE) $(TDEFAULTS) $<
146
147 subdir_do: force
148 @for i in $(DODIRS); do \
149 if [ -d ./$$i ] ; then \
150 if (cd ./$$i; \
151 $(MAKE) \
152 "against=$(against)" \
153 "AR=$(AR)" \
154 "AR_FLAGS=$(AR_FLAGS)" \
155 "CC=$(CC)" \
156 "CFLAGS=$(CFLAGS)" \
157 "RANLIB=$(RANLIB)" \
158 "MAKEINFO=$(MAKEINFO)" \
159 "INSTALL=$(INSTALL)" \
160 "INSTALL_DATA=$(INSTALL_DATA)" \
161 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
162 "BISON=$(BISON)" $(DO)) ; then true ; \
163 else exit 1 ; fi ; \
164 else true ; fi ; \
165 done
166
167 tags etags: TAGS
168
169 TAGS: force
170 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
171
172 clean:
173 rm -f *.[oa] *~ core *.E *.p *.ip aout-params.h gen-aout
174 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)"
175
176 clobber realclean: clean
177 rm -f libbfd.a TAGS
178 $(MAKE) subdir_do DO=clobber "DODIRS=$(SUBDIRS)"
179
180 # Mark everything as depending on config.status, since the timestamp on
181 # sysdep.h might actually move backwards if we reconfig and relink it
182 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
183 RECONFIG = config.status
184 $(BFD_LIBS): libbfd.h $(BFD_H) $(RECONFIG)
185 $(BFD_MACHINES): libbfd.h $(BFD_H) $(RECONFIG)
186 $(BFD_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG)
187 $(OPTIONAL_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG)
188
189 # Get around a Sun Make bug in SunOS 4.1.1 with VPATH
190 cpu-i386.o:cpu-i386.c
191
192 saber:
193 #suppress 65 on bfd_map_over_sections
194 #suppress 66 on bfd_map_over_sections
195 #suppress 67 on bfd_map_over_sections
196 #suppress 68 on bfd_map_over_sections
197 #suppress 69 on bfd_map_over_sections
198 #suppress 70 on bfd_map_over_sections
199 #suppress 110 in bfd_map_over_sections
200 #suppress 112 in bfd_map_over_sections
201 #suppress 530
202 #suppress 590 in swap_exec_header
203 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
204 #suppress 590 in bfd_dont_truncate_arname
205 #suppress 590 on ignore
206 #suppress 590 on abfd
207 #setopt load_flags $(CFLAGS)
208 #load $(CFILES)
209
210
211 #-----------------------------------------------------------------------------
212 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
213 #
214 # 'VERSION' file must be present and contain a string of the form "x.y"
215 #-----------------------------------------------------------------------------
216
217 ver960.c: FORCE
218 rm -f ver960.c
219 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
220
221
222 # This target should be invoked before building a new release.
223 # 'VERSION' file must be present and contain a string of the form "x.y"
224 #
225 roll:
226 @V=`cat VERSION` ; \
227 MAJ=`sed 's/\..*//' VERSION` ; \
228 MIN=`sed 's/.*\.//' VERSION` ; \
229 V=$$MAJ.`expr $$MIN + 1` ; \
230 rm -f VERSION ; \
231 echo $$V >VERSION ; \
232 echo Version $$V
233
234 # Dummy target to force execution of dependent targets.
235 #
236 force:
237
238 install:
239 $(INSTALL_DATA) libbfd.a $(libdir)/libbfd.a
240 $(RANLIB) $(libdir)/libbfd.a
241 $(INSTALL_DATA) $(INCDIR)/bfd.h $(includedir)/bfd.h
242 [ -z "$(oldincludedir)" ] || $(INSTALL_DATA) $(INCDIR)/bfd.h $(oldincludedir)/bfd.h
243 @$(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)"
244
245 # Target to uncomment host-specific lines in this makefile. Such lines must
246 # have the following string beginning in column 1: #__<hostname>__#
247 # Original Makefile is backed up as 'Makefile.old'.
248 #
249 # Invoke with: make make HOST=xxx
250 #
251 make:
252 -@if test $(HOST)x = x ; then \
253 echo '\aSpecify "make make HOST=???"'; \
254 exit 1; \
255 fi ; \
256 grep -s "^#The next line was generated by 'make make'" Makefile; \
257 if test $$? = 0 ; then \
258 echo "\aMakefile has already been processed with 'make make'";\
259 exit 1; \
260 fi ; \
261 mv -f Makefile Makefile.old; \
262 echo "#The next line was generated by 'make make'" >Makefile ; \
263 echo "HOST=$(HOST)" >>Makefile ; \
264 echo >>Makefile ; \
265 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
266
267 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
268 $(SHELL) ./config.status
269
270 dep: $(CFILES)
271 mkdep $(CFLAGS) $?
272
273 host-aout.o: Makefile
274
275 # The following program can be used to generate a simple config file
276 # which can be folded into an h-XXX file for a new host, with some editing.
277 aout-params.h: gen-aout
278 ./gen-aout > aout-params.h
279 gen-aout: $(srcdir)/gen-aout.c Makefile
280 $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c
281
282 headers:
283 (cd $(docdir); $(MAKE) protos)
284 # Could really use a "copy-if-change"...
285 cp $(docdir)/bfd.h bfd.h-new
286 $(srcdir)/../move-if-change bfd.h-new $(BFD_H)
287 cp $(docdir)/libbfd.h libbfd.h-new
288 $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h
289 cp $(docdir)/libcoff.h libcoff.h-new
290 $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
291
292 bfd.info:
293 ( cd $(docdir); $(MAKE) bfd.info)
294
295 bfd.dvi:
296 (cd $(docdir); $(MAKE) bfd.dvi)
297
298 bfd.ps:
299 (cd $(docdir); $(MAKE) bfd.ps)
300
301 # What appears below is generated by a hacked mkdep using gcc -MM.
302
303 # DO NOT DELETE THIS LINE -- mkdep uses it.
304 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
305
306 libbfd.o : libbfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
307 opncls.o : opncls.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
308 bfd.o : bfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
309 archive.o : archive.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
310 $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h
311 targets.o : targets.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
312 cache.o : cache.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
313 archures.o : archures.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h
314 aout64.o : aout64.c
315 aout32.o : aout32.c aoutx.h $(INCDIR)/bfd.h $(INCDIR)/ansidecl.h \
316 $(INCDIR)/obstack.h libaout.h libbfd.h $(INCDIR)/aout/aout64.h \
317 $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
318 sunos.o : sunos.c aoutf1.h $(INCDIR)/bfd.h $(INCDIR)/obstack.h \
319 libaout.h libbfd.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
320 $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
321 demo64.o : demo64.c
322
323 srec.o : srec.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h
324 oasys.o : oasys.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
325 $(INCDIR)/oasys.h liboasys.h
326 ieee.o : ieee.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
327 $(INCDIR)/ieee.h libieee.h
328 coff-h8300.o: coff-h8300.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
329 $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
330 coff-a29k.o: coff-a29k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
331 $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
332 coff-i386.o: coff-i386.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
333 $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
334 coff-i960.o: coff-i960.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
335 $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
336 coff-m68k.o: coff-m68k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
337 $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
338 coff-m88k.o: coff-m88k.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
339 $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
340 coff-mips.o: coff-mips.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
341 $(INCDIR)/coff/mips.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
342 coff-rs6000.o: coff-rs6000.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
343 $(INCDIR)/coff/rs6000.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h
344 format.o : format.c $(INCDIR)/bfd.h \
345 $(INCDIR)/obstack.h libbfd.h
346 section.o : section.c $(INCDIR)/bfd.h \
347 $(INCDIR)/obstack.h libbfd.h
348 core.o : core.c $(INCDIR)/bfd.h \
349 $(INCDIR)/obstack.h libbfd.h
350 syms.o : syms.c $(INCDIR)/bfd.h \
351 $(INCDIR)/obstack.h libbfd.h
352 syms.o : stab-syms.c
353 reloc.o : reloc.c $(INCDIR)/bfd.h \
354 $(INCDIR)/obstack.h libbfd.h
355
356 trad-core.o : trad-core.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h \
357 libbfd.h libaout.h
358
359 coff-msym.o: coff-msym.c $(INCDIR)/bfd.h $(INCDIR)/coff/ecoff-ext.h \
360 $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h
361
362 newsos3.o : newsos3.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
363 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
364 $(INCDIR)/aout/ar.h libaout.h
365 i386aout.o : i386aout.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
366 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
367 $(INCDIR)/aout/ar.h libaout.h
368 i386linux.o : i386linux.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
369 $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
370 $(INCDIR)/aout/ar.h libaout.h
371 bout.o : bout.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \
372 $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
373
374 opc-sparc.o : opc-sparc.c $(INCDIR)/opcode/sparc.h
375
376 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
377