]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - gnu/usr.bin/binutils/as/Makefile
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.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 <bsd.own.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} == "armv6" || ${TARGET_ARCH} == "armv6eb"
50 CFLAGS+=        -DCPU_DEFAULT=ARM_ARCH_V6K
51 .endif
52
53 .if ${TARGET_CPUARCH} == "mips"
54 SRCS+=  itbl-ops.c itbl-parse.y itbl-lex.l
55 .if ${TARGET_ARCH:Mmips64*} != ""
56 CFLAGS+=        -DMIPS_DEFAULT_ABI=N64_ABI -DMIPS_DEFAULT_64BIT=1
57 .elif ${TARGET_ARCH:Mmipsn32*} != ""
58 CFLAGS+=        -DMIPS_DEFAULT_ABI=N32_ABI
59 .else
60 MIPS_ABI_DEFAULT=ABI_32
61 .endif
62 .endif
63
64 .if ${TARGET_ARCH} == "amd64"
65 SRCS+=  tc-i386.c
66 .elif ${TARGET_CPUARCH} == "powerpc"
67 SRCS+=  tc-ppc.c
68 .elif ${TARGET_ARCH} == "sparc64"
69 SRCS+=  tc-sparc.c
70 .else
71 SRCS+=  tc-${TARGET_CPUARCH}.c
72 .endif
73
74 .if ${TARGET_ARCH} == "sparc64"
75 CFLAGS+= -DDEFAULT_ARCH=\"v9-64\"
76 .else
77 CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\"
78 .endif
79 .if defined(TARGET_BIG_ENDIAN)
80 CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1
81 .endif
82 CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\"
83 CFLAGS+= -DTARGET_OS=\"${TARGET_OS}\"
84 CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\"
85 CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\"
86 CFLAGS+= -DVERSION=\"${VERSION}\"
87 CFLAGS+= -D_GNU_SOURCE
88 CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/bfd -I${SRCDIR}/gas/config -I${SRCDIR}
89 CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-freebsd
90
91 .if ${MK_SHARED_TOOLCHAIN} == "no"
92 NO_SHARED?=     yes
93 .endif
94
95 DPADD=  ${RELTOP}/libbfd/libbfd.a
96 DPADD+= ${RELTOP}/libiberty/libiberty.a
97 DPADD+= ${RELTOP}/libopcodes/libopcodes.a
98 LDADD=  ${DPADD}
99
100 .include <bsd.prog.mk>