Add Solaris/linux support
[deliverable/binutils-gdb.git] / opcodes / Makefile.in
CommitLineData
add1fb05 1# Makefile template for Configure for the opcodes library.
40db6118 2# Copyright (C) 1990, 1991, 1992, 1995 Free Software Foundation, Inc.
add1fb05
SC
3# Written by Cygnus Support.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
40db6118 17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
add1fb05 18
40db6118
ILT
19VPATH = @srcdir@
20srcdir = @srcdir@
add1fb05 21
40db6118 22prefix = @prefix@
add1fb05 23
6d76c71f 24program_transform_name = @program_transform_name@
40db6118 25exec_prefix = @exec_prefix@
add1fb05
SC
26bindir = $(exec_prefix)/bin
27libdir = $(exec_prefix)/lib
28
29datadir = $(prefix)/lib
30mandir = $(prefix)/man
31man1dir = $(mandir)/man1
32man2dir = $(mandir)/man2
33man3dir = $(mandir)/man3
34man4dir = $(mandir)/man4
35man5dir = $(mandir)/man5
36man6dir = $(mandir)/man6
37man7dir = $(mandir)/man7
38man8dir = $(mandir)/man8
39man9dir = $(mandir)/man9
40infodir = $(prefix)/info
41includedir = $(prefix)/include
42oldincludedir =
43docdir = $(srcdir)/doc
44
45SHELL = /bin/sh
46
40db6118
ILT
47INSTALL = @INSTALL@
48INSTALL_PROGRAM = @INSTALL_PROGRAM@
49INSTALL_DATA = @INSTALL_DATA@
add1fb05 50
40db6118
ILT
51AR = @AR@
52AR_FLAGS = rc
53CC = @CC@
54CFLAGS = @CFLAGS@
add1fb05 55MAKEINFO = makeinfo
40db6118 56RANLIB = @RANLIB@
add1fb05 57
e0bf1022
ILT
58ALLLIBS = @ALLLIBS@
59
60PICFLAG = @PICFLAG@
61SHLIB = @SHLIB@
62SHLIB_CC = @SHLIB_CC@
63SHLIB_CFLAGS = @SHLIB_CFLAGS@
64COMMON_SHLIB = @COMMON_SHLIB@
c8303271 65SHLIB_DEP = @SHLIB_DEP@
e0bf1022
ILT
66SHLINK = @SHLINK@
67
6d76c71f
ILT
68SONAME = lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`
69
fde326fb 70INCDIR = $(srcdir)/../include
c840244e 71BFDDIR = $(srcdir)/../bfd
fde326fb 72CSEARCH = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR)
add1fb05
SC
73DEP = mkdep
74
794a16b0 75TARGETLIB = libopcodes.a
add1fb05 76
f7ed13c7
JK
77# To circumvent a Sun make VPATH bug, each file listed here
78# should also have a foo.o: foo.c line further along in this file.
a4c01299 79
d7ace307
ILT
80ALL_MACHINES = a29k-dis.o alpha-dis.o h8300-dis.o h8500-dis.o \
81 $(start-sanitize-arc) \
82 arc-dis.o arc-opc.o \
83 $(end-sanitize-arc) \
40db6118 84 hppa-dis.o i386-dis.o i960-dis.o m68k-dis.o m68k-opc.o \
d7ace307
ILT
85 m88k-dis.o mips-dis.o mips-opc.o sh-dis.o sparc-dis.o \
86 sparc-opc.o z8k-dis.o ns32k-dis.o ppc-dis.o ppc-opc.o \
87 arm-dis.o w65-dis.o
88
40db6118 89OFILES = @BFD_MACHINES@ dis-buf.o disassemble.o
add1fb05
SC
90
91FLAGS_TO_PASS = \
92 "against=$(against)" \
93 "AR=$(AR)" \
94 "AR_FLAGS=$(AR_FLAGS)" \
95 "CC=$(CC)" \
96 "CFLAGS=$(CFLAGS)" \
97 "RANLIB=$(RANLIB)" \
98 "MAKEINFO=$(MAKEINFO)" \
99 "INSTALL=$(INSTALL)" \
100 "INSTALL_DATA=$(INSTALL_DATA)" \
e0bf1022 101 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
add1fb05 102
40db6118 103ALL_CFLAGS = $(CSEARCH) @HDEFINES@ $(CFLAGS)
add1fb05 104
40db6118 105.c.o:
e0bf1022
ILT
106 if [ -n "$(PICFLAG)" ]; then \
107 $(CC) -c $(PICFLAG) $(ALL_CFLAGS) $< -o pic/$@; \
108 else true; fi
40db6118 109 $(CC) -c $(ALL_CFLAGS) $<
add1fb05
SC
110
111# C source files that correspond to .o's.
d7ace307 112CFILES = i386-dis.c z8k-dis.c m68k-dis.c mips-dis.c ns32k-dis.c ppc-dis.c
add1fb05 113
e0bf1022 114all: $(ALLLIBS)
add1fb05
SC
115
116.NOEXPORT:
117
5d0734a7 118installcheck check:
add1fb05 119
e5bc6aaf 120info:
add1fb05 121clean-info:
e5bc6aaf 122install-info:
5d0734a7 123dvi:
add1fb05
SC
124
125# HDEPFILES comes from the host config; TDEPFILES from the target config.
126
127
128$(TARGETLIB): $(OFILES)
129 rm -f $(TARGETLIB)
130 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
131 $(RANLIB) $(TARGETLIB)
132
c8303271
ILT
133LIBIBERTY_LISTS = ../libiberty/required-list ../libiberty/needed-list
134BFD_LIST = ../bfd/piclist
135
136stamp-piclist: Makefile $(LIBIBERTY_LISTS) $(BFD_LIST)
e0bf1022
ILT
137 rm -f tpiclist
138 if [ -n "$(PICFLAG)" ]; then \
139 echo $(OFILES) | sed -e 's,\([^ ][^ ]*\),pic/\1,g' > tpiclist; \
140 else \
141 echo $(OFILES) > tpiclist; \
142 fi
c8303271
ILT
143 if [ "$(COMMON_SHLIB)" = "yes" ]; then \
144 lobjs=`cat $(LIBIBERTY_LISTS)`; \
145 if [ -n "$(PICFLAG)" ]; then \
146 lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),pic/\1,g'`; \
147 fi; \
148 lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),../libiberty/\1,g'`; \
149 echo $$lobjs >> tpiclist; \
150 sed -e 's,\([^ ][^ ]*\),../bfd/\1,g' $(BFD_LIST) >> tpiclist; \
151 else true; fi
e0bf1022
ILT
152 $(srcdir)/../move-if-change tpiclist piclist
153 touch stamp-piclist
154
155piclist: stamp-piclist ; @true
156
c8303271 157$(SHLIB): stamp-picdir $(OFILES) piclist $(SHLIB_DEP)
e0bf1022 158 rm -f $(SHLIB)
c8303271 159 $(SHLIB_CC) $(SHLIB_CFLAGS) -o $(SHLIB) `cat piclist`
e0bf1022
ILT
160
161$(SHLINK): $(SHLIB)
6d76c71f
ILT
162 ts=lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed -e '$(program_transform_name)'`; \
163 if [ "$(COMMON_SHLIB)" = "yes" ]; then \
164 ts=../bfd/$$ts; \
165 fi; \
166 if [ "$$ts" != "$(SHLIB)" ]; then \
167 rm -f $$ts; \
168 ln -sf `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $$ts; \
169 else true; fi
e0bf1022
ILT
170 rm -f $(SHLINK)
171 ln -sf `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $(SHLINK)
172
6d76c71f
ILT
173# This target creates libTARGET-opcodes.so.VERSION as a symlink to
174# libopcodes.so.VERSION. It is used on SunOS, which does not have SONAME.
175stamp-tshlink: $(SHLIB)
176 tf=lib`echo $(SHLIB) | sed -e 's,\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
177 if [ "$(COMMON_SHLIB)" = "yes" ]; then \
178 tf=../bfd/$$tf; \
179 fi; \
180 if [ "$$tf" != "$(SHLIB)" ]; then \
181 rm -f $$tf; \
182 ln -sf $(SHLIB) $$tf; \
183 else true; fi
184 if [ "$(COMMON_SHLIB)" = "yes" ]; then \
185 tf=lib`echo $(TARGETLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \
186 if [ "$$tf" != "$(TARGETLIB)" ]; then \
187 rm -f $$tf; \
188 ln -sf $(TARGETLIB) $$tf; \
189 else true; fi; \
190 else true; fi
191 touch stamp-tshlink
192
e0bf1022
ILT
193$(OFILES): stamp-picdir
194
d7ace307 195disassemble.o: disassemble.c $(INCDIR)/dis-asm.h
e0bf1022
ILT
196 if [ -n "$(PICFLAG)" ]; then \
197 $(CC) -c @archdefs@ $(PICFLAG) $(ALL_CFLAGS) $(srcdir)/disassemble.c -o pic/disassemble.o; \
198 else true; fi
40db6118 199 $(CC) -c @archdefs@ $(ALL_CFLAGS) $(srcdir)/disassemble.c
d7ace307 200
fde326fb
ILT
201a29k-dis.o: a29k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/a29k.h
202dis-buf.o: dis-buf.c $(INCDIR)/dis-asm.h
203h8500-dis.o: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h
204h8300-dis.o: h8300-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/h8300.h
205i386-dis.o: i386-dis.c $(INCDIR)/dis-asm.h
206i960-dis.o: i960-dis.c $(INCDIR)/dis-asm.h
d7ace307
ILT
207w65-dis.o: w65-dis.c
208m68k-dis.o: m68k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/floatformat.h \
fde326fb 209 $(INCDIR)/opcode/m68k.h
40db6118 210m68k-opc.o: m68k-opc.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/m68k.h
fde326fb 211mips-dis.o: mips-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/mips.h
d7ace307
ILT
212mips-opc.o: mips-opc.c $(INCDIR)/opcode/mips.h
213ppc-dis.o: ppc-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ppc.h
214ppc-opc.o: ppc-opc.c $(INCDIR)/opcode/ppc.h
fde326fb
ILT
215sparc-dis.o: sparc-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/sparc.h
216sparc-opc.o: sparc-opc.c $(INCDIR)/opcode/sparc.h
217z8k-dis.o: z8k-dis.c z8k-opc.h $(INCDIR)/dis-asm.h
d7ace307 218ns32k-dis.o: ns32k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h
fde326fb
ILT
219sh-dis.o: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h
220alpha-dis.o: alpha-dis.c alpha-opc.h $(INCDIR)/dis-asm.h
221hppa-dis.o: hppa-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/hppa.h
a4c01299 222m88k-dis.o: m88k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/m88k.h
d7ace307 223arm-dis.o: arm-dis.c arm-opc.h $(INCDIR)/dis-asm.h
68ca3238 224
add1fb05
SC
225tags etags: TAGS
226
227TAGS: force
228 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
229
e0bf1022 230MOSTLYCLEAN = *.o core *.E *.p *.ip config.log pic/*.o
d7ace307 231mostlyclean:
c840244e 232 rm -rf $(MOSTLYCLEAN)
add1fb05 233clean:
e0bf1022 234 rm -f *.a $(MOSTLYCLEAN) $(SHLIB) $(SHLINK) piclist stamp-piclist
c840244e 235distclean: clean
e0bf1022
ILT
236 rm -rf Makefile config.status TAGS config.cache config.h stamp-h \
237 pic stamp-picdir
238clobber realclean maintainer-clean: distclean
add1fb05
SC
239
240# Mark everything as depending on config.status, since the timestamp on
241# sysdep.h might actually move backwards if we reconfig and relink it
242# to a different hosts/h-xxx.h file. This will force a recompile anyway.
243RECONFIG = config.status
244
245
246
247# This target should be invoked before building a new release.
248# 'VERSION' file must be present and contain a string of the form "x.y"
249#
250roll:
251 @V=`cat VERSION` ; \
252 MAJ=`sed 's/\..*//' VERSION` ; \
253 MIN=`sed 's/.*\.//' VERSION` ; \
254 V=$$MAJ.`expr $$MIN + 1` ; \
255 rm -f VERSION ; \
256 echo $$V >VERSION ; \
257 echo Version $$V
258
259# Dummy target to force execution of dependent targets.
260#
261force:
262
e0bf1022
ILT
263install: $(ALLLIBS)
264 for f in $(ALLLIBS); do \
6d76c71f
ILT
265 if [ "$$f" = "stamp-tshlink" ]; then \
266 continue; \
267 fi; \
268 tf=lib`echo $$f | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
269 rm -f $(libdir)/$$tf; \
e0bf1022 270 if [ "$$f" = "$(SHLINK)" ]; then \
6d76c71f
ILT
271 ts=lib`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
272 ln -sf $$ts $(libdir)/$$tf; \
e0bf1022 273 elif [ "$$f" = "$(SHLIB)" ]; then \
6d76c71f 274 $(INSTALL_PROGRAM) $$f $(libdir)/$$tf; \
e0bf1022 275 else \
6d76c71f
ILT
276 $(INSTALL_DATA) $$f $(libdir)/$$tf; \
277 $(RANLIB) $(libdir)/$$tf; \
278 chmod a-x $(libdir)/$$tf; \
e0bf1022
ILT
279 fi; \
280 done
794a16b0 281
824155e8
ILT
282Makefile: Makefile.in config.status
283 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
284
285config.h: stamp-h ; @true
286stamp-h: config.in config.status
287 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
40db6118 288
c8303271 289config.status: configure $(srcdir)/../bfd/configure.host $(srcdir)/../bfd/config.bfd $(srcdir)/../bfd/VERSION
40db6118 290 $(SHELL) config.status --recheck
add1fb05
SC
291
292dep: $(CFILES)
293 mkdep $(CFLAGS) $?
294
e0bf1022
ILT
295stamp-picdir:
296 if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
297 mkdir pic; \
298 else true; fi
299 touch stamp-picdir
add1fb05
SC
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
307# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
308
This page took 0.157219 seconds and 4 git commands to generate.