1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = 1.11 dejagnu foreign no-dist
4 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
8 tooldir = $(exec_prefix)/$(target_alias)
10 YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
11 LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi`
13 # Automake 1.10+ disables lex and yacc output file regeneration if
14 # maintainer mode is disabled. Avoid this.
18 WARN_CFLAGS = @WARN_CFLAGS@
19 NO_WERROR = @NO_WERROR@
20 AM_CFLAGS = $(WARN_CFLAGS)
22 TARG_CPU = @target_cpu_type@
23 TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c
24 TARG_CPU_O = tc-@target_cpu_type@.@OBJEXT@
25 TARG_CPU_H = $(srcdir)/config/tc-@target_cpu_type@.h
26 OBJ_FORMAT_C = $(srcdir)/config/obj-@obj_format@.c
27 OBJ_FORMAT_O = obj-@obj_format@.@OBJEXT@
28 OBJ_FORMAT_H = $(srcdir)/config/obj-@obj_format@.h
29 TARG_ENV_H = $(srcdir)/config/te-@te_file@.h
30 ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
31 ATOF_TARG_O = atof-@atof@.@OBJEXT@
33 # use @target_cpu_type@ for refering to configured target name
34 IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
35 IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
36 IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
37 IT_OBJS=itbl-parse.@OBJEXT@ itbl-lex.@OBJEXT@ itbl-ops.@OBJEXT@
40 # Regular source files.
74 CFILES = $(GAS_CFILES) itbl-ops.c cgen.c
107 # CPU files in config.
109 TARGET_CPU_CFILES = \
135 config/tc-m68hc11.c \
139 config/tc-microblaze.c \
142 config/tc-mn10200.c \
143 config/tc-mn10300.c \
148 config/tc-openrisc.c \
166 config/tc-xstormy16.c \
171 config/xtensa-relax.c
173 TARGET_CPU_HFILES = \
199 config/tc-m68hc11.h \
203 config/tc-microblaze.h \
206 config/tc-mn10200.h \
207 config/tc-mn10300.h \
211 config/tc-openrisc.h \
229 config/tc-xstormy16.h \
234 config/xtensa-relax.h
236 # OBJ files in config
238 OBJ_FORMAT_CFILES = \
244 config/obj-fdpicelf.c \
249 OBJ_FORMAT_HFILES = \
255 config/obj-fdpicelf.h \
260 # Emulation header files in config
265 config/te-armeabi.h \
266 config/te-armlinuxeabi.h \
268 config/te-epoc-pe.h \
269 config/te-freebsd.h \
270 config/te-generic.h \
275 config/te-hppalinux64.h \
276 config/te-i386aix.h \
277 config/te-ia64aix.h \
278 config/te-interix.h \
284 config/te-nbsd532.h \
285 config/te-netware.h \
286 config/te-pc532mach.h \
290 config/te-solaris.h \
291 config/te-sparcaout.h \
294 config/te-symbian.h \
296 config/te-vxworks.h \
302 # Multi files in config
305 config/e-crisaout.c \
307 config/e-i386aout.c \
308 config/e-i386coff.c \
310 config/e-mipsecoff.c \
313 CONFIG_ATOF_CFILES = \
317 POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) \
318 $(TARG_ENV_HFILES) $(TARG_ENV_CFILES) $(OBJ_FORMAT_HFILES) \
319 $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
321 po/POTFILES.in: @MAINT@ Makefile
322 for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
323 && mv tmp $(srcdir)/po/POTFILES.in
325 # Note: GASP is now deprecated and has been removed. It is still
326 # available in the CVS archive or older binutils releases if it is needed.
327 noinst_PROGRAMS = as-new
328 noinst_SCRIPTS = $(GDBINIT)
329 EXTRA_SCRIPTS = .gdbinit
331 EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \
332 bfin-parse.c bfin-parse.h bfin-lex.c \
333 rx-parse.c rx-parse.h
335 diststuff: $(EXTRA_DIST) info
337 DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
339 # Now figure out from those variables how to compile and link.
341 BASEDIR = $(srcdir)/..
342 BFDDIR = $(BASEDIR)/bfd
343 INCDIR = $(BASEDIR)/include
345 # This is the variable actually used when we compile.
346 # Specify the directories to be searched for header files.
347 # Both . and srcdir are used, in that order,
348 # so that tm.h and config.h will be found in the compilation
349 # subdirectory rather than in the source directory.
350 AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \
351 -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) @INCINTL@ \
352 -DLOCALEDIR="\"$(datadir)/locale\""
354 # How to link with both our special library facilities
355 # and the system's installed libraries.
357 GASLIBS = @OPCODES_LIB@ ../bfd/libbfd.la ../libiberty/libiberty.a
359 # Files to be copied away after each stage in building.
360 STAGESTUFF = *.@OBJEXT@ $(noinst_PROGRAMS)
362 as_new_SOURCES = $(GAS_CFILES)
363 as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
364 $(extra_objects) $(GASLIBS) $(LIBINTL) $(LIBM)
365 as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
366 $(extra_objects) $(GASLIBS) $(LIBINTL_DEP)
367 EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
368 $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \
369 $(TARG_ENV_CFILES) $(CONFIG_ATOF_CFILES) $(MULTI_CFILES)
375 check-DEJAGNU: site.exp
376 if [ -d testsuite ]; then \
381 rm -f testsuite/site.exp
382 cp site.exp testsuite/site.exp
383 rootme=`pwd`; export rootme; \
384 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
385 EXPECT=${EXPECT} ; export EXPECT ; \
386 runtest=$(RUNTEST); \
388 if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
389 $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
391 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
394 # The m68k operand parser.
396 EXTRA_as_new_SOURCES += config/m68k-parse.y config/bfin-parse.y
398 # If m68k-parse.y is in a different directory, then ylwrap will use an
399 # absolute path when it invokes yacc, which will cause yacc to put the
400 # absolute path into the generated file. That's a pain when it comes
401 # to generating snapshots, because it introduces spurious diffs.
402 # Since when we make the snapshots $(srcdir) = ".", we check for that
403 # case and handle it differently. This means that anybody who
404 # configures with $(srcdir) = "." will have to set their path in the
405 # debugger if they want to debug m68k-parse.y. This is bad, but on
406 # the other hand it's good that people who use the prebuilt
407 # m68k-parse.c don't get a spurious absolute path.
408 m68k-parse.c: $(srcdir)/config/m68k-parse.y
409 f=$(srcdir)/config/m68k-parse.y; \
410 if [ $$f = "./config/m68k-parse.y" ]; then \
411 ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \
412 ln config/m68k-parse.y . > /dev/null 2>/dev/null || \
413 cp config/m68k-parse.y . >/dev/null 2>/dev/null; \
416 $(SHELL) $(YLWRAP) $$f y.tab.c m68k-parse.c -- $(YACCCOMPILE); \
417 if [ $$f = "m68k-parse.y" ]; then \
418 rm -f m68k-parse.y; \
420 # Disable -Werror, if it has been enabled, since old versions of bison/
421 # yacc will produce working code which contain compile time warnings.
422 m68k-parse.@OBJEXT@: m68k-parse.c
424 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR)
425 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
428 source='m68k-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
429 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
431 $(COMPILE) -c `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR)
434 # Don't let the .y.h rule clobber m68k-parse.h.
435 m68k-parse.h: ; @true
436 $(srcdir)/config/m68k-parse.h: ; @true
438 bfin-parse.c: $(srcdir)/config/bfin-parse.y
439 $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ;
440 bfin-parse.h: bfin-parse.c
441 bfin-parse.@OBJEXT@: bfin-parse.c \
442 $(srcdir)/config/bfin-aux.h $(srcdir)/config/bfin-defs.h \
443 $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
445 bfin-parse.h: ; @true
446 $(srcdir)/config/bfin-parse.h: ; @true
448 bfin-lex.c: $(srcdir)/config/bfin-lex.l
449 $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE)
450 bfin-lex.@OBJEXT@: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h
452 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f bfin-lex.c || echo $(srcdir)/`bfin-lex.c $(NO_WERROR)
453 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
456 source='bfin-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
457 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
459 $(COMPILE) -c `test -f bfin-lex.c || echo $(srcdir)/`bfin-lex.c $(NO_WERROR)
462 rx-parse.c: $(srcdir)/config/rx-parse.y
463 $(SHELL) $(YLWRAP) $(srcdir)/config/rx-parse.y y.tab.c rx-parse.c y.tab.h rx-parse.h -- $(YACCCOMPILE) -d ;
464 rx-parse.h: rx-parse.c
465 rx-parse.@OBJEXT@: rx-parse.c rx-parse.h $(srcdir)/config/rx-defs.h \
466 $(INCDIR)/elf/common.h $(INCDIR)/elf/rx.h $(BFDDIR)/libbfd.h
469 $(srcdir)/config/rx-defs.h: ; @true
471 # The instruction table specification lexical analyzer and parser.
473 # Disable -Werror, if it has been enabled, since old versions of bison/
474 # yacc will produce working code which contain compile time warnings.
475 itbl-lex.@OBJEXT@: itbl-lex.c itbl-parse.h
477 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-lex.c || echo $(srcdir)/`itbl-lex.c $(NO_WERROR)
478 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
481 source='itbl-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
482 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
484 $(COMPILE) -c `test -f itbl-lex.c || echo $(srcdir)/`itbl-lex.c $(NO_WERROR)
487 # Disable -Werror, if it has been enabled, since old versions of bison/
488 # yacc will produce working code which contain compile time warnings.
489 itbl-parse.@OBJEXT@: itbl-parse.c
491 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR)
492 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
495 source='itbl-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
496 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
498 $(COMPILE) -c `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR)
501 itbl-parse.c: $(srcdir)/itbl-parse.y
502 $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d
504 itbl-parse.h: itbl-parse.c ; @true
506 itbl-ops.@OBJEXT@: itbl-parse.h
508 # stand-alone itbl assembler & disassembler
510 EXTRA_PROGRAMS = itbl-test
511 itbl_test_SOURCES = itbl-parse.y itbl-lex.l
512 itbl_test_LDADD = itbl-tops.@OBJEXT@ itbl-test.@OBJEXT@ $(GASLIBS) @LEXLIB@
514 itbl-tops.@OBJEXT@: itbl-ops.c itbl-parse.h
516 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -o $@ -c -DSTAND_ALONE $(srcdir)/itbl-ops.c
517 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
520 source='itbl-ops.c' object='$@' libtool=no @AMDEPBACKSLASH@
521 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
523 $(COMPILE) -o $@ -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
526 itbl-test.@OBJEXT@: $(srcdir)/testsuite/gas/all/itbl-test.c
528 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
529 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
532 source='itbl-test.c' object='$@' libtool=no @AMDEPBACKSLASH@
533 DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
535 $(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
540 CGEN_CPU_PREFIX = @cgen_cpu_prefix@
542 cgen.@OBJEXT@: cgen.c cgen.h cgen-desc.h subsegs.h \
543 $(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
544 $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-desc.h \
545 $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-opc.h
547 # Remake the info files.
549 MOSTLYCLEANFILES = $(STAGESTUFF) core \
550 testsuite/*.@OBJEXT@ testsuite/*.out testsuite/gas.log testsuite/gas.sum \
551 testsuite/site.exp site.bak site.exp stage stage1 stage2
553 .PHONY: install-exec-local install-data-local
554 .PHONY: install-exec-bindir install-exec-tooldir
556 install-exec-local: install-exec-bindir @install_tooldir@
558 install-exec-bindir: $(noinst_PROGRAMS)
559 $(mkinstalldirs) $(DESTDIR)$(bindir)
560 @list='$(noinst_PROGRAMS)'; for p in $$list; do \
561 if test -f $$p; then \
562 echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
563 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
567 install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
568 $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
569 n=`echo as | sed '$(transform)'`; \
570 if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
571 rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
572 ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
573 || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
578 # These exist for maintenance purposes.
580 .PHONY: bootstrap bootstrap2 bootstrap3 stage1 stage2 stage3 comparison
584 rm -f stage && ln -s stage1 stage
585 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
587 rm -f stage && ln -s stage2 stage
588 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
589 $(MAKE) comparison against=stage2
592 rm -f stage && ln -s stage1 stage
593 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
595 rm -f stage && ln -s stage2 stage
596 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
597 $(MAKE) comparison against=stage2
600 rm -f stage && ln -s stage2 stage
601 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
602 $(MAKE) comparison against=stage2
604 # Copy the object files from a particular stage into a subdirectory.
607 -mv $(STAGESTUFF) stage1
608 if [ -f stage1/as-new$(EXEEXT) -a ! -f stage1/as$(EXEEXT) ] ; then (cd stage1 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
612 -mv $(STAGESTUFF) stage2
613 if [ -f stage2/as-new$(EXEEXT) -a ! -f stage2/as$(EXEEXT) ] ; then (cd stage2 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
617 -mv $(STAGESTUFF) stage3
618 if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi
622 # This rule is derived from corresponding code in the Makefile.in for gcc.
623 # The "tail +16c" is to bypass headers which may include timestamps or
624 # temporary assembly file names.
627 for file in *.@OBJEXT@ ; do \
628 tail +16c ./$$file > tmp-foo1; \
629 if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
630 if cmp tmp-foo1 tmp-foo2 ; then \
633 echo $$file differs ; \
641 .PHONY: de-stage1 de-stage2 de-stage3
644 - (cd stage1 ; rm -f as$(EXEEXT) ; mv -f * ..)
648 - (cd stage2 ; rm -f as$(EXEEXT) ; mv -f * ..)
652 - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..)
655 CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt