xref: /freebsd-12.1/gnu/usr.bin/binutils/as/Makefile (revision 4da573d9)
1# $FreeBSD$
2
3
4# BINDIR
5.include "${.CURDIR}/../../Makefile.inc"
6.include "${.CURDIR}/../Makefile.inc0"
7.include <bsd.own.mk>
8
9.PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config
10
11PROG=	as
12SRCS+=	app.c \
13	as.c \
14	atof-generic.c \
15	atof-ieee.c \
16	cond.c \
17	depend.c \
18	dw2gencfi.c \
19	dwarf2dbg.c \
20	ecoff.c \
21	ehopt.c \
22	expr.c \
23	flonum-copy.c \
24	flonum-konst.c \
25	flonum-mult.c \
26	frags.c \
27	hash.c \
28	input-file.c \
29	input-scrub.c \
30	listing.c \
31	literal.c \
32	macro.c \
33	messages.c \
34	obj-elf.c \
35	output-file.c \
36	read.c \
37	sb.c \
38	stabs.c \
39	subsegs.c \
40	symbols.c \
41	write.c
42# DEO: why not used?
43#SRCS+=	itbl-ops.c
44
45.if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb"
46CFLAGS+=	-DCPU_DEFAULT=ARM_ARCH_V6K
47.endif
48
49.if ${TARGET_CPUARCH} == "mips"
50SRCS+=	itbl-ops.c itbl-parse.y itbl-lex.l
51.if ${TARGET_ARCH:Mmips64*} != ""
52CFLAGS+=	-DMIPS_DEFAULT_ABI=N64_ABI -DMIPS_DEFAULT_64BIT=1
53.elif ${TARGET_ARCH:Mmipsn32*} != ""
54CFLAGS+=	-DMIPS_DEFAULT_ABI=N32_ABI
55.else
56MIPS_ABI_DEFAULT=ABI_32
57.endif
58.endif
59
60.if ${TARGET_ARCH} == "amd64"
61SRCS+=	tc-i386.c
62.elif ${TARGET_CPUARCH} == "powerpc"
63SRCS+=	tc-ppc.c
64.elif ${TARGET_ARCH} == "sparc64"
65SRCS+=	tc-sparc.c
66.else
67SRCS+=	tc-${TARGET_CPUARCH}.c
68.endif
69
70.if ${TARGET_ARCH} == "sparc64"
71CFLAGS+= -DDEFAULT_ARCH=\"v9-64\"
72.else
73CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\"
74.endif
75.if defined(TARGET_BIG_ENDIAN)
76CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1
77.endif
78CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\"
79CFLAGS+= -DTARGET_OS=\"${TARGET_OS}\"
80CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\"
81CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\"
82CFLAGS+= -DVERSION=\"${VERSION}\"
83CFLAGS+= -D_GNU_SOURCE
84CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/bfd -I${SRCDIR}/gas/config -I${SRCDIR}
85CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-freebsd
86
87.if ${MK_SHARED_TOOLCHAIN} == "no"
88NO_SHARED?=	yes
89.endif
90
91DPADD=	${RELTOP}/libbfd/libbfd.a
92DPADD+=	${RELTOP}/libiberty/libiberty.a
93DPADD+=	${RELTOP}/libopcodes/libopcodes.a
94LDADD=	${DPADD}
95
96.include <bsd.prog.mk>
97