xref: /freebsd-12.1/gnu/usr.bin/binutils/as/Makefile (revision e8dce5b9)
1# $FreeBSD$
2
3
4# BINDIR
5.include "${.CURDIR}/../../Makefile.inc"
6WARNS?=	2
7NO_WERROR=
8.include "${.CURDIR}/../Makefile.inc0"
9
10.PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config
11
12PROG=	as
13MAN=	doc/as.1
14SRCS+=	app.c as.c atof-generic.c atof-ieee.c bignum-copy.c \
15	cond.c dwarf2dbg.c ecoff.c expr.c flonum-copy.c flonum-konst.c \
16	flonum-mult.c frags.c hash.c input-file.c \
17	input-scrub.c listing.c literal.c macro.c messages.c \
18	obj-elf.c output-file.c read.c sb.c stabs.c \
19	subsegs.c symbols.c write.c depend.c ehopt.c dw2gencfi.c
20# DEO: why not used?
21#SRCS+=	itbl-ops.c
22
23.if ${TARGET_CPUARCH} == "mips"
24SRCS+=	itbl-ops.c itbl-parse.y itbl-lex.l
25.endif
26
27.if ${TARGET_ARCH} == "amd64"
28SRCS+=	tc-i386.c
29.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64"
30SRCS+=	tc-ppc.c
31.elif ${TARGET_ARCH} == "sparc64"
32# change back to tc-sparc.c when new binutils is imported
33SRCS+=	tc-sparc-fixed.c
34.else
35SRCS+=	tc-${TARGET_CPUARCH}.c
36.endif
37
38.if ${TARGET_ARCH} == "sparc64"
39CFLAGS+= -DDEFAULT_ARCH=\"v9-64\"
40.else
41CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\"
42.endif
43.if defined(TARGET_BIG_ENDIAN)
44CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1
45.endif
46CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\"
47CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\"
48CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\"
49CFLAGS+= -DVERSION=\"${VERSION}\"
50CFLAGS+= -D_GNU_SOURCE
51CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/gas/config -I${SRCDIR}
52CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-freebsd
53
54NO_SHARED?=	yes
55
56DPADD=	${RELTOP}/libbfd/libbfd.a
57DPADD+=	${RELTOP}/libiberty/libiberty.a
58DPADD+=	${RELTOP}/libopcodes/libopcodes.a
59LDADD=	${DPADD}
60
61.include <bsd.prog.mk>
62