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.
133 $(start-sanitize-arc
) \
136 $(end-sanitize-arc
) \
143 $(start-sanitize-d30v
) \
146 $(end-sanitize-d30v
) \
171 $(start-sanitize-tic80
) \
174 $(end-sanitize-tic80
) \
175 $(start-sanitize-v850
) \
178 $(end-sanitize-v850
) \
182 OFILES
= @BFD_MACHINES@ dis-buf.o disassemble.o
185 "against=$(against)" \
187 "AR_FLAGS=$(AR_FLAGS)" \
191 "MAKEINFO=$(MAKEINFO)" \
192 "INSTALL=$(INSTALL)" \
193 "INSTALL_DATA=$(INSTALL_DATA)" \
194 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
196 ALL_CFLAGS
= -D_GNU_SOURCE
$(CSEARCH
) @HDEFINES@
$(CFLAGS
)
199 if
[ -n
"$(PICFLAG)" ]; then \
200 $(CC
) -c
$(PICFLAG
) $(ALL_CFLAGS
) $< -o pic
/$@
; \
202 $(CC
) -c
$(ALL_CFLAGS
) $<
215 # HDEPFILES comes from the host config; TDEPFILES from the target config.
217 $(TARGETLIB
): $(OFILES
)
219 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
220 $(RANLIB
) $(TARGETLIB
)
222 LIBIBERTY_LISTS
= ..
/libiberty
/required-list ..
/libiberty
/needed-list
223 BFD_PICLIST
= @BFD_PICLIST@
225 stamp-piclist
: Makefile
$(LIBIBERTY_LISTS
) $(BFD_PICLIST
)
227 if
[ -n
"$(PICFLAG)" ]; then \
228 echo
$(OFILES
) | sed
-e
's,\([^ ][^ ]*\),pic/\1,g' > tpiclist
; \
230 echo
$(OFILES
) > tpiclist
; \
232 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
233 lobjs
=`cat $(LIBIBERTY_LISTS)`; \
234 if
[ -n
"$(PICFLAG)" ]; then \
235 lobjs
=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),pic/\1,g'`; \
237 lobjs
=`echo $$lobjs | sed -e 's,\([^ ][^ ]*\),../libiberty/\1,g'`; \
238 echo
$$lobjs >> tpiclist
; \
239 sed
-e
's,\([^ ][^ ]*\),../bfd/\1,g' $(BFD_PICLIST
) >> tpiclist
; \
241 $(srcdir)/..
/move-if-change tpiclist piclist
244 piclist
: stamp-piclist
; @true
246 $(SHLIB
): stamp-picdir
$(OFILES
) piclist
$(SHLIB_DEP
)
248 $(SHLIB_CC
) $(SHLIB_CFLAGS
) -o
$(SHLIB
) `cat piclist`
251 ts
=lib
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed -e '$(program_transform_name)'`; \
252 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
255 if
[ "$$ts" != "$(SHLIB)" ]; then \
257 ln
-s
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $$ts; \
260 ln
-s
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,'` $(SHLINK
)
262 # This target creates libTARGET-opcodes.so.VERSION as a symlink to
263 # libopcodes.so.VERSION. It is used on SunOS, which does not have SONAME.
264 stamp-tshlink
: $(SHLIB
)
265 tf
=lib
`echo $(SHLIB) | sed -e 's,\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
266 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
269 if
[ "$$tf" != "$(SHLIB)" ]; then \
271 ln
-s
$(SHLIB
) $$tf; \
273 if
[ "$(COMMON_SHLIB)" = "yes" ]; then \
274 tf
=lib
`echo $(TARGETLIB) | sed -e 's/^lib//' | sed '$(program_transform_name)'`; \
275 if
[ "$$tf" != "$(TARGETLIB)" ]; then \
277 ln
-s
$(TARGETLIB
) $$tf; \
282 $(OFILES
): stamp-picdir
284 disassemble.o
: disassemble.c
$(INCDIR
)/dis-asm.h
285 if
[ -n
"$(PICFLAG)" ]; then \
286 $(CC
) -c @archdefs@
$(PICFLAG
) $(ALL_CFLAGS
) $(srcdir)/disassemble.c
-o pic
/disassemble.o
; \
288 $(CC
) -c @archdefs@
$(ALL_CFLAGS
) $(srcdir)/disassemble.c
290 # start-sanitize-tic80
291 tic80-dis.o
: tic80-dis.c
$(INCDIR
)/dis-asm.h ..
/bfd
/bfd.h \
292 $(INCDIR
)/opcode
/tic80.h
293 tic80-opc.o
: tic80-opc.c
$(INCDIR
)/opcode
/tic80.h
299 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
301 MOSTLYCLEAN
= *.o core
*.E
*.p
*.ip pic
/*.o
303 rm -rf
$(MOSTLYCLEAN
)
305 rm -f
*.a
$(MOSTLYCLEAN
) $(SHLIB
) $(SHLINK
) piclist stamp-piclist
307 rm -rf Makefile config.status TAGS config.cache config.h stamp-h \
308 pic stamp-picdir config.log
309 clobber realclean maintainer-clean
: distclean
311 # Mark everything as depending on config.status, since the timestamp on
312 # sysdep.h might actually move backwards if we reconfig and relink it
313 # to a different hosts/h-xxx.h file. This will force a recompile anyway.
314 RECONFIG
= config.status
316 # This target should be invoked before building a new release.
317 # 'VERSION' file must be present and contain a string of the form "x.y"
321 MAJ
=`sed 's/\..*//' VERSION` ; \
322 MIN
=`sed 's/.*\.//' VERSION` ; \
323 V
=$$MAJ.
`expr $$MIN + 1` ; \
325 echo
$$V >VERSION
; \
328 # Dummy target to force execution of dependent targets.
333 for f in
$(ALLLIBS
); do \
334 if
[ "$$f" = "stamp-tshlink" ]; then \
337 tf
=lib
`echo $$f | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
338 rm -f
$(libdir)/$$tf; \
339 if
[ "$$f" = "$(SHLINK)" ]; then \
340 ts
=lib
`echo $(SHLIB) | sed -e 's,^\.\./bfd/,,' -e 's/^lib//' | sed '$(program_transform_name)'`; \
341 ln
-s
$$ts $(libdir)/$$tf; \
342 elif
[ "$$f" = "$(SHLIB)" ]; then \
345 $(INSTALL_DATA
) $$f $(libdir)/$$tf; \
346 $(RANLIB
) $(libdir)/$$tf; \
347 chmod a-x
$(libdir)/$$tf; \
351 Makefile
: Makefile.in config.status
352 CONFIG_FILES
=Makefile CONFIG_HEADERS
= $(SHELL
) .
/config.status
354 config.h
: stamp-h
; @true
355 stamp-h
: config.in config.status
356 CONFIG_FILES
= CONFIG_HEADERS
=config.h
:config.in
$(SHELL
) .
/config.status
358 config.status
: configure
$(srcdir)/..
/bfd
/configure.host
$(srcdir)/..
/bfd
/config.bfd
$(srcdir)/..
/bfd
/VERSION
359 $(SHELL
) config.status
--recheck
362 if
[ -n
"$(PICFLAG)" ] && [ ! -d pic
]; then \
367 # This dependency stuff is copied from BFD.
369 .dep
: dep.sed
$(CFILES
) $(HFILES
) config.h
371 $(MAKE
) DEP
=$(DEP
) .dep1
372 sed
-f dep.sed
< .dep1
> .dep
376 echo
'# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
378 $(DEP
) -f .dep2a
$(ALL_CFLAGS
) $?
379 sed
-e
'/DO NOT DELETE/d' -e
'/^$$/d' < .dep2a
>> .dep2
381 $(srcdir)/..
/move-if-change .dep2 .dep1
383 dep.sed
: dep-in.sed config.status
384 sed
<$(srcdir)/dep-in.sed
>dep.sed \
385 -e
's!@BFD_H@!$(BFD_H)!' \
386 -e
's!@INCDIR@!$(INCDIR)!' \
387 -e
's!@BFDDIR@!$(BFDDIR)!' \
388 -e
's!@SRCDIR@!$(srcdir)!'
391 sed
-e
'/^..DO NOT DELETE THIS LINE/,$$d' < Makefile
> tmp-Makefile
392 cat .dep
>> tmp-Makefile
393 $(srcdir)/..
/move-if-change tmp-Makefile Makefile
396 sed
-e
'/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in
> tmp-Makefile.in
397 cat .dep
>> tmp-Makefile.in
398 $(srcdir)/..
/move-if-change tmp-Makefile.in
$(srcdir)/Makefile.in
402 # What appears below is generated by a hacked mkdep using gcc -MM.
404 # DO NOT DELETE THIS LINE -- mkdep uses it.
405 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
406 a29k-dis.o
: a29k-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
407 $(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/a29k.h
408 alpha-dis.o
: alpha-dis.c
$(INCDIR
)/ansidecl.h sysdep.h \
409 config.h
$(INCDIR
)/dis-asm.h
$(BFD_H
) $(INCDIR
)/opcode
/alpha.h
410 alpha-opc.o
: alpha-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/alpha.h \
412 arm-dis.o
: arm-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) $(INCDIR
)/ansidecl.h \
414 cgen-asm.o
: cgen-asm.c config.h
$(INCDIR
)/ansidecl.h \
415 $(INCDIR
)/libiberty.h
$(BFD_H
) $(INCDIR
)/opcode
/cgen.h
416 cgen-dis.o
: cgen-dis.c config.h
$(INCDIR
)/ansidecl.h \
417 $(INCDIR
)/libiberty.h
$(BFD_H
) $(INCDIR
)/opcode
/cgen.h
418 cgen-opc.o
: cgen-opc.c config.h
$(INCDIR
)/ansidecl.h \
419 $(INCDIR
)/libiberty.h
$(BFD_H
) $(INCDIR
)/opcode
/cgen.h
420 d10v-dis.o
: d10v-dis.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/d10v.h \
421 $(INCDIR
)/dis-asm.h
$(BFD_H
)
422 d10v-opc.o
: d10v-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/d10v.h
423 dis-buf.o
: dis-buf.c sysdep.h config.h
$(INCDIR
)/dis-asm.h \
425 disassemble.o
: disassemble.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/dis-asm.h \
427 h8300-dis.o
: h8300-dis.c
$(INCDIR
)/opcode
/h8300.h
$(INCDIR
)/dis-asm.h \
428 $(BFD_H
) $(INCDIR
)/ansidecl.h
429 h8500-dis.o
: h8500-dis.c h8500-opc.h
$(INCDIR
)/dis-asm.h \
430 $(BFD_H
) $(INCDIR
)/ansidecl.h
431 hppa-dis.o
: hppa-dis.c sysdep.h config.h
$(INCDIR
)/dis-asm.h \
432 $(BFD_H
) $(BFDDIR
)/libhppa.h
$(INCDIR
)/opcode
/hppa.h
433 i386-dis.o
: i386-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
434 $(INCDIR
)/ansidecl.h sysdep.h config.h
435 i960-dis.o
: i960-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
437 m32r-asm.o
: m32r-asm.c
$(INCDIR
)/ansidecl.h
$(BFD_H
) \
438 m32r-opc.h
$(INCDIR
)/opcode
/cgen.h
439 m32r-dis.o
: m32r-dis.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/dis-asm.h \
440 $(BFD_H
) m32r-opc.h
$(INCDIR
)/opcode
/cgen.h
441 m32r-opc.o
: m32r-opc.c config.h
$(INCDIR
)/ansidecl.h \
442 $(INCDIR
)/libiberty.h
$(BFD_H
) m32r-opc.h
$(INCDIR
)/opcode
/cgen.h
443 m68k-dis.o
: m68k-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
444 $(INCDIR
)/ansidecl.h
$(INCDIR
)/floatformat.h
$(INCDIR
)/opcode
/m68k.h
445 m68k-opc.o
: m68k-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/m68k.h
446 m88k-dis.o
: m88k-dis.c
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
447 $(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/m88k.h
448 mips-dis.o
: mips-dis.c sysdep.h config.h
$(INCDIR
)/dis-asm.h \
449 $(BFD_H
) $(INCDIR
)/opcode
/mips.h
$(BFDDIR
)/elf-bfd.h \
450 $(INCDIR
)/elf
/common.h
$(INCDIR
)/elf
/internal.h
$(INCDIR
)/elf
/external.h \
451 $(INCDIR
)/bfdlink.h
$(INCDIR
)/elf
/mips.h
452 mips-opc.o
: mips-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mips.h
453 mips16-opc.o
: mips16-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mips.h
454 m10200-dis.o
: m10200-dis.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mn10200.h \
455 $(INCDIR
)/dis-asm.h
$(BFD_H
)
456 m10200-opc.o
: m10200-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mn10200.h
457 m10300-dis.o
: m10300-dis.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mn10300.h \
458 $(INCDIR
)/dis-asm.h
$(BFD_H
)
459 m10300-opc.o
: m10300-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/mn10300.h
460 ns32k-dis.o
: ns32k-dis.c
$(BFD_H
) $(INCDIR
)/ansidecl.h \
461 sysdep.h config.h
$(INCDIR
)/dis-asm.h
$(INCDIR
)/opcode
/ns32k.h
462 ppc-dis.o
: ppc-dis.c
$(INCDIR
)/ansidecl.h sysdep.h \
463 config.h
$(INCDIR
)/dis-asm.h
$(BFD_H
) $(INCDIR
)/opcode
/ppc.h
464 ppc-opc.o
: ppc-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/ppc.h
465 sh-dis.o
: sh-dis.c sh-opc.h
$(INCDIR
)/dis-asm.h
$(BFD_H
) \
467 sparc-dis.o
: sparc-dis.c
$(INCDIR
)/ansidecl.h sysdep.h \
468 config.h
$(INCDIR
)/opcode
/sparc.h
$(INCDIR
)/dis-asm.h \
469 $(BFD_H
) $(INCDIR
)/libiberty.h
470 sparc-opc.o
: sparc-opc.c
$(INCDIR
)/ansidecl.h
$(INCDIR
)/opcode
/sparc.h
471 w65-dis.o
: w65-dis.c w65-opc.h
$(INCDIR
)/dis-asm.h \
472 $(BFD_H
) $(INCDIR
)/ansidecl.h
473 z8k-dis.o
: z8k-dis.c sysdep.h config.h
$(INCDIR
)/dis-asm.h \
475 z8kgen.o
: z8kgen.c sysdep.h config.h
476 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY