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