* cpu-m32c.c (m32c_scan): New function. Ensures that a scan for
[binutils.git] / gas / Makefile.am
blob87fbe3c51e1766e50576f8a4e792db149c8c84d2
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
6 SUBDIRS = doc po
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.
15 am__skiplex =
16 am__skipyacc =
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@.o
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@.o
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@.o
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.o itbl-lex.o itbl-ops.o
39 # CPU types.  This is only used for dependency information.
41 CPU_TYPES = \
42         alpha \
43         arc \
44         arm \
45         avr \
46         bfin \
47         cr16 \
48         cris \
49         crx \
50         d10v \
51         d30v \
52         dlx \
53         fr30 \
54         frv \
55         h8300 \
56         hppa \
57         i370 \
58         i386 \
59         i860 \
60         i960 \
61         ia64 \
62         ip2k \
63         lm32 \
64         m32c \
65         m32r \
66         m68hc11 \
67         m68k \
68         maxq \
69         mcore \
70         mep \
71         microblaze \
72         mips \
73         mmix \
74         mn10200 \
75         mn10300 \
76         msp430 \
77         mt \
78         ns32k \
79         openrisc \
80         or32 \
81         pdp11 \
82         pj \
83         ppc \
84         rx \
85         s390 \
86         score \
87         sh \
88         sh64 \
89         sparc \
90         spu \
91         tic30 \
92         tic4x \
93         tic54x \
94         v850 \
95         vax \
96         xc16x \
97         xstormy16 \
98         xtensa \
99         z80 \
100         z8k
102 # Object format types.  This is only used for dependency information.
103 # We deliberately omit SOM, since it does not work as a cross assembler.
105 OBJ_FORMATS = \
106         aout \
107         coff \
108         ecoff \
109         elf \
110         evax \
111         macho
113 # This is an sh case which sets valid according to whether the CPU
114 # type in the shell variable c and the OS type in the shell variable o
115 # are supported.  This helps cuts down on the amount of dependency
116 # information.
118 CPU_OBJ_VALID = \
119         valid= ; \
120         case $$o in \
121         aout) \
122           case $$c in \
123           arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tic30 | vax) \
124             valid=yes ;; \
125           esac ;; \
126         coff) \
127           case $$c in \
128           arm | h8300 | i386 | i960 | m68k | maxq | mcore | mips | or32 \
129                 | ppc | sh | sparc | tic* | xscale | z80 | z8k) \
130             valid=yes ;; \
131           esac ;; \
132         ecoff) \
133           case $$c in \
134           mips | alpha) valid=yes ;; \
135           esac ;; \
136         elf) valid=yes ; \
137           case $$c in \
138           maxq | ns32k | tic* | z80 | z8k) valid= ;; \
139           esac ;; \
140         evax) \
141           case $$c in \
142           alpha) valid=yes ;; \
143           esac ;; \
144         macho) \
145           case $$c in \
146           i386) valid=yes ;; \
147           esac ;; \
148         vms) \
149           case $$c in \
150           vax) valid=yes ;; \
151           esac ;; \
152         esac;
154 # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case.
156 MULTI_CPU_TYPES = i386 mips cris
158 MULTI_CPU_OBJ_VALID = \
159         valid= ; \
160         case $$o in \
161         aout) \
162           case $$c in \
163           i386 | cris) valid=yes ;; \
164           esac ;; \
165         coff) \
166           case $$c in \
167           i386 | mips) valid=yes ;; \
168           esac ;; \
169         ecoff) \
170           case $$c in \
171           mips) valid=yes ;; \
172           esac ;; \
173         elf) valid=yes ;; \
174         esac;
176 # Regular source files.
178 GAS_CFILES = \
179         app.c \
180         as.c \
181         atof-generic.c \
182         cond.c \
183         depend.c \
184         dwarf2dbg.c \
185         dw2gencfi.c \
186         ecoff.c \
187         ehopt.c \
188         expr.c \
189         flonum-copy.c \
190         flonum-konst.c \
191         flonum-mult.c \
192         frags.c \
193         hash.c \
194         input-file.c \
195         input-scrub.c \
196         listing.c \
197         literal.c \
198         macro.c \
199         messages.c \
200         output-file.c \
201         read.c \
202         remap.c \
203         sb.c \
204         stabs.c \
205         subsegs.c \
206         symbols.c \
207         write.c
209 CFILES = $(GAS_CFILES) itbl-ops.c cgen.c
211 HFILES = \
212         as.h \
213         asintl.h \
214         bignum.h \
215         bit_fix.h \
216         cgen.h \
217         dwarf2dbg.h \
218         dw2gencfi.h \
219         ecoff.h \
220         emul-target.h \
221         emul.h \
222         expr.h \
223         flonum.h \
224         frags.h \
225         hash.h \
226         input-file.h \
227         itbl-lex.h \
228         itbl-ops.h \
229         listing.h \
230         macro.h \
231         obj.h \
232         output-file.h \
233         read.h \
234         sb.h \
235         struc-symbol.h \
236         subsegs.h \
237         symbols.h \
238         tc.h \
239         write.h
241 # CPU files in config.
243 TARGET_CPU_CFILES = \
244         config/tc-alpha.c \
245         config/tc-arc.c \
246         config/tc-arm.c \
247         config/tc-avr.c \
248         config/tc-bfin.c \
249         config/tc-cr16.c \
250         config/tc-cris.c \
251         config/tc-crx.c \
252         config/tc-d10v.c \
253         config/tc-d30v.c \
254         config/tc-dlx.c \
255         config/tc-fr30.c \
256         config/tc-frv.c \
257         config/tc-h8300.c \
258         config/tc-hppa.c \
259         config/tc-ia64.c \
260         config/tc-i370.c \
261         config/tc-i386.c \
262         config/tc-i860.c \
263         config/tc-i960.c \
264         config/tc-ip2k.c \
265         config/tc-iq2000.c \
266         config/tc-lm32.c \
267         config/tc-m32c.c \
268         config/tc-m32r.c \
269         config/tc-m68hc11.c \
270         config/tc-m68k.c \
271         config/tc-maxq.c \
272         config/tc-mcore.c \
273         config/tc-mep.c \
274         config/tc-microblaze.c \
275         config/tc-mips.c \
276         config/tc-mmix.c \
277         config/tc-mn10200.c \
278         config/tc-mn10300.c \
279         config/tc-moxie.c \
280         config/tc-msp430.c \
281         config/tc-mt.c \
282         config/tc-ns32k.c \
283         config/tc-openrisc.c \
284         config/tc-or32.c \
285         config/tc-pdp11.c \
286         config/tc-pj.c \
287         config/tc-ppc.c \
288         config/tc-rx.c \
289         config/tc-s390.c \
290         config/tc-score.c \
291         config/tc-sh.c \
292         config/tc-sh64.c \
293         config/tc-sparc.c \
294         config/tc-spu.c \
295         config/tc-tic30.c \
296         config/tc-tic4x.c \
297         config/tc-tic54x.c \
298         config/tc-vax.c \
299         config/tc-v850.c \
300         config/tc-xstormy16.c \
301         config/tc-xc16x.c \
302         config/tc-xtensa.c \
303         config/tc-z80.c \
304         config/tc-z8k.c \
305         config/xtensa-relax.c
307 TARGET_CPU_HFILES = \
308         config/tc-alpha.h \
309         config/tc-arc.h \
310         config/tc-arm.h \
311         config/tc-avr.h \
312         config/tc-bfin.h \
313         config/tc-cr16.h \
314         config/tc-cris.h \
315         config/tc-crx.h \
316         config/tc-d10v.h \
317         config/tc-d30v.h \
318         config/tc-dlx.h \
319         config/tc-fr30.h \
320         config/tc-frv.h \
321         config/tc-h8300.h \
322         config/tc-hppa.h \
323         config/tc-ia64.h \
324         config/tc-i370.h \
325         config/tc-i386.h \
326         config/tc-i860.h \
327         config/tc-i960.h \
328         config/tc-ip2k.h \
329         config/tc-iq2000.h \
330         config/tc-lm32.h \
331         config/tc-m32c.h \
332         config/tc-m32r.h \
333         config/tc-m68hc11.h \
334         config/tc-m68k.h \
335         config/tc-maxq.h \
336         config/tc-mcore.h \
337         config/tc-mep.h \
338         config/tc-microblaze.h \
339         config/tc-mips.h \
340         config/tc-mmix.h \
341         config/tc-mn10200.h \
342         config/tc-mn10300.h \
343         config/tc-msp430.h \
344         config/tc-mt.h \
345         config/tc-ns32k.h \
346         config/tc-openrisc.h \
347         config/tc-or32.h \
348         config/tc-pdp11.h \
349         config/tc-pj.h \
350         config/tc-ppc.h \
351         config/tc-rx.h \
352         config/tc-s390.h \
353         config/tc-score.h \
354         config/tc-sh.h \
355         config/tc-sh64.h \
356         config/tc-sparc.h \
357         config/tc-spu.h \
358         config/tc-tic30.h \
359         config/tc-tic4x.h \
360         config/tc-tic54x.h \
361         config/tc-vax.h \
362         config/tc-v850.h \
363         config/tc-xstormy16.h \
364         config/tc-xc16x.h \
365         config/tc-xtensa.h \
366         config/tc-z80.h \
367         config/tc-z8k.h \
368         config/xtensa-relax.h
370 # OBJ files in config
372 OBJ_FORMAT_CFILES = \
373         config/obj-aout.c \
374         config/obj-coff.c \
375         config/obj-ecoff.c \
376         config/obj-elf.c \
377         config/obj-evax.c \
378         config/obj-fdpicelf.c \
379         config/obj-macho.c \
380         config/obj-multi.c \
381         config/obj-som.c
383 OBJ_FORMAT_HFILES = \
384         config/obj-aout.h \
385         config/obj-coff.h \
386         config/obj-ecoff.h \
387         config/obj-elf.h \
388         config/obj-evax.h \
389         config/obj-fdpicelf.h \
390         config/obj-macho.h \
391         config/obj-multi.h \
392         config/obj-som.h
394 # Emulation header files in config
396 TARG_ENV_HFILES = \
397         config/te-386bsd.h \
398         config/te-aix5.h \
399         config/te-armeabi.h \
400         config/te-armlinuxeabi.h \
401         config/te-dynix.h \
402         config/te-epoc-pe.h \
403         config/te-freebsd.h \
404         config/te-generic.h \
405         config/te-gnu.h \
406         config/te-go32.h \
407         config/te-hppa.h \
408         config/te-hppa64.h \
409         config/te-hppalinux64.h \
410         config/te-i386aix.h \
411         config/te-ia64aix.h \
412         config/te-interix.h \
413         config/te-lnews.h \
414         config/te-lynx.h \
415         config/te-mach.h \
416         config/te-macos.h \
417         config/te-nbsd.h \
418         config/te-nbsd532.h \
419         config/te-netware.h \
420         config/te-pc532mach.h \
421         config/te-pe.h \
422         config/te-psos.h \
423         config/te-riscix.h \
424         config/te-solaris.h \
425         config/te-sparcaout.h \
426         config/te-sun3.h \
427         config/te-svr4.h \
428         config/te-symbian.h \
429         config/te-tmips.h \
430         config/te-vxworks.h \
431         config/te-wince-pe.h
433 TARG_ENV_CFILES = \
434         config/te-vms.c
436 # Multi files in config
438 MULTI_CFILES = \
439         config/e-crisaout.c \
440         config/e-criself.c \
441         config/e-i386aout.c \
442         config/e-i386coff.c \
443         config/e-i386elf.c \
444         config/e-mipsecoff.c \
445         config/e-mipself.c
447 CONFIG_OBJS = \
448         $(TARG_CPU_O) \
449         $(OBJ_FORMAT_O) \
450         $(ATOF_TARG_O) \
451         $(extra_objects)
453 GENERIC_OBJS = \
454         app.o \
455         as.o \
456         atof-generic.o \
457         cond.o \
458         depend.o \
459         dwarf2dbg.o \
460         dw2gencfi.o \
461         ehopt.o \
462         expr.o \
463         flonum-konst.o \
464         flonum-copy.o \
465         flonum-mult.o \
466         frags.o \
467         hash.o \
468         input-file.o \
469         input-scrub.o \
470         literal.o \
471         messages.o \
472         output-file.o \
473         read.o \
474         remap.o \
475         subsegs.o \
476         symbols.o \
477         write.o \
478         listing.o \
479         ecoff.o \
480         stabs.o \
481         sb.o \
482         macro.o
484 CONFIG_ATOF_CFILES = \
485         config/atof-ieee.c \
486         config/atof-vax.c
488 OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
490 POTFILES = $(MULTI_CFILES) $(CONFIG_ATOF_CFILES) \
491         $(TARG_ENV_HFILES) $(TARG_ENV_CFILES) $(OBJ_FORMAT_HFILES) \
492         $(OBJ_FORMAT_CFILES) $(TARGET_CPU_HFILES) $(TARGET_CPU_CFILES) \
493         $(HFILES) $(CFILES)
494 po/POTFILES.in: @MAINT@ Makefile
495         for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
496           && mv tmp $(srcdir)/po/POTFILES.in
498 # Note: GASP is now deprecated and has been removed.  It is still
499 # available in the CVS archive or older binutils releases if it is needed.
500 noinst_PROGRAMS = as-new
501 noinst_SCRIPTS = $(GDBINIT)
502 EXTRA_SCRIPTS = .gdbinit
504 EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \
505         bfin-parse.c bfin-parse.h bfin-lex.c \
506         rx-parse.c rx-parse.h
508 diststuff: $(EXTRA_DIST) info
510 DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
512 # Now figure out from those variables how to compile and link.
514 BASEDIR = $(srcdir)/..
515 BFDDIR = $(BASEDIR)/bfd
516 INCDIR = $(BASEDIR)/include
518 # This is the variable actually used when we compile.
519 # Specify the directories to be searched for header files.
520 # Both . and srcdir are used, in that order,
521 # so that tm.h and config.h will be found in the compilation
522 # subdirectory rather than in the source directory.
523 AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \
524         -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) @INCINTL@ \
525         -DLOCALEDIR="\"$(datadir)/locale\""
527 # How to link with both our special library facilities
528 # and the system's installed libraries.
530 GASLIBS = @OPCODES_LIB@ ../bfd/libbfd.la ../libiberty/libiberty.a
532 # Files to be copied away after each stage in building.
533 STAGESTUFF = *.o $(noinst_PROGRAMS)
535 as_new_SOURCES = $(GAS_CFILES)
536 as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
537         $(extra_objects) $(GASLIBS) $(LIBINTL) $(LIBM)
538 as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
539         $(extra_objects) $(GASLIBS) $(LIBINTL_DEP)
540 EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
541         $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) \
542         $(TARG_ENV_CFILES) $(CONFIG_ATOF_CFILES) $(MULTI_CFILES)
544 EXPECT = expect
545 RUNTEST = runtest
546 RUNTESTFLAGS=
548 check-DEJAGNU: site.exp
549         if [ -d testsuite ]; then \
550           true; \
551         else \
552           mkdir testsuite; \
553         fi
554         rm -f testsuite/site.exp
555         cp site.exp testsuite/site.exp
556         rootme=`pwd`; export rootme; \
557         srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
558         EXPECT=${EXPECT} ; export EXPECT ; \
559         runtest=$(RUNTEST); \
560         cd testsuite; \
561         if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
562           $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
563                 $(RUNTESTFLAGS); \
564         else echo "WARNING: could not find \`runtest'" 1>&2; :;\
565         fi
567 # The m68k operand parser.
569 EXTRA_as_new_SOURCES += config/m68k-parse.y config/bfin-parse.y
571 # If m68k-parse.y is in a different directory, then ylwrap will use an
572 # absolute path when it invokes yacc, which will cause yacc to put the
573 # absolute path into the generated file.  That's a pain when it comes
574 # to generating snapshots, because it introduces spurious diffs.
575 # Since when we make the snapshots $(srcdir) = ".", we check for that
576 # case and handle it differently.  This means that anybody who
577 # configures with $(srcdir) = "." will have to set their path in the
578 # debugger if they want to debug m68k-parse.y.  This is bad, but on
579 # the other hand it's good that people who use the prebuilt
580 # m68k-parse.c don't get a spurious absolute path.
581 m68k-parse.c: $(srcdir)/config/m68k-parse.y
582         f=$(srcdir)/config/m68k-parse.y; \
583         if [ $$f = "./config/m68k-parse.y" ]; then \
584           ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \
585            ln config/m68k-parse.y . > /dev/null 2>/dev/null || \
586            cp config/m68k-parse.y . >/dev/null 2>/dev/null; \
587           f=m68k-parse.y; \
588         else true; fi; \
589         $(SHELL) $(YLWRAP) $$f y.tab.c m68k-parse.c -- $(YACCCOMPILE); \
590         if [ $$f = "m68k-parse.y" ]; then \
591           rm -f m68k-parse.y; \
592         else true; fi
593 # Disable -Werror, if it has been enabled, since old versions of bison/
594 # yacc will produce working code which contain compile time warnings.
595 m68k-parse.o: m68k-parse.c
596 if am__fastdepCC
597         $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR)
598         mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
599 else
600 if AMDEP
601         source='m68k-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
602         DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
603 endif
604         $(COMPILE) -c `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR)
605 endif
607 # Don't let the .y.h rule clobber m68k-parse.h.
608 m68k-parse.h: ; @true
609 $(srcdir)/config/m68k-parse.h: ; @true
611 bfin-parse.c: $(srcdir)/config/bfin-parse.y
612         $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ;
613 bfin-parse.h: bfin-parse.c
614 bfin-parse.o: bfin-parse.c \
615  $(srcdir)/config/bfin-aux.h $(srcdir)/config/bfin-defs.h \
616  $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
618 bfin-parse.h: ; @true
619 $(srcdir)/config/bfin-parse.h: ; @true
621 bfin-lex.c: $(srcdir)/config/bfin-lex.l
622         $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE)
623 bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h
624 if am__fastdepCC
625         $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f bfin-lex.c || echo $(srcdir)/`bfin-lex.c $(NO_WERROR)
626         mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
627 else
628 if AMDEP
629         source='bfin-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
630         DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
631 endif
632         $(COMPILE) -c `test -f bfin-lex.c || echo $(srcdir)/`bfin-lex.c $(NO_WERROR)
633 endif
635 rx-parse.c: $(srcdir)/config/rx-parse.y
636         $(SHELL) $(YLWRAP) $(srcdir)/config/rx-parse.y y.tab.c rx-parse.c y.tab.h rx-parse.h -- $(YACCCOMPILE) -d ;
637 rx-parse.h: rx-parse.c
638 rx-parse.o: rx-parse.c rx-parse.h $(srcdir)/config/rx-defs.h \
639  $(INCDIR)/elf/common.h $(INCDIR)/elf/rx.h $(BFDDIR)/libbfd.h
641 rx-defs.h: ; @true
642 $(srcdir)/config/rx-defs.h: ; @true
644 # The instruction table specification lexical analyzer and parser.
646 # Disable -Werror, if it has been enabled, since old versions of bison/
647 # yacc will produce working code which contain compile time warnings.
648 itbl-lex.o: itbl-lex.c itbl-parse.h
649 if am__fastdepCC
650         $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-lex.c || echo $(srcdir)/`itbl-lex.c $(NO_WERROR)
651         mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
652 else
653 if AMDEP
654         source='itbl-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
655         DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
656 endif
657         $(COMPILE) -c `test -f itbl-lex.c || echo $(srcdir)/`itbl-lex.c $(NO_WERROR)
658 endif
660 # Disable -Werror, if it has been enabled, since old versions of bison/
661 # yacc will produce working code which contain compile time warnings.
662 itbl-parse.o: itbl-parse.c
663 if am__fastdepCC
664         $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR)
665         mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
666 else
667 if AMDEP
668         source='itbl-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
669         DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
670 endif
671         $(COMPILE) -c `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR)
672 endif
674 itbl-parse.c: $(srcdir)/itbl-parse.y
675         $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d
677 itbl-parse.h: itbl-parse.c ; @true
679 itbl-ops.o: itbl-parse.h
681 # stand-alone itbl assembler & disassembler
683 EXTRA_PROGRAMS = itbl-test
684 itbl_test_SOURCES = itbl-parse.y itbl-lex.l
685 itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
687 itbl-tops.o: itbl-ops.c itbl-parse.h
688 if am__fastdepCC
689         $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -o $@ -c -DSTAND_ALONE $(srcdir)/itbl-ops.c
690         mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
691 else
692 if AMDEP
693         source='itbl-ops.c' object='$@' libtool=no @AMDEPBACKSLASH@
694         DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
695 endif
696         $(COMPILE) -o $@ -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
697 endif
699 itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c
700 if am__fastdepCC
701         $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
702         mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
703 else
704 if AMDEP
705         source='itbl-test.c' object='$@' libtool=no @AMDEPBACKSLASH@
706         DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
707 endif
708         $(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
709 endif
711 # CGEN interface.
713 CGEN_CPU_PREFIX = @cgen_cpu_prefix@
715 cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \
716         $(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
717         $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-desc.h \
718         $(srcdir)/../opcodes/$(CGEN_CPU_PREFIX)-opc.h
720 # Remake the info files.
722 MOSTLYCLEANFILES = $(STAGESTUFF) core \
723         testsuite/*.o testsuite/*.out testsuite/gas.log testsuite/gas.sum \
724         testsuite/site.exp site.bak site.exp stage stage1 stage2
726 .PHONY: install-exec-local install-data-local
727 .PHONY: install-exec-bindir install-exec-tooldir
729 install-exec-local: install-exec-bindir @install_tooldir@
731 install-exec-bindir: $(noinst_PROGRAMS)
732         $(mkinstalldirs) $(DESTDIR)$(bindir)
733         @list='$(noinst_PROGRAMS)'; for p in $$list; do \
734           if test -f $$p; then \
735             echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
736             $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
737           else :; fi; \
738         done
740 install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
741         $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
742         n=`echo as | sed '$(transform)'`; \
743         if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
744           rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
745           ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
746             || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \
747         else \
748           true ; \
749         fi
751 # These exist for maintenance purposes.
753 .PHONY: bootstrap bootstrap2 bootstrap3 stage1 stage2 stage3 comparison
755 bootstrap: as-new
756         $(MAKE) stage1
757         rm -f stage && ln -s stage1 stage
758         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
759         $(MAKE) stage2
760         rm -f stage && ln -s stage2 stage
761         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
762         $(MAKE) comparison against=stage2
764 bootstrap2:
765         rm -f stage && ln -s stage1 stage
766         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
767         $(MAKE) stage2
768         rm -f stage && ln -s stage2 stage
769         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
770         $(MAKE) comparison against=stage2
772 bootstrap3:
773         rm -f stage && ln -s stage2 stage
774         $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
775         $(MAKE) comparison against=stage2
777 # Copy the object files from a particular stage into a subdirectory.
778 stage1:
779         -mkdir stage1
780         -mv $(STAGESTUFF) stage1
781         if [ -f stage1/as-new$(EXEEXT) -a ! -f stage1/as$(EXEEXT) ] ; then (cd stage1 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
783 stage2:
784         -mkdir stage2
785         -mv $(STAGESTUFF) stage2
786         if [ -f stage2/as-new$(EXEEXT) -a ! -f stage2/as$(EXEEXT) ] ; then (cd stage2 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
788 stage3:
789         -mkdir stage3
790         -mv $(STAGESTUFF) stage3
791         if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi
793 against=stage2
795 # This rule is derived from corresponding code in the Makefile.in for gcc.
796 # The "tail +16c" is to bypass headers which may include timestamps or
797 # temporary assembly file names.
798 comparison:
799         x=0 ; \
800         for file in *.o ; do \
801           tail +16c ./$$file > tmp-foo1; \
802           if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
803             if cmp tmp-foo1 tmp-foo2 ; then \
804               true ; \
805             else \
806               echo $$file differs ; \
807               x=1 ; \
808             fi ; \
809           else true; fi ; \
810         done ; \
811         exit $$x
812         -rm -f tmp-foo*
814 .PHONY: de-stage1 de-stage2 de-stage3
816 de-stage1:
817         - (cd stage1 ; rm -f as$(EXEEXT) ; mv -f * ..)
818         - rmdir stage1
820 de-stage2:
821         - (cd stage2 ; rm -f as$(EXEEXT) ; mv -f * ..)
822         - rmdir stage2
824 de-stage3:
825         - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..)
826         - rmdir stage3
828 CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt