xref: /freebsd-12.1/gnu/usr.bin/binutils/as/Makefile (revision 52eb44ce)
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 \
15	as.c \
16	atof-generic.c \
17	atof-ieee.c \
18	bignum-copy.c \
19	cond.c \
20	depend.c \
21	dw2gencfi.c \
22	dwarf2dbg.c \
23	ecoff.c \
24	ehopt.c \
25	expr.c \
26	flonum-copy.c \
27	flonum-konst.c \
28	flonum-mult.c \
29	frags.c \
30	hash.c \
31	input-file.c \
32	input-scrub.c \
33	listing.c \
34	literal.c \
35	macro.c \
36	messages.c \
37	obj-elf.c \
38	output-file.c \
39	read.c \
40	sb.c \
41	stabs.c \
42	subsegs.c \
43	symbols.c \
44	write.c
45# DEO: why not used?
46#SRCS+=	itbl-ops.c
47
48.if ${TARGET_ARCH} == "mips"
49SRCS+=	itbl-ops.c itbl-parse.y itbl-lex.l
50.endif
51
52.if ${TARGET_ARCH} == "amd64"
53SRCS+=	tc-i386.c
54.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64"
55SRCS+=	tc-ppc.c
56.elif ${TARGET_ARCH} == "sparc64"
57# change back to tc-sparc.c when new binutils is imported
58SRCS+=	tc-sparc-fixed.c
59.else
60SRCS+=	tc-${TARGET_ARCH}.c
61.endif
62
63.if ${TARGET_ARCH} == "sparc64"
64CFLAGS+= -DDEFAULT_ARCH=\"v9-64\"
65.else
66CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\"
67.endif
68.if defined(TARGET_BIG_ENDIAN)
69CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1
70.endif
71CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\"
72CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\"
73CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\"
74CFLAGS+= -DVERSION=\"${VERSION}\"
75CFLAGS+= -D_GNU_SOURCE
76CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/gas/config -I${SRCDIR}
77CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_ARCH}-freebsd
78
79NO_SHARED?=	yes
80
81DPADD=	${RELTOP}/libbfd/libbfd.a
82DPADD+=	${RELTOP}/libiberty/libiberty.a
83DPADD+=	${RELTOP}/libopcodes/libopcodes.a
84LDADD=	${DPADD}
85
86.include <bsd.prog.mk>
87