blob: 9b8489d58430a6316ff3fb5487f1e0b1dbfa08cb (
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
# $FreeBSD$
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes
LIB= bfd
SRCS+= archive.c \
archive64.c \
archures.c \
bfd.c \
bfdio.c \
bfdver.h \
bfdwin.c \
binary.c \
cache.c \
coffgen.c \
config.h \
corefile.c \
dwarf1.c \
dwarf2.c \
elf-attrs.c \
elf-eh-frame.c \
elf-strtab.c \
elf-vxworks.c \
elf.c \
format.c \
hash.c \
ihex.c \
init.c \
libbfd.c \
linker.c \
merge.c \
opncls.c \
reloc.c \
section.c \
simple.c \
srec.c \
stab-syms.c \
stabs.c \
syms.c \
targets.c \
targmatch.h \
tekhex.c
.if (${TARGET_ARCH} == "ia64" || ${TARGET_ARCH} == "sparc64")
WARNS?= 2
.endif
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${SRCDIR}/bfd
INTERNALLIB=
CLEANFILES+= bfdver.h config.h targmatch.h
SELARCH=
.if ${TARGET_ARCH} == "amd64"
SELARCH= &bfd_i386_arch
.elif ${TARGET_ARCH} == "sparc64"
SELARCH= &bfd_sparc_arch
.elif ${TARGET_ARCH} == "powerpc64"
SELARCH= &bfd_powerpc_arch,&bfd_rs6000_arch
.else
.for _a in ${ARCHS}
.if ${SELARCH} == ""
SELARCH+= &bfd_${_a}_arch
.else
SELARCH+= ,&bfd_${_a}_arch
.endif
.endfor
.endif
CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}"
SELVEC=
.for _v in ${VECS}
CFLAGS+= -DHAVE_${_v}
.if ${SELVEC} == ""
SELVEC+= &${_v}
.else
SELVEC+= ,&${_v}
.endif
.endfor
CFLAGS+= -DSELECT_VECS="${SELVEC}"
CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR}
CFLAGS+= -DDEBUGDIR="NULL"
# XXX:DEO should grab BFD_VERSION_DATE from ${VERSION}...
bfdver.h: Makefile
echo '#define BFD_VERSION 217500000' > ${.TARGET}
echo '#define BFD_VERSION_DATE 20070703' >> ${.TARGET}
echo '#define BFD_VERSION_STRING ${VERSION}' >> ${.TARGET}
echo '#define REPORT_BUGS_TO "<http://www.freebsd.org/send-pr.html>"' >> ${.TARGET}
targmatch.h: targmatch.sed config.bfd
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET}
config.h: config.h.fbsd
.if ${TARGET_ARCH} == "i386"
sed -e 's,!!TRAD_HEADER!!,"hosts/i386bsd.h",g' ${.ALLSRC} > ${.TARGET}
.else
sed -e 's,!!TRAD_HEADER!!,,g' ${.ALLSRC} > ${.TARGET}
.endif
CLEANFILES+= elf32-target.h elf64-target.h
elf32-target.h: elfxx-target.h
sed -e s/NN/32/g ${.ALLSRC} > ${.TARGET}
elf64-target.h: elfxx-target.h
sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET}
.include <bsd.lib.mk>
|