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 # This is where bfd.h lives.
88 # C source files that correspond to .o's.
127 $(start-sanitize-arc
) \
130 $(end-sanitize-arc
) \
134 $(start-sanitize-d30v
) \
137 $(end-sanitize-d30v
) \
159 $(start-sanitize-tic80
) \
162 $(end-sanitize-tic80
) \
163 $(start-sanitize-v850
) \
166 $(end-sanitize-v850
) \
170 OFILES
= @BFD_MACHINES@ dis-buf.o disassemble.o
173 "against=$(against)" \
175 "AR_FLAGS=$(AR_FLAGS)" \
179 "MAKEINFO=$(MAKEINFO)" \
180 "INSTALL=$(INSTALL)" \
181 "INSTALL_DATA=$(INSTALL_DATA)" \
182 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
184 ALL_CFLAGS
= -D_GNU_SOURCE
$(CSEARCH
) @HDEFINES@
$(CFLAGS
)
187 if
[ -n
"$(PICFLAG)" ]; then \
188 $(CC
) -c
$(PICFLAG
) $(ALL_CFLAGS
) $< -o pic
/$@
; \
190 $(CC
) -c
$(ALL_CFLAGS
) $<
203 # HDEPFILES comes from the host config; TDEPFILES from the target config.
205 $(TARGETLIB
): $(OFILES
)
207 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
208 $(RANLIB
) $(TARGETLIB
)
210 LIBIBERTY_LISTS
= ..
/libiberty
/required-list ..
/libiberty
/needed-list
211 BFD_PICLIST
= @BFD_PICLIST@
213 stamp-piclist
: Makefile
$(LIBIBERTY_LISTS
) $(BFD_PICLIST
)
215 if
[ -n
"$(PICFLAG)" ]; then \
216 echo
$(OFILES
) | sed
-e
's,\([^ ][^ ]*\),pic/\1,g' > tpiclist
; \
218 echo
$(OFILES
) > tpiclist
; \
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'`; \
225 lobjs
=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),../libiberty/\1,g'`; \
226 echo
$$lobjs >> tpiclist
; \
227 sed
-e
's,\([^ ][^ ]*\),../bfd/\1,g' $(BFD_PICLIST
) >> tpiclist
; \
229 $(srcdir)/..
/move-if-change tpiclist piclist
232 piclist
: stamp-piclist
; @true
234 $(SHLIB
): stamp-picdir
$(OFILES
) piclist
$(SHLIB_DEP
)
236 $(SHLIB_CC
) $(SHLIB_CFLAGS
) -o
$(SHLIB
) `cat piclist`
239 ts
=lib
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed -e '$(program_transform_name)'`; \
240 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
243 if
[ "$$ts" != "$(SHLIB)" ]; then \
245 ln
-s
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $$ts; \
248 ln
-s
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $(SHLINK
)
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.
252 stamp-tshlink
: $(SHLIB
)
253 tf
=lib
`echo $(SHLIB) | sed -e 's,\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
254 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
257 if
[ "$$tf" != "$(SHLIB)" ]; then \
259 ln
-s
$(SHLIB
) $$tf; \
261 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
262 tf
=lib
`echo $(TARGETLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \
263 if
[ "$$tf" != "$(TARGETLIB)" ]; then \
265 ln
-s
$(TARGETLIB
) $$tf; \
270 $(OFILES
): stamp-picdir
272 disassemble.o
: disassemble.c
$(INCDIR
)/dis-asm.h
273 if
[ -n
"$(PICFLAG)" ]; then \
274 $(CC
) -c @archdefs@
$(PICFLAG
) $(ALL_CFLAGS
) $(srcdir)/disassemble.c
-o pic
/disassemble.o
; \
276 $(CC
) -c @archdefs@
$(ALL_CFLAGS
) $(srcdir)/disassemble.c
278 # start-sanitize-tic80
279 tic80-dis.o
: tic80-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h \
280 $(INCDIR
)/opcode
/tic80.h
281 tic80-opc.o
: tic80-opc.c
$(INCDIR
)/opcode
/tic80.h
287 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
289 MOSTLYCLEAN
= *.o core
*.E
*.p
*.ip pic
/*.o
291 rm -rf
$(MOSTLYCLEAN
)
293 rm -f
*.a
$(MOSTLYCLEAN
) $(SHLIB
) $(SHLINK
) piclist stamp-piclist
295 rm -rf Makefile config.status TAGS config.cache config.h stamp-h \
296 pic stamp-picdir config.log
297 clobber realclean maintainer-clean
: distclean
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.
302 RECONFIG
= config.status
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"
309 MAJ
=`sed 's/\..*//' VERSION` ; \
310 MIN
=`sed 's/.*\.//' VERSION` ; \
311 V
=$$MAJ.
`expr $$MIN + 1` ; \
313 echo
$$V >VERSION
; \
316 # Dummy target to force execution of dependent targets.
321 for f in
$(ALLLIBS
); do \
322 if
[ "$$f" = "stamp-tshlink" ]; then \
325 tf
=lib
`echo $$f | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
326 rm -f
$(libdir)/$$tf; \
327 if
[ "$$f" = "$(SHLINK)" ]; then \
328 ts
=lib
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
329 ln
-s
$$ts $(libdir)/$$tf; \
330 elif
[ "$$f" = "$(SHLIB)" ]; then \
333 $(INSTALL_DATA
) $$f $(libdir)/$$tf; \
334 $(RANLIB
) $(libdir)/$$tf; \
335 chmod a-x
$(libdir)/$$tf; \
339 Makefile
: Makefile.in config.status
340 CONFIG_FILES
=Makefile CONFIG_HEADERS
= $(SHELL
) .
/config.status
342 config.h
: stamp-h
; @true
343 stamp-h
: config.in config.status
344 CONFIG_FILES
= CONFIG_HEADERS
=config.h
:config.in
$(SHELL
) .
/config.status
346 config.status
: configure
$(srcdir)/..
/bfd
/configure.host
$(srcdir)/..
/bfd
/config.bfd
$(srcdir)/..
/bfd
/VERSION
347 $(SHELL
) config.status
--recheck
350 if
[ -n
"$(PICFLAG)" ] && [ ! -d pic
]; then \
355 # This dependency stuff is copied from BFD.
357 .dep
: dep.sed
$(CFILES
) $(HFILES
) config.h
359 $(MAKE
) DEP
=$(DEP
) .dep1
360 sed
-f dep.sed
< .dep1
> .dep
364 echo
'# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
366 $(DEP
) -f .dep2a
$(ALL_CFLAGS
) $?
367 sed
-e
'/DO NOT DELETE/d' -e
'/^$$/d' < .dep2a
>> .dep2
369 $(srcdir)/..
/move-if-change .dep2 .dep1
371 dep.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)!'
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
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
390 # What appears below is generated by a hacked mkdep using gcc -MM.
392 # DO NOT DELETE THIS LINE -- mkdep uses it.
393 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
394 a29k-dis.o
: a29k-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
395 $(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/a29k.h
396 alpha-dis.o
: alpha-dis.c
$(INCDIR
)/ansidecl.h sysdep.h \
397 config.h
$(INCDIR
)/dis-asm.h
$(BFD_H
) $(INCDIR
)/opcode
/alpha.h
398 alpha-opc.o
: alpha-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/alpha.h \
400 arm-dis.o
: arm-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) $(INCDIR
)/ansidecl.h \
402 d10v-dis.o
: d10v-dis.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/d10v.h \
403 $(INCDIR
)/dis-asm.h
$(BFD_H
)
404 d10v-opc.o
: d10v-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/d10v.h
405 dis-buf.o
: dis-buf.c sysdep.h config.h
$(INCDIR
)/dis-asm.h \
407 disassemble.o
: disassemble.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/dis-asm.h \
409 h8300-dis.o
: h8300-dis.c
$(INCDIR
)/opcode
/h8300.h
$(INCDIR
)/dis-asm.h \
410 $(BFD_H
) $(INCDIR
)/ansidecl.h
411 h8500-dis.o
: h8500-dis.c h8500-opc.h
$(INCDIR
)/dis-asm.h \
412 $(BFD_H
) $(INCDIR
)/ansidecl.h
413 hppa-dis.o
: hppa-dis.c sysdep.h config.h
$(INCDIR
)/dis-asm.h \
414 $(BFD_H
) $(BFDDIR
)/libhppa.h
$(INCDIR
)/opcode
/hppa.h
415 i386-dis.o
: i386-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
416 $(INCDIR
)/ansidecl.h sysdep.h config.h
417 i960-dis.o
: i960-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
419 m68k-dis.o
: m68k-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
420 $(INCDIR
)/ansidecl.h
$(INCDIR
)/floatformat.h
$(INCDIR
)/opcode
/m68k.h
421 m68k-opc.o
: m68k-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/m68k.h
422 m88k-dis.o
: m88k-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
423 $(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/m88k.h
424 mips-dis.o
: mips-dis.c sysdep.h config.h
$(INCDIR
)/dis-asm.h \
425 $(BFD_H
) $(INCDIR
)/opcode
/mips.h
$(BFDDIR
)/elf-bfd.h \
426 $(INCDIR
)/elf
/common.h
$(INCDIR
)/elf
/internal.h
$(INCDIR
)/elf
/external.h \
427 $(INCDIR
)/bfdlink.h
$(INCDIR
)/elf
/mips.h
428 mips-opc.o
: mips-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mips.h
429 mips16-opc.o
: mips16-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mips.h
430 m10200-dis.o
: m10200-dis.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mn10200.h \
431 $(INCDIR
)/dis-asm.h
$(BFD_H
)
432 m10200-opc.o
: m10200-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mn10200.h
433 m10300-dis.o
: m10300-dis.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mn10300.h \
434 $(INCDIR
)/dis-asm.h
$(BFD_H
)
435 m10300-opc.o
: m10300-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mn10300.h
436 ns32k-dis.o
: ns32k-dis.c
$(BFD_H
) $(INCDIR
)/ansidecl.h \
437 sysdep.h config.h
$(INCDIR
)/dis-asm.h
$(INCDIR
)/opcode
/ns32k.h
438 ppc-dis.o
: ppc-dis.c
$(INCDIR
)/ansidecl.h sysdep.h \
439 config.h
$(INCDIR
)/dis-asm.h
$(BFD_H
) $(INCDIR
)/opcode
/ppc.h
440 ppc-opc.o
: ppc-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/ppc.h
441 sh-dis.o
: sh-dis.c sh-opc.h
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
443 sparc-dis.o
: sparc-dis.c
$(INCDIR
)/ansidecl.h sysdep.h \
444 config.h
$(INCDIR
)/opcode
/sparc.h
$(INCDIR
)/dis-asm.h \
445 $(BFD_H
) $(INCDIR
)/libiberty.h
446 sparc-opc.o
: sparc-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/sparc.h
447 w65-dis.o
: w65-dis.c w65-opc.h
$(INCDIR
)/dis-asm.h \
448 $(BFD_H
) $(INCDIR
)/ansidecl.h
449 z8k-dis.o
: z8k-dis.c sysdep.h config.h
$(INCDIR
)/dis-asm.h \
451 z8kgen.o
: z8kgen.c sysdep.h config.h
452 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY