1 # Makefile template for Configure for the opcodes library.
2 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
3 # Free Software Foundation, Inc.
4 # Written by Cygnus Support.
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.
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.
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
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 program_transform_name
= @program_transform_name@
26 exec_prefix = @
exec_prefix@
32 man1dir = $(mandir)/man1
33 man2dir = $(mandir)/man2
34 man3dir = $(mandir)/man3
35 man4dir = $(mandir)/man4
36 man5dir = $(mandir)/man5
37 man6dir = $(mandir)/man6
38 man7dir = $(mandir)/man7
39 man8dir = $(mandir)/man8
40 man9dir = $(mandir)/man9
42 includedir = @
includedir@
47 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
48 INSTALL_DATA
= @INSTALL_DATA@
62 SHLIB_CFLAGS
= @SHLIB_CFLAGS@
63 COMMON_SHLIB
= @COMMON_SHLIB@
64 SHLIB_DEP
= @SHLIB_DEP@
67 SONAME
= lib
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`
69 INCDIR
= $(srcdir)/..
/include
70 BFDDIR
= $(srcdir)/..
/bfd
71 CSEARCH
= -I.
-I
$(srcdir) -I..
/bfd
-I
$(INCDIR
) -I
$(BFDDIR
)
74 TARGETLIB
= libopcodes.a
76 # To circumvent a Sun make VPATH bug, each file listed here
77 # should also have a foo.o: foo.c line further along in this file.
79 ALL_MACHINES
= a29k-dis.o alpha-dis.o alpha-opc.o h8300-dis.o h8500-dis.o \
80 $(start-sanitize-arc
) \
83 $(start-sanitize-d10v
) \
84 d10v-dis.o d10v-opc.o \
85 $(end-sanitize-d10v
) \
86 $(start-sanitize-d30v
) \
87 d30v-dis.o d30v-opc.o \
88 $(end-sanitize-d30v
) \
89 hppa-dis.o i386-dis.o i960-dis.o m68k-dis.o m68k-opc.o \
90 m88k-dis.o mn10200-dis.o mn10200-opc.o mn10300-dis.o \
91 mn10300-opc.o mips-dis.o mips-opc.o mips16-opc.o sh-dis.o \
92 sparc-dis.o sparc-opc.o z8k-dis.o ns32k-dis.o ppc-dis.o ppc-opc.o \
93 $(start-sanitize-v850
) \
94 v850-dis.o v850-opc.o \
95 $(end-sanitize-v850
) \
96 $(start-sanitize-tic80
) \
97 tic80-dis.o tic80-opc.o \
98 $(end-sanitize-tic80
) \
101 OFILES
= @BFD_MACHINES@ dis-buf.o disassemble.o
104 "against=$(against)" \
106 "AR_FLAGS=$(AR_FLAGS)" \
110 "MAKEINFO=$(MAKEINFO)" \
111 "INSTALL=$(INSTALL)" \
112 "INSTALL_DATA=$(INSTALL_DATA)" \
113 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
115 ALL_CFLAGS
= -D_GNU_SOURCE
$(CSEARCH
) @HDEFINES@
$(CFLAGS
)
118 if
[ -n
"$(PICFLAG)" ]; then \
119 $(CC
) -c
$(PICFLAG
) $(ALL_CFLAGS
) $< -o pic
/$@
; \
121 $(CC
) -c
$(ALL_CFLAGS
) $<
123 # C source files that correspond to .o's.
124 CFILES
= i386-dis.c z8k-dis.c m68k-dis.c mips-dis.c ns32k-dis.c ppc-dis.c
137 # HDEPFILES comes from the host config; TDEPFILES from the target config.
140 $(TARGETLIB
): $(OFILES
)
142 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
143 $(RANLIB
) $(TARGETLIB
)
145 LIBIBERTY_LISTS
= ..
/libiberty
/required-list ..
/libiberty
/needed-list
146 BFD_PICLIST
= @BFD_PICLIST@
148 stamp-piclist
: Makefile
$(LIBIBERTY_LISTS
) $(BFD_PICLIST
)
150 if
[ -n
"$(PICFLAG)" ]; then \
151 echo
$(OFILES
) | sed
-e
's,\([^ ][^ ]*\),pic/\1,g' > tpiclist
; \
153 echo
$(OFILES
) > tpiclist
; \
155 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
156 lobjs
=`cat $(LIBIBERTY_LISTS)`; \
157 if
[ -n
"$(PICFLAG)" ]; then \
158 lobjs
=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),pic/\1,g'`; \
160 lobjs
=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),../libiberty/\1,g'`; \
161 echo
$$lobjs >> tpiclist
; \
162 sed
-e
's,\([^ ][^ ]*\),../bfd/\1,g' $(BFD_PICLIST
) >> tpiclist
; \
164 $(srcdir)/..
/move-if-change tpiclist piclist
167 piclist
: stamp-piclist
; @true
169 $(SHLIB
): stamp-picdir
$(OFILES
) piclist
$(SHLIB_DEP
)
171 $(SHLIB_CC
) $(SHLIB_CFLAGS
) -o
$(SHLIB
) `cat piclist`
174 ts
=lib
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed -e '$(program_transform_name)'`; \
175 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
178 if
[ "$$ts" != "$(SHLIB)" ]; then \
180 ln
-sf
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $$ts; \
183 ln
-sf
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $(SHLINK
)
185 # This target creates libTARGET-opcodes.so.VERSION as a symlink to
186 # libopcodes.so.VERSION. It is used on SunOS, which does not have SONAME.
187 stamp-tshlink
: $(SHLIB
)
188 tf
=lib
`echo $(SHLIB) | sed -e 's,\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
189 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
192 if
[ "$$tf" != "$(SHLIB)" ]; then \
194 ln
-sf
$(SHLIB
) $$tf; \
196 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
197 tf
=lib
`echo $(TARGETLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \
198 if
[ "$$tf" != "$(TARGETLIB)" ]; then \
200 ln
-sf
$(TARGETLIB
) $$tf; \
205 $(OFILES
): stamp-picdir
207 disassemble.o
: disassemble.c
$(INCDIR
)/dis-asm.h
208 if
[ -n
"$(PICFLAG)" ]; then \
209 $(CC
) -c @archdefs@
$(PICFLAG
) $(ALL_CFLAGS
) $(srcdir)/disassemble.c
-o pic
/disassemble.o
; \
211 $(CC
) -c @archdefs@
$(ALL_CFLAGS
) $(srcdir)/disassemble.c
213 a29k-dis.o
: a29k-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
$(INCDIR
)/opcode
/a29k.h
214 dis-buf.o
: dis-buf.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
215 h8500-dis.o
: h8500-dis.c h8500-opc.h
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
216 h8300-dis.o
: h8300-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h \
217 $(INCDIR
)/opcode
/h8300.h
218 i386-dis.o
: i386-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
219 i960-dis.o
: i960-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
221 m68k-dis.o
: m68k-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h \
222 $(INCDIR
)/floatformat.h
$(INCDIR
)/opcode
/m68k.h
223 m68k-opc.o
: m68k-opc.c
$(INCDIR
)/opcode
/m68k.h
224 mips-dis.o
: mips-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
$(INCDIR
)/opcode
/mips.h
225 mips-opc.o
: mips-opc.c
$(INCDIR
)/opcode
/mips.h
226 mips16-opc.o
: mips16-opc.c
$(INCDIR
)/opcode
/mips.h
227 ppc-dis.o
: ppc-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
$(INCDIR
)/opcode
/ppc.h
228 ppc-opc.o
: ppc-opc.c
$(INCDIR
)/opcode
/ppc.h
229 sparc-dis.o
: sparc-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h \
230 $(INCDIR
)/opcode
/sparc.h
231 sparc-opc.o
: sparc-opc.c
$(INCDIR
)/opcode
/sparc.h
232 z8k-dis.o
: z8k-dis.c z8k-opc.h
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
233 ns32k-dis.o
: ns32k-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h \
234 $(INCDIR
)/opcode
/ns32k.h
235 sh-dis.o
: sh-dis.c sh-opc.h
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
236 alpha-dis.o
: alpha-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h \
237 $(INCDIR
)/opcode
/alpha.h
238 alpha-opc.o
: alpha-opc.c
$(INCDIR
)/opcode
/alpha.h ..
/bfd
/bfd.h
239 hppa-dis.o
: hppa-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
$(INCDIR
)/opcode
/hppa.h
240 m88k-dis.o
: m88k-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
$(INCDIR
)/opcode
/m88k.h
241 arm-dis.o
: arm-dis.c arm-opc.h
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h
242 # start-sanitize-tic80
243 tic80-dis.o
: tic80-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h \
244 $(INCDIR
)/opcode
/tic80.h
245 tic80-opc.o
: tic80-opc.c
$(INCDIR
)/opcode
/tic80.h
252 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
254 MOSTLYCLEAN
= *.o core
*.E
*.p
*.ip pic
/*.o
256 rm -rf
$(MOSTLYCLEAN
)
258 rm -f
*.a
$(MOSTLYCLEAN
) $(SHLIB
) $(SHLINK
) piclist stamp-piclist
260 rm -rf Makefile config.status TAGS config.cache config.h stamp-h \
261 pic stamp-picdir config.log
262 clobber realclean maintainer-clean
: distclean
264 # Mark everything as depending on config.status, since the timestamp on
265 # sysdep.h might actually move backwards if we reconfig and relink it
266 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
267 RECONFIG
= config.status
271 # This target should be invoked before building a new release.
272 # 'VERSION' file must be present and contain a string of the form "x.y"
276 MAJ
=`sed 's/\..*//' VERSION` ; \
277 MIN
=`sed 's/.*\.//' VERSION` ; \
278 V
=$$MAJ.
`expr $$MIN + 1` ; \
280 echo
$$V >VERSION
; \
283 # Dummy target to force execution of dependent targets.
288 for f in
$(ALLLIBS
); do \
289 if
[ "$$f" = "stamp-tshlink" ]; then \
292 tf
=lib
`echo $$f | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
293 rm -f
$(libdir)/$$tf; \
294 if
[ "$$f" = "$(SHLINK)" ]; then \
295 ts
=lib
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
296 ln
-sf
$$ts $(libdir)/$$tf; \
297 elif
[ "$$f" = "$(SHLIB)" ]; then \
300 $(INSTALL_DATA
) $$f $(libdir)/$$tf; \
301 $(RANLIB
) $(libdir)/$$tf; \
302 chmod a-x
$(libdir)/$$tf; \
306 Makefile
: Makefile.in config.status
307 CONFIG_FILES
=Makefile CONFIG_HEADERS
= $(SHELL
) .
/config.status
309 config.h
: stamp-h
; @true
310 stamp-h
: config.in config.status
311 CONFIG_FILES
= CONFIG_HEADERS
=config.h
:config.in
$(SHELL
) .
/config.status
313 config.status
: configure
$(srcdir)/..
/bfd
/configure.host
$(srcdir)/..
/bfd
/config.bfd
$(srcdir)/..
/bfd
/VERSION
314 $(SHELL
) config.status
--recheck
317 mkdep
$(ALL_CFLAGS
) $?
320 if
[ -n
"$(PICFLAG)" ] && [ ! -d pic
]; then \
325 # What appears below is generated by a hacked mkdep using gcc -MM.
327 # DO NOT DELETE THIS LINE -- mkdep uses it.
328 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
331 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY