997239380c4149d3cf1c72ecbb5a22c0de041b35
[deliverable/binutils-gdb.git] / opcodes / Makefile.in
1 # Makefile template for Configure for the opcodes library.
2 # Copyright (C) 1990, 1991, 1992, 1995 Free Software Foundation, Inc.
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
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 VPATH = @srcdir@
20 srcdir = @srcdir@
21
22 prefix = @prefix@
23
24 exec_prefix = @exec_prefix@
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27
28 datadir = $(prefix)/lib
29 mandir = $(prefix)/man
30 man1dir = $(mandir)/man1
31 man2dir = $(mandir)/man2
32 man3dir = $(mandir)/man3
33 man4dir = $(mandir)/man4
34 man5dir = $(mandir)/man5
35 man6dir = $(mandir)/man6
36 man7dir = $(mandir)/man7
37 man8dir = $(mandir)/man8
38 man9dir = $(mandir)/man9
39 infodir = $(prefix)/info
40 includedir = $(prefix)/include
41 oldincludedir =
42 docdir = $(srcdir)/doc
43
44 SHELL = /bin/sh
45
46 INSTALL = @INSTALL@
47 INSTALL_PROGRAM = @INSTALL_PROGRAM@
48 INSTALL_DATA = @INSTALL_DATA@
49
50 AR = @AR@
51 AR_FLAGS = rc
52 CC = @CC@
53 CFLAGS = @CFLAGS@
54 MAKEINFO = makeinfo
55 RANLIB = @RANLIB@
56
57 ALLLIBS = @ALLLIBS@
58
59 PICFLAG = @PICFLAG@
60 SHLIB = @SHLIB@
61 SHLIB_CC = @SHLIB_CC@
62 SHLIB_CFLAGS = @SHLIB_CFLAGS@
63 COMMON_SHLIB = @COMMON_SHLIB@
64 SHLINK = @SHLINK@
65
66 INCDIR = $(srcdir)/../include
67 BFDDIR = $(srcdir)/../bfd
68 CSEARCH = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR)
69 DEP = mkdep
70
71 TARGETLIB = libopcodes.a
72
73 # To circumvent a Sun make VPATH bug, each file listed here
74 # should also have a foo.o: foo.c line further along in this file.
75
76 ALL_MACHINES = a29k-dis.o alpha-dis.o h8300-dis.o h8500-dis.o \
77 $(start-sanitize-arc) \
78 arc-dis.o arc-opc.o \
79 $(end-sanitize-arc) \
80 hppa-dis.o i386-dis.o i960-dis.o m68k-dis.o m68k-opc.o \
81 m88k-dis.o mips-dis.o mips-opc.o sh-dis.o sparc-dis.o \
82 sparc-opc.o z8k-dis.o ns32k-dis.o ppc-dis.o ppc-opc.o \
83 arm-dis.o w65-dis.o
84
85 OFILES = @BFD_MACHINES@ dis-buf.o disassemble.o
86
87 FLAGS_TO_PASS = \
88 "against=$(against)" \
89 "AR=$(AR)" \
90 "AR_FLAGS=$(AR_FLAGS)" \
91 "CC=$(CC)" \
92 "CFLAGS=$(CFLAGS)" \
93 "RANLIB=$(RANLIB)" \
94 "MAKEINFO=$(MAKEINFO)" \
95 "INSTALL=$(INSTALL)" \
96 "INSTALL_DATA=$(INSTALL_DATA)" \
97 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
98
99 ALL_CFLAGS = $(CSEARCH) @HDEFINES@ $(CFLAGS)
100
101 .c.o:
102 if [ -n "$(PICFLAG)" ]; then \
103 $(CC) -c $(PICFLAG) $(ALL_CFLAGS) $< -o pic/$@; \
104 else true; fi
105 $(CC) -c $(ALL_CFLAGS) $<
106
107 # C source files that correspond to .o's.
108 CFILES = i386-dis.c z8k-dis.c m68k-dis.c mips-dis.c ns32k-dis.c ppc-dis.c
109
110 all: $(ALLLIBS)
111
112 .NOEXPORT:
113
114 installcheck check:
115
116 info:
117 clean-info:
118 install-info:
119 dvi:
120
121 # HDEPFILES comes from the host config; TDEPFILES from the target config.
122
123
124 $(TARGETLIB): $(OFILES)
125 rm -f $(TARGETLIB)
126 $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
127 $(RANLIB) $(TARGETLIB)
128
129 stamp-piclist: Makefile
130 rm -f tpiclist
131 if [ -n "$(PICFLAG)" ]; then \
132 echo $(OFILES) | sed -e 's,\([^ ][^ ]*\),pic/\1,g' > tpiclist; \
133 else \
134 echo $(OFILES) > tpiclist; \
135 fi
136 $(srcdir)/../move-if-change tpiclist piclist
137 touch stamp-piclist
138
139 piclist: stamp-piclist ; @true
140
141 $(SHLIB): stamp-picdir $(OFILES) piclist
142 rm -f $(SHLIB)
143 if [ "$(COMMON_SHLIB)" != "yes" ]; then \
144 $(SHLIB_CC) $(SHLIB_CFLAGS) -o $(SHLIB) `cat piclist`; \
145 else \
146 lobjs=`cat ../libiberty/required-list ../libiberty/needed-list`; \
147 if [ -n "$(PICFLAG)" ]; then \
148 lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),pic/\1,g'`; \
149 fi; \
150 lobjs=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),../libiberty/\1,g'`; \
151 $(SHLIB_CC) $(SHLIB_CFLAGS) -o $(SHLIB) \
152 `sed -e 's,\([^ ][^ ]*\),../bfd/\1,g' ../bfd/piclist` \
153 `cat piclist` $$lobjs; \
154 fi
155
156 $(SHLINK): $(SHLIB)
157 rm -f $(SHLINK)
158 ln -sf `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $(SHLINK)
159
160 $(OFILES): stamp-picdir
161
162 disassemble.o: disassemble.c $(INCDIR)/dis-asm.h
163 if [ -n "$(PICFLAG)" ]; then \
164 $(CC) -c @archdefs@ $(PICFLAG) $(ALL_CFLAGS) $(srcdir)/disassemble.c -o pic/disassemble.o; \
165 else true; fi
166 $(CC) -c @archdefs@ $(ALL_CFLAGS) $(srcdir)/disassemble.c
167
168 a29k-dis.o: a29k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/a29k.h
169 dis-buf.o: dis-buf.c $(INCDIR)/dis-asm.h
170 h8500-dis.o: h8500-dis.c h8500-opc.h $(INCDIR)/dis-asm.h
171 h8300-dis.o: h8300-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/h8300.h
172 i386-dis.o: i386-dis.c $(INCDIR)/dis-asm.h
173 i960-dis.o: i960-dis.c $(INCDIR)/dis-asm.h
174 w65-dis.o: w65-dis.c
175 m68k-dis.o: m68k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/floatformat.h \
176 $(INCDIR)/opcode/m68k.h
177 m68k-opc.o: m68k-opc.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/m68k.h
178 mips-dis.o: mips-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/mips.h
179 mips-opc.o: mips-opc.c $(INCDIR)/opcode/mips.h
180 ppc-dis.o: ppc-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ppc.h
181 ppc-opc.o: ppc-opc.c $(INCDIR)/opcode/ppc.h
182 sparc-dis.o: sparc-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/sparc.h
183 sparc-opc.o: sparc-opc.c $(INCDIR)/opcode/sparc.h
184 z8k-dis.o: z8k-dis.c z8k-opc.h $(INCDIR)/dis-asm.h
185 ns32k-dis.o: ns32k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/ns32k.h
186 sh-dis.o: sh-dis.c sh-opc.h $(INCDIR)/dis-asm.h
187 alpha-dis.o: alpha-dis.c alpha-opc.h $(INCDIR)/dis-asm.h
188 hppa-dis.o: hppa-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/hppa.h
189 m88k-dis.o: m88k-dis.c $(INCDIR)/dis-asm.h $(INCDIR)/opcode/m88k.h
190 arm-dis.o: arm-dis.c arm-opc.h $(INCDIR)/dis-asm.h
191
192 tags etags: TAGS
193
194 TAGS: force
195 etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
196
197 MOSTLYCLEAN = *.o core *.E *.p *.ip config.log pic/*.o
198 mostlyclean:
199 rm -rf $(MOSTLYCLEAN)
200 clean:
201 rm -f *.a $(MOSTLYCLEAN) $(SHLIB) $(SHLINK) piclist stamp-piclist
202 distclean: clean
203 rm -rf Makefile config.status TAGS config.cache config.h stamp-h \
204 pic stamp-picdir
205 clobber realclean maintainer-clean: distclean
206
207 # Mark everything as depending on config.status, since the timestamp on
208 # sysdep.h might actually move backwards if we reconfig and relink it
209 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
210 RECONFIG = config.status
211
212
213
214 # This target should be invoked before building a new release.
215 # 'VERSION' file must be present and contain a string of the form "x.y"
216 #
217 roll:
218 @V=`cat VERSION` ; \
219 MAJ=`sed 's/\..*//' VERSION` ; \
220 MIN=`sed 's/.*\.//' VERSION` ; \
221 V=$$MAJ.`expr $$MIN + 1` ; \
222 rm -f VERSION ; \
223 echo $$V >VERSION ; \
224 echo Version $$V
225
226 # Dummy target to force execution of dependent targets.
227 #
228 force:
229
230 install: $(ALLLIBS)
231 for f in $(ALLLIBS); do \
232 bf=`echo $$f | sed -e 's,^\.\./bfd/,,'`; \
233 rm -f $(libdir)/$$bf; \
234 if [ "$$f" = "$(SHLINK)" ]; then \
235 ln -sf `echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $(libdir)/$$bf; \
236 elif [ "$$f" = "$(SHLIB)" ]; then \
237 $(INSTALL_PROGRAM) $$f $(libdir)/$$bf; \
238 else \
239 $(INSTALL_DATA) $$f $(libdir)/$$bf; \
240 $(RANLIB) $(libdir)/$$bf; \
241 chmod a-x $(libdir)/$$bf; \
242 fi; \
243 done
244
245 Makefile: Makefile.in config.status
246 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
247
248 config.h: stamp-h ; @true
249 stamp-h: config.in config.status
250 CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
251
252 config.status : configure $(srcdir)/../bfd/configure.host $(srcdir)/../bfd/config.bfd
253 $(SHELL) config.status --recheck
254
255 dep: $(CFILES)
256 mkdep $(CFLAGS) $?
257
258 stamp-picdir:
259 if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
260 mkdir pic; \
261 else true; fi
262 touch stamp-picdir
263
264 # What appears below is generated by a hacked mkdep using gcc -MM.
265
266 # DO NOT DELETE THIS LINE -- mkdep uses it.
267 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
268
269
270 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
271
This page took 0.546358 seconds and 4 git commands to generate.