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 $
5 .include "config/Makefile.$(MACHINE_ARCH)"
7 .if !defined (gas_hosttype)
8 gas_hosttype=$(MACHINE_ARCH)
10 .if !defined (gas_target)
11 gas_target=$(MACHINE_ARCH)
13 .if !defined (gas_objformat)
17 ADDINCLUDE=-I${.OBJDIR}
20 BINDIR= /usr/libexec/gcc2/aout
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
32 CONF_HEADERS= targ-cpu.h obj-format.h host.h targ-env.h
34 .PATH: $(.CURDIR)/config
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 )
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 )
46 .if exists ($(.CURDIR)/config/ho-$(gas_hosttype).h)
47 config_hostfile= $(.CURDIR)/config/ho-$(gas_hosttype).h
49 config_hostfile= $(.CURDIR)/config/ho-generic.h
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 )
57 .if exists ($(.CURDIR)/config/te-$(MACHINE_ARCH).h)
58 config_targenvfile= $(.CURDIR)/config/te-$(MACHINE_ARCH).h
60 config_targenvfile= $(.CURDIR)/config/te-generic.h
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 )
68 CLEANFILES+= ${CONF_HEADERS}
70 .include <bsd.prog.mk>