Fixup /usr/libexec/gcc2/aout binutils generation. The install targets had
[dragonfly.git] / gnu / usr.bin / as / Makefile
1 #       from: @(#)Makefile      6.1 (Berkeley) 3/3/91
2 # $FreeBSD: src/gnu/usr.bin/as/Makefile,v 1.18.2.1 2001/04/25 12:03:26 ru Exp $
3 # $DragonFly: src/gnu/usr.bin/as/Attic/Makefile,v 1.3 2004/01/16 19:55:44 dillon Exp $
4
5 .include "config/Makefile.$(MACHINE_ARCH)"
6
7 .if !defined (gas_hosttype)
8 gas_hosttype=$(MACHINE_ARCH)
9 .endif
10 .if !defined (gas_target)
11 gas_target=$(MACHINE_ARCH)
12 .endif
13 .if !defined (gas_objformat)
14 gas_objformat=aout
15 .endif
16
17 ADDINCLUDE=-I${.OBJDIR}
18
19 PROG=           as
20 BINDIR= /usr/libexec/gcc2/aout
21 MAN=            as.1aout
22 SRCS+=          app.c as.c atof-generic.c bignum-copy.c \
23                 cond.c expr.c flo-const.c flo-copy.c flonum-mult.c \
24                 frags.c hash.c hex-value.c input-file.c input-scrub.c \
25                 listing.c messages.c obstack.c output-file.c read.c subsegs.c \
26                 symbols.c version.c write.c xmalloc.c xrealloc.c \
27                 obj-$(gas_objformat).c ${CONF_HEADERS}
28 CFLAGS+=        -I$(.CURDIR) ${ADDINCLUDE} -I$(.CURDIR)/config \
29                 -DOLD_GAS -DSIGTY=void -Derror=as_fatal \
30                 -DSUB_SEGMENT_ALIGN=4 -DFREEBSD_AOUT
31
32 CONF_HEADERS=   targ-cpu.h obj-format.h host.h targ-env.h
33
34 .PATH: $(.CURDIR)/config
35
36 targ-cpu.h: Makefile config/Makefile.$(MACHINE_ARCH) $(.CURDIR)/config/tc-$(gas_target).h
37         @cmp -s $(.CURDIR)/config/tc-$(gas_target).h targ-cpu.h || \
38             ( ${ECHO} "updating ${.TARGET}..." ; /bin/rm -f targ-cpu.h ; \
39             cp $(.CURDIR)/config/tc-$(gas_target).h targ-cpu.h )
40
41 obj-format.h: Makefile config/Makefile.$(MACHINE_ARCH) $(.CURDIR)/config/obj-$(gas_objformat).h
42         @cmp -s $(.CURDIR)/config/obj-$(gas_objformat).h obj-format.h || \
43             ( ${ECHO} "updating ${.TARGET}..." ; /bin/rm -f obj-format.h ; \
44             cp $(.CURDIR)/config/obj-$(gas_objformat).h obj-format.h )
45
46 .if exists ($(.CURDIR)/config/ho-$(gas_hosttype).h)
47 config_hostfile=        $(.CURDIR)/config/ho-$(gas_hosttype).h
48 .else
49 config_hostfile=        $(.CURDIR)/config/ho-generic.h
50 .endif
51
52 host.h: Makefile config/Makefile.$(MACHINE_ARCH) $(config_hostfile)
53         @cmp -s $(config_hostfile) host.h || \
54             ( ${ECHO} "updating ${.TARGET}..." ; /bin/rm -f host.h ; \
55             cp $(config_hostfile) host.h )
56
57 .if exists ($(.CURDIR)/config/te-$(MACHINE_ARCH).h)
58 config_targenvfile=     $(.CURDIR)/config/te-$(MACHINE_ARCH).h
59 .else
60 config_targenvfile=     $(.CURDIR)/config/te-generic.h
61 .endif
62
63 targ-env.h: Makefile config/Makefile.$(MACHINE_ARCH) $(config_targenvfile)
64         @cmp -s $(config_targenvfile) targ-env.h || \
65             ( ${ECHO} "updating ${.TARGET}..." ; /bin/rm -f targ-env.h ; \
66             cp $(config_targenvfile) targ-env.h )
67
68 CLEANFILES+= ${CONF_HEADERS}
69
70 .include <bsd.prog.mk>