summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/binutils/as/Makefile
blob: bf8df81a8bfbadf30d5976a6b6d8a753461699ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# $FreeBSD$


# BINDIR
.include "${.CURDIR}/../../Makefile.inc"
.include "${.CURDIR}/../Makefile.inc0"

.PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config

PROG=	as
SRCS+=	app.c \
	as.c \
	atof-generic.c \
	atof-ieee.c \
	cond.c \
	depend.c \
	dw2gencfi.c \
	dwarf2dbg.c \
	ecoff.c \
	ehopt.c \
	expr.c \
	flonum-copy.c \
	flonum-konst.c \
	flonum-mult.c \
	frags.c \
	hash.c \
	input-file.c \
	input-scrub.c \
	listing.c \
	literal.c \
	macro.c \
	messages.c \
	obj-elf.c \
	output-file.c \
	read.c \
	sb.c \
	stabs.c \
	subsegs.c \
	symbols.c \
	write.c
# DEO: why not used?
#SRCS+=	itbl-ops.c

.if ${TARGET_CPUARCH} == "mips"
SRCS+=	itbl-ops.c itbl-parse.y itbl-lex.l
.if ${TARGET_ARCH:Mmips64*} != ""
CFLAGS+=	-DMIPS_DEFAULT_ABI=N64_ABI -DMIPS_DEFAULT_64BIT=1
.elif ${TARGET_ARCH:Mmipsn32*} != ""
CFLAGS+=	-DMIPS_DEFAULT_ABI=N32_ABI
.else
MIPS_ABI_DEFAULT=ABI_32
.endif
.endif

.if ${TARGET_ARCH} == "amd64"
SRCS+=	tc-i386.c
.elif ${TARGET_CPUARCH} == "powerpc"
SRCS+=	tc-ppc.c
.elif ${TARGET_ARCH} == "sparc64"
SRCS+=	tc-sparc.c
.else
SRCS+=	tc-${TARGET_CPUARCH}.c
.endif

.if ${TARGET_ARCH} == "sparc64"
CFLAGS+= -DDEFAULT_ARCH=\"v9-64\"
.else
CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\"
.endif
.if defined(TARGET_BIG_ENDIAN)
CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1
.endif
CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\"
CFLAGS+= -DTARGET_OS=\"${TARGET_OS}\"
CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\"
CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\"
CFLAGS+= -DVERSION=\"${VERSION}\"
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/bfd -I${SRCDIR}/gas/config -I${SRCDIR}
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-freebsd

NO_SHARED?=	yes

DPADD=	${RELTOP}/libbfd/libbfd.a
DPADD+=	${RELTOP}/libiberty/libiberty.a
DPADD+=	${RELTOP}/libopcodes/libopcodes.a
LDADD=	${DPADD}

.include <bsd.prog.mk>
OpenPOWER on IntegriCloud