* coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
[deliverable/binutils-gdb.git] / opcodes / Makefile.in
CommitLineData
add1fb05 1# Makefile template for Configure for the opcodes library.
7adf2630 2# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
42b4add9 3# Free Software Foundation, Inc.
add1fb05
SC
4# Written by Cygnus Support.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
40db6118 18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
add1fb05 19
40db6118
ILT
20VPATH = @srcdir@
21srcdir = @srcdir@
add1fb05 22
40db6118 23prefix = @prefix@
add1fb05 24
6d76c71f 25program_transform_name = @program_transform_name@
40db6118 26exec_prefix = @exec_prefix@
42b4add9
JM
27bindir = @bindir@
28libdir = @libdir@
add1fb05 29
42b4add9
JM
30datadir = @datadir@
31mandir = @mandir@
add1fb05
SC
32man1dir = $(mandir)/man1
33man2dir = $(mandir)/man2
34man3dir = $(mandir)/man3
35man4dir = $(mandir)/man4
36man5dir = $(mandir)/man5
37man6dir = $(mandir)/man6
38man7dir = $(mandir)/man7
39man8dir = $(mandir)/man8
40man9dir = $(mandir)/man9
42b4add9
JM
41infodir = @infodir@
42includedir = @includedir@
add1fb05
SC
43
44SHELL = /bin/sh
45
40db6118
ILT
46INSTALL = @INSTALL@
47INSTALL_PROGRAM = @INSTALL_PROGRAM@
48INSTALL_DATA = @INSTALL_DATA@
add1fb05 49
40db6118
ILT
50AR = @AR@
51AR_FLAGS = rc
52CC = @CC@
53CFLAGS = @CFLAGS@
add1fb05 54MAKEINFO = makeinfo
40db6118 55RANLIB = @RANLIB@
add1fb05 56
e0bf1022
ILT
57ALLLIBS = @ALLLIBS@
58
59PICFLAG = @PICFLAG@
60SHLIB = @SHLIB@
61SHLIB_CC = @SHLIB_CC@
62SHLIB_CFLAGS = @SHLIB_CFLAGS@
63COMMON_SHLIB = @COMMON_SHLIB@
c8303271 64SHLIB_DEP = @SHLIB_DEP@
e0bf1022
ILT
65SHLINK = @SHLINK@
66
6d76c71f
ILT
67SONAME = lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`
68
fde326fb 69INCDIR = $(srcdir)/../include
c840244e 70BFDDIR = $(srcdir)/../bfd
fde326fb 71CSEARCH = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR)
add1fb05
SC
72DEP = mkdep
73
794a16b0 74TARGETLIB = libopcodes.a
add1fb05 75
f76db60b
ILT
76# This is where bfd.h lives.
77BFD_H = ../bfd/bfd.h
78
79# Header files.
80HFILES = \
81 arm-opc.h \
82 h8500-opc.h \
83 sh-opc.h \
84 sysdep.h \
85 w65-opc.h \
86 z8k-opc.h
a4c01299 87
f76db60b
ILT
88# C source files that correspond to .o's.
89CFILES = \
90 a29k-dis.c \
91 alpha-dis.c \
92 alpha-opc.c \
93 arm-dis.c \
94 d10v-dis.c \
95 d10v-opc.c \
96 dis-buf.c \
97 disassemble.c \
98 h8300-dis.c \
99 h8500-dis.c \
100 hppa-dis.c \
101 i386-dis.c \
102 i960-dis.c \
103 m68k-dis.c \
104 m68k-opc.c \
105 m88k-dis.c \
106 mips-dis.c \
107 mips-opc.c \
108 mips16-opc.c \
109 mn10200-dis.c \
110 mn10200-opc.c \
111 mn10300-dis.c \
112 mn10300-opc.c \
113 ns32k-dis.c \
114 ppc-dis.c \
115 ppc-opc.c \
116 sh-dis.c \
117 sparc-dis.c \
118 sparc-opc.c \
119 w65-dis.c \
120 z8k-dis.c \
121 z8kgen.c
122
123ALL_MACHINES = \
124 a29k-dis.o \
125 alpha-dis.o \
126 alpha-opc.o \
d7ace307 127 $(start-sanitize-arc) \
f76db60b
ILT
128 arc-dis.o \
129 arc-opc.o \
d7ace307 130 $(end-sanitize-arc) \
f76db60b
ILT
131 arm-dis.o \
132 d10v-dis.o \
133 d10v-opc.o \
b2e3f844 134 $(start-sanitize-d30v) \
f76db60b
ILT
135 d30v-dis.o \
136 d30v-opc.o \
b2e3f844 137 $(end-sanitize-d30v) \
f76db60b
ILT
138 h8300-dis.o \
139 h8500-dis.o \
140 hppa-dis.o \
141 i386-dis.o \
142 i960-dis.o \
143 m68k-dis.o \
144 m68k-opc.o \
145 m88k-dis.o \
146 mn10200-dis.o \
147 mn10200-opc.o \
148 mn10300-dis.o \
149 mn10300-opc.o \
150 mips-dis.o \
151 mips-opc.o \
152 mips16-opc.o \
153 ppc-dis.o \
154 ppc-opc.o \
155 ns32k-dis.o \
156 sh-dis.o \
157 sparc-dis.o \
158 sparc-opc.o \
a79d0193 159 $(start-sanitize-tic80) \
f76db60b
ILT
160 tic80-dis.o \
161 tic80-opc.o \
a79d0193 162 $(end-sanitize-tic80) \
f76db60b
ILT
163 $(start-sanitize-v850) \
164 v850-dis.o \
165 v850-opc.o \
166 $(end-sanitize-v850) \
167 w65-dis.o \
168 z8k-dis.o
d7ace307 169
40db6118 170OFILES = @BFD_MACHINES@ dis-buf.o disassemble.o
add1fb05
SC
171
172FLAGS_TO_PASS = \
173 "against=$(against)" \
174 "AR=$(AR)" \
175 "AR_FLAGS=$(AR_FLAGS)" \
176 "CC=$(CC)" \
177 "CFLAGS=$(CFLAGS)" \
178 "RANLIB=$(RANLIB)" \
179 "MAKEINFO=$(MAKEINFO)" \
180 "INSTALL=$(INSTALL)" \
181 "INSTALL_DATA=$(INSTALL_DATA)" \
e0bf1022 182 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
add1fb05 183
b2e3f844 184ALL_CFLAGS = -D_GNU_SOURCE $(CSEARCH) @HDEFINES@ $(CFLAGS)
add1fb05 185
40db6118 186.c.o:
e0bf1022
ILT
187 if [ -n "$(PICFLAG)" ]; then \
188 $(CC) -c $(PICFLAG) $(ALL_CFLAGS) $< -o pic/$@; \
189 else true; fi
40db6118 190 $(CC) -c $(ALL_CFLAGS) $<
add1fb05 191
e0bf1022 192all: $(ALLLIBS)
add1fb05
SC
193
194.NOEXPORT:
195
5d0734a7 196installcheck check:
add1fb05 197
e5bc6aaf 198info:
add1fb05 199clean-info:
e5bc6aaf 200install-info:
5d0734a7 201dvi:
add1fb05
SC
202
203# HDEPFILES comes from the host config; TDEPFILES from the target config.
204
add1fb05
SC
205$(TARGETLIB): $(OFILES)
206 rm -f $(TARGETLIB)
207 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
208 $(RANLIB) $(TARGETLIB)
209
c8303271 210LIBIBERTY_LISTS = ../libiberty/required-list ../libiberty/needed-list
42b4add9 211BFD_PICLIST = @BFD_PICLIST@
c8303271 212
42b4add9 213stamp-piclist: Makefile $(LIBIBERTY_LISTS) $(BFD_PICLIST)
e0bf1022
ILT
214 rm -f tpiclist
215 if [ -n "$(PICFLAG)" ]; then \
216 echo $(OFILES) | sed -e 's,\([^ ][^ ]*\),pic/\1,g' > tpiclist; \
217 else \
218 echo $(OFILES) > tpiclist; \
219 fi
c8303271
ILT
220 if [ "$(COMMON_SHLIB)" = "yes" ]; then \
221 lobjs=`cat $(LIBIBERTY_LISTS)`; \
222 if [ -n "$(PICFLAG)" ]; then \
223 lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),pic/\1,g'`; \
224 fi; \
225 lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),../libiberty/\1,g'`; \
226 echo $$lobjs >> tpiclist; \
42b4add9 227 sed -e 's,\([^ ][^ ]*\),../bfd/\1,g' $(BFD_PICLIST) >> tpiclist; \
c8303271 228 else true; fi
e0bf1022
ILT
229 $(srcdir)/../move-if-change tpiclist piclist
230 touch stamp-piclist
231
232piclist: stamp-piclist ; @true
233
c8303271 234$(SHLIB): stamp-picdir $(OFILES) piclist $(SHLIB_DEP)
e0bf1022 235 rm -f $(SHLIB)
c8303271 236 $(SHLIB_CC) $(SHLIB_CFLAGS) -o $(SHLIB) `cat piclist`
e0bf1022
ILT
237
238$(SHLINK): $(SHLIB)
6d76c71f
ILT
239 ts=lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed -e '$(program_transform_name)'`; \
240 if [ "$(COMMON_SHLIB)" = "yes" ]; then \
241 ts=../bfd/$$ts; \
242 fi; \
243 if [ "$$ts" != "$(SHLIB)" ]; then \
244 rm -f $$ts; \
f76db60b 245 ln -s `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $$ts; \
6d76c71f 246 else true; fi
e0bf1022 247 rm -f $(SHLINK)
f76db60b 248 ln -s `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $(SHLINK)
e0bf1022 249
6d76c71f
ILT
250# This target creates libTARGET-opcodes.so.VERSION as a symlink to
251# libopcodes.so.VERSION. It is used on SunOS, which does not have SONAME.
252stamp-tshlink: $(SHLIB)
253 tf=lib`echo $(SHLIB) | sed -e 's,\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
254 if [ "$(COMMON_SHLIB)" = "yes" ]; then \
255 tf=../bfd/$$tf; \
256 fi; \
257 if [ "$$tf" != "$(SHLIB)" ]; then \
258 rm -f $$tf; \
f76db60b 259 ln -s $(SHLIB) $$tf; \
6d76c71f
ILT
260 else true; fi
261 if [ "$(COMMON_SHLIB)" = "yes" ]; then \
262 tf=lib`echo $(TARGETLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \
263 if [ "$$tf" != "$(TARGETLIB)" ]; then \
264 rm -f $$tf; \
f76db60b 265 ln -s $(TARGETLIB) $$tf; \
6d76c71f
ILT
266 else true; fi; \
267 else true; fi
268 touch stamp-tshlink
269
e0bf1022
ILT
270$(OFILES): stamp-picdir
271
d7ace307 272disassemble.o: disassemble.c $(INCDIR)/dis-asm.h
e0bf1022
ILT
273 if [ -n "$(PICFLAG)" ]; then \
274 $(CC) -c @archdefs@ $(PICFLAG) $(ALL_CFLAGS) $(srcdir)/disassemble.c -o pic/disassemble.o; \
275 else true; fi
40db6118 276 $(CC) -c @archdefs@ $(ALL_CFLAGS) $(srcdir)/disassemble.c
d7ace307 277
39620b71 278# start-sanitize-tic80
7adf2630
ILT
279tic80-dis.o: tic80-dis.c $(INCDIR)/dis-asm.h ../bfd/bfd.h \
280 $(INCDIR)/opcode/tic80.h
39620b71 281tic80-opc.o: tic80-opc.c $(INCDIR)/opcode/tic80.h
f204f752 282# end-sanitize-tic80
39620b71 283
add1fb05
SC
284tags etags: TAGS
285
286TAGS: force
287 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
288
42b4add9 289MOSTLYCLEAN = *.o core *.E *.p *.ip pic/*.o
d7ace307 290mostlyclean:
c840244e 291 rm -rf $(MOSTLYCLEAN)
add1fb05 292clean:
e0bf1022 293 rm -f *.a $(MOSTLYCLEAN) $(SHLIB) $(SHLINK) piclist stamp-piclist
c840244e 294distclean: clean
e0bf1022 295 rm -rf Makefile config.status TAGS config.cache config.h stamp-h \
42b4add9 296 pic stamp-picdir config.log
e0bf1022 297clobber realclean maintainer-clean: distclean
add1fb05
SC
298
299# Mark everything as depending on config.status, since the timestamp on
300# sysdep.h might actually move backwards if we reconfig and relink it
301# to a different hosts/h-xxx.h file. This will force a recompile anyway.
302RECONFIG = config.status
303
add1fb05
SC
304# This target should be invoked before building a new release.
305# 'VERSION' file must be present and contain a string of the form "x.y"
306#
307roll:
308 @V=`cat VERSION` ; \
309 MAJ=`sed 's/\..*//' VERSION` ; \
310 MIN=`sed 's/.*\.//' VERSION` ; \
311 V=$$MAJ.`expr $$MIN + 1` ; \
312 rm -f VERSION ; \
313 echo $$V >VERSION ; \
314 echo Version $$V
315
316# Dummy target to force execution of dependent targets.
317#
318force:
319
e0bf1022
ILT
320install: $(ALLLIBS)
321 for f in $(ALLLIBS); do \
6d76c71f
ILT
322 if [ "$$f" = "stamp-tshlink" ]; then \
323 continue; \
324 fi; \
325 tf=lib`echo $$f | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
326 rm -f $(libdir)/$$tf; \
e0bf1022 327 if [ "$$f" = "$(SHLINK)" ]; then \
6d76c71f 328 ts=lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
f76db60b 329 ln -s $$ts $(libdir)/$$tf; \
e0bf1022 330 elif [ "$$f" = "$(SHLIB)" ]; then \
42b4add9 331 @INSTALL_SHLIB@ \
e0bf1022 332 else \
6d76c71f
ILT
333 $(INSTALL_DATA) $$f $(libdir)/$$tf; \
334 $(RANLIB) $(libdir)/$$tf; \
335 chmod a-x $(libdir)/$$tf; \
e0bf1022
ILT
336 fi; \
337 done
794a16b0 338
824155e8
ILT
339Makefile: Makefile.in config.status
340 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
341
342config.h: stamp-h ; @true
343stamp-h: config.in config.status
344 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
40db6118 345
c8303271 346config.status: configure $(srcdir)/../bfd/configure.host $(srcdir)/../bfd/config.bfd $(srcdir)/../bfd/VERSION
40db6118 347 $(SHELL) config.status --recheck
add1fb05 348
e0bf1022
ILT
349stamp-picdir:
350 if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
351 mkdir pic; \
352 else true; fi
353 touch stamp-picdir
add1fb05 354
f76db60b
ILT
355# This dependency stuff is copied from BFD.
356
357.dep: dep.sed $(CFILES) $(HFILES) config.h
358 rm -f .dep1
359 $(MAKE) DEP=$(DEP) .dep1
360 sed -f dep.sed < .dep1 > .dep
361
362.dep1: $(CFILES)
363 rm -f .dep2 .dep2a
364 echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
365 echo > .dep2a
366 $(DEP) -f .dep2a $(ALL_CFLAGS) $?
367 sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2
368 rm -f .dep2a
369 $(srcdir)/../move-if-change .dep2 .dep1
370
371dep.sed: dep-in.sed config.status
372 sed <$(srcdir)/dep-in.sed >dep.sed \
373 -e 's!@BFD_H@!$(BFD_H)!' \
374 -e 's!@INCDIR@!$(INCDIR)!' \
375 -e 's!@BFDDIR@!$(BFDDIR)!' \
376 -e 's!@SRCDIR@!$(srcdir)!'
377
378dep: .dep
379 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
380 cat .dep >> tmp-Makefile
381 $(srcdir)/../move-if-change tmp-Makefile Makefile
382
383dep-in: .dep
384 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
385 cat .dep >> tmp-Makefile.in
386 $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
387
add1fb05
SC
388# What appears below is generated by a hacked mkdep using gcc -MM.
389
390# DO NOT DELETE THIS LINE -- mkdep uses it.
391# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
f76db60b
ILT
392a29k-dis.o: a29k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
393 $(INCDIR)/ansidecl.h $(INCDIR)/opcode/a29k.h
394alpha-dis.o: alpha-dis.c $(INCDIR)/ansidecl.h sysdep.h \
395 config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/alpha.h
396alpha-opc.o: alpha-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/alpha.h \
397 $(BFD_H)
398arm-dis.o: arm-dis.c $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
399 arm-opc.h
400d10v-dis.o: d10v-dis.c $(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h \
401 $(BFD_H) $(INCDIR)/ansidecl.h
402d10v-opc.o: d10v-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/d10v.h
403dis-buf.o: dis-buf.c sysdep.h config.h $(INCDIR)/dis-asm.h \
404 $(BFD_H)
405disassemble.o: disassemble.c $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h \
406 $(BFD_H)
407h8300-dis.o: h8300-dis.c $(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h \
408 $(BFD_H) $(INCDIR)/ansidecl.h
409h8500-dis.o: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h \
410 $(BFD_H) $(INCDIR)/ansidecl.h
411hppa-dis.o: hppa-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
412 $(BFD_H) $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
413i386-dis.o: i386-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
414 $(INCDIR)/ansidecl.h sysdep.h config.h
415i960-dis.o: i960-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
416 $(INCDIR)/ansidecl.h
417m68k-dis.o: m68k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
418 $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h $(INCDIR)/opcode/m68k.h
419m68k-opc.o: m68k-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m68k.h
420m88k-dis.o: m88k-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
421 $(INCDIR)/ansidecl.h $(INCDIR)/opcode/m88k.h
422mips-dis.o: mips-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
423 $(BFD_H) $(INCDIR)/opcode/mips.h $(BFDDIR)/elf-bfd.h \
424 $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
425 $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h
426mips-opc.o: mips-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h
427mips16-opc.o: mips16-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mips.h
428mn10200-dis.o: mn10200-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h \
429 $(INCDIR)/dis-asm.h $(BFD_H)
430mn10200-opc.o: mn10200-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10200.h
431mn10300-dis.o: mn10300-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h \
432 $(INCDIR)/dis-asm.h $(BFD_H)
433mn10300-opc.o: mn10300-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/mn10300.h
434ns32k-dis.o: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
435 sysdep.h config.h $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h
436ppc-dis.o: ppc-dis.c $(INCDIR)/ansidecl.h sysdep.h \
437 config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ppc.h
438ppc-opc.o: ppc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ppc.h
439sh-dis.o: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) \
440 $(INCDIR)/ansidecl.h
441sparc-dis.o: sparc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/sparc.h \
442 $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/libiberty.h
443sparc-opc.o: sparc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/sparc.h
444w65-dis.o: w65-dis.c w65-opc.h $(INCDIR)/dis-asm.h \
445 $(BFD_H) $(INCDIR)/ansidecl.h
446z8k-dis.o: z8k-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
447 $(BFD_H) z8k-opc.h
448z8kgen.o: z8kgen.c sysdep.h config.h
add1fb05 449# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.182989 seconds and 4 git commands to generate.