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 $
4 .include "config/Makefile.$(MACHINE_ARCH)"
6 .if !defined (gas_hosttype)
7 gas_hosttype=$(MACHINE_ARCH)
9 .if !defined (gas_target)
10 gas_target=$(MACHINE_ARCH)
12 .if !defined (gas_objformat)
16 ADDINCLUDE=-I${.OBJDIR}
19 BINDIR= /usr/libexec/aout
21 SRCS+= app.c as.c atof-generic.c bignum-copy.c \
22 cond.c expr.c flo-const.c flo-copy.c flonum-mult.c \
23 frags.c hash.c hex-value.c input-file.c input-scrub.c \
24 listing.c messages.c obstack.c output-file.c read.c subsegs.c \
25 symbols.c version.c write.c xmalloc.c xrealloc.c \
26 obj-$(gas_objformat).c ${CONF_HEADERS}
27 CFLAGS+= -I$(.CURDIR) ${ADDINCLUDE} -I$(.CURDIR)/config \
28 -DOLD_GAS -DSIGTY=void -Derror=as_fatal \
29 -DSUB_SEGMENT_ALIGN=4 -DFREEBSD_AOUT
31 CONF_HEADERS= targ-cpu.h obj-format.h host.h targ-env.h
33 .PATH: $(.CURDIR)/config
35 targ-cpu.h: Makefile config/Makefile.$(MACHINE_ARCH) $(.CURDIR)/config/tc-$(gas_target).h
36 @cmp -s $(.CURDIR)/config/tc-$(gas_target).h targ-cpu.h || \
37 ( ${ECHO} "updating ${.TARGET}..." ; /bin/rm -f targ-cpu.h ; \
38 cp $(.CURDIR)/config/tc-$(gas_target).h targ-cpu.h )
40 obj-format.h: Makefile config/Makefile.$(MACHINE_ARCH) $(.CURDIR)/config/obj-$(gas_objformat).h
41 @cmp -s $(.CURDIR)/config/obj-$(gas_objformat).h obj-format.h || \
42 ( ${ECHO} "updating ${.TARGET}..." ; /bin/rm -f obj-format.h ; \
43 cp $(.CURDIR)/config/obj-$(gas_objformat).h obj-format.h )
45 .if exists ($(.CURDIR)/config/ho-$(gas_hosttype).h)
46 config_hostfile= $(.CURDIR)/config/ho-$(gas_hosttype).h
48 config_hostfile= $(.CURDIR)/config/ho-generic.h
51 host.h: Makefile config/Makefile.$(MACHINE_ARCH) $(config_hostfile)
52 @cmp -s $(config_hostfile) host.h || \
53 ( ${ECHO} "updating ${.TARGET}..." ; /bin/rm -f host.h ; \
54 cp $(config_hostfile) host.h )
56 .if exists ($(.CURDIR)/config/te-$(MACHINE_ARCH).h)
57 config_targenvfile= $(.CURDIR)/config/te-$(MACHINE_ARCH).h
59 config_targenvfile= $(.CURDIR)/config/te-generic.h
62 targ-env.h: Makefile config/Makefile.$(MACHINE_ARCH) $(config_targenvfile)
63 @cmp -s $(config_targenvfile) targ-env.h || \
64 ( ${ECHO} "updating ${.TARGET}..." ; /bin/rm -f targ-env.h ; \
65 cp $(config_targenvfile) targ-env.h )
67 CLEANFILES+= ${CONF_HEADERS}
69 .include <bsd.prog.mk>