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