1999-08-27 19:37:10 -04:00
|
|
|
# $FreeBSD$
|
1998-03-01 18:41:17 -05:00
|
|
|
|
|
|
|
|
.include "../Makefile.inc0"
|
|
|
|
|
|
1999-02-28 23:01:57 -05:00
|
|
|
.PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes
|
1998-03-01 18:41:17 -05:00
|
|
|
|
2001-10-13 20:58:59 -04:00
|
|
|
LIB= bfd
|
2010-10-21 16:08:16 -04:00
|
|
|
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 \
|
2010-11-01 15:41:22 -04:00
|
|
|
elf-attrs.c \
|
2010-10-21 16:08:16 -04:00
|
|
|
elf-eh-frame.c \
|
|
|
|
|
elf-strtab.c \
|
2010-10-21 16:17:13 -04:00
|
|
|
elf-vxworks.c \
|
2010-10-21 16:08:16 -04:00
|
|
|
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
|
2014-07-06 20:27:09 -04:00
|
|
|
.if ${TARGET_ARCH} == "sparc64"
|
2004-02-24 14:23:33 -05:00
|
|
|
WARNS?= 2
|
2002-03-13 21:24:25 -05:00
|
|
|
.endif
|
2004-06-16 03:09:44 -04:00
|
|
|
CFLAGS+= -D_GNU_SOURCE
|
2001-10-13 20:58:59 -04:00
|
|
|
CFLAGS+= -I${SRCDIR}/bfd
|
2004-10-24 11:33:08 -04:00
|
|
|
INTERNALLIB=
|
2004-06-16 03:09:44 -04:00
|
|
|
CLEANFILES+= bfdver.h config.h targmatch.h
|
1998-03-01 18:41:17 -05:00
|
|
|
|
1998-05-04 17:16:46 -04:00
|
|
|
SELARCH=
|
2003-04-25 23:28:21 -04:00
|
|
|
.if ${TARGET_ARCH} == "amd64"
|
|
|
|
|
SELARCH= &bfd_i386_arch
|
|
|
|
|
.elif ${TARGET_ARCH} == "sparc64"
|
2001-10-13 20:58:59 -04:00
|
|
|
SELARCH= &bfd_sparc_arch
|
2000-04-02 18:36:56 -04:00
|
|
|
.else
|
1998-05-04 17:16:46 -04:00
|
|
|
.for _a in ${ARCHS}
|
|
|
|
|
.if ${SELARCH} == ""
|
2001-10-13 20:58:59 -04:00
|
|
|
SELARCH+= &bfd_${_a}_arch
|
1998-05-04 17:16:46 -04:00
|
|
|
.else
|
2001-10-13 20:58:59 -04:00
|
|
|
SELARCH+= ,&bfd_${_a}_arch
|
1998-05-04 17:16:46 -04:00
|
|
|
.endif
|
|
|
|
|
.endfor
|
2000-04-02 18:36:56 -04:00
|
|
|
.endif
|
2001-10-13 20:58:59 -04:00
|
|
|
CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}"
|
1998-05-04 17:16:46 -04:00
|
|
|
|
|
|
|
|
SELVEC=
|
|
|
|
|
.for _v in ${VECS}
|
2002-12-02 04:53:59 -05:00
|
|
|
CFLAGS+= -DHAVE_${_v}
|
1998-05-04 17:16:46 -04:00
|
|
|
.if ${SELVEC} == ""
|
2001-10-13 20:58:59 -04:00
|
|
|
SELVEC+= &${_v}
|
1998-05-04 17:16:46 -04:00
|
|
|
.else
|
2001-10-13 20:58:59 -04:00
|
|
|
SELVEC+= ,&${_v}
|
1998-05-04 17:16:46 -04:00
|
|
|
.endif
|
|
|
|
|
.endfor
|
2001-10-13 20:58:59 -04:00
|
|
|
CFLAGS+= -DSELECT_VECS="${SELVEC}"
|
2004-07-08 13:05:34 -04:00
|
|
|
CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR}
|
2010-11-01 15:41:22 -04:00
|
|
|
CFLAGS+= -DDEBUGDIR="NULL"
|
1998-05-04 17:16:46 -04:00
|
|
|
|
2004-06-16 03:09:44 -04:00
|
|
|
# XXX:DEO should grab BFD_VERSION_DATE from ${VERSION}...
|
|
|
|
|
bfdver.h: Makefile
|
2010-11-01 15:41:22 -04:00
|
|
|
echo '#define BFD_VERSION 217500000' > ${.TARGET}
|
|
|
|
|
echo '#define BFD_VERSION_DATE 20070703' >> ${.TARGET}
|
2004-06-16 03:09:44 -04:00
|
|
|
echo '#define BFD_VERSION_STRING ${VERSION}' >> ${.TARGET}
|
2014-06-14 14:45:40 -04:00
|
|
|
echo '#define REPORT_BUGS_TO "<http://www.freebsd.org/support.html>"' >> ${.TARGET}
|
2004-06-16 03:09:44 -04:00
|
|
|
|
1998-03-01 18:41:17 -05:00
|
|
|
targmatch.h: targmatch.sed config.bfd
|
|
|
|
|
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET}
|
2004-06-19 15:44:19 -04:00
|
|
|
|
2001-10-13 21:24:07 -04:00
|
|
|
config.h: config.h.fbsd
|
2002-09-22 01:29:37 -04:00
|
|
|
.if ${TARGET_ARCH} == "i386"
|
2001-10-13 21:24:07 -04:00
|
|
|
sed -e 's,!!TRAD_HEADER!!,"hosts/i386bsd.h",g' ${.ALLSRC} > ${.TARGET}
|
|
|
|
|
.else
|
|
|
|
|
sed -e 's,!!TRAD_HEADER!!,,g' ${.ALLSRC} > ${.TARGET}
|
|
|
|
|
.endif
|
1998-03-01 18:41:17 -05:00
|
|
|
|
2004-07-08 13:05:34 -04:00
|
|
|
CLEANFILES+= elf32-target.h elf64-target.h
|
2004-06-19 16:37:38 -04:00
|
|
|
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}
|
|
|
|
|
|
2015-06-13 23:33:27 -04:00
|
|
|
# avoid cicular dependency
|
|
|
|
|
GENDIRDEPS_FILTER+= N*/nm
|
|
|
|
|
|
1998-03-01 18:41:17 -05:00
|
|
|
.include <bsd.lib.mk>
|