1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1998-03-01 23:41:17 +00:00
|
|
|
|
|
|
|
.include "../Makefile.inc0"
|
|
|
|
|
1999-03-01 04:01:57 +00:00
|
|
|
.PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes
|
1998-03-01 23:41:17 +00:00
|
|
|
|
2001-10-14 00:58:59 +00:00
|
|
|
LIB= bfd
|
2002-02-04 17:06:30 +00:00
|
|
|
SRCS+= archive.c archive64.c archures.c bfd.c binary.c cache.c \
|
2002-01-27 13:04:21 +00:00
|
|
|
coffgen.c corefile.c elf.c elf-eh-frame.c elf-strtab.c format.c \
|
|
|
|
hash.c ihex.c init.c libbfd.c linker.c merge.c opncls.c reloc.c \
|
|
|
|
section.c srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \
|
2004-06-16 07:09:44 +00:00
|
|
|
targmatch.h dwarf1.c dwarf2.c config.h bfdver.h bfdio.c simple.c
|
2004-02-25 13:12:51 +00:00
|
|
|
WARNS?= 0
|
|
|
|
.if (${TARGET_ARCH} == "alpha" || ${TARGET_ARCH} == "ia64" || \
|
|
|
|
${TARGET_ARCH} == "sparc64")
|
2004-02-24 19:23:33 +00:00
|
|
|
WARNS?= 2
|
2002-03-14 02:24:25 +00:00
|
|
|
.endif
|
2004-06-16 07:09:44 +00:00
|
|
|
CFLAGS+= -D_GNU_SOURCE
|
2001-10-14 00:58:59 +00:00
|
|
|
CFLAGS+= -I${SRCDIR}/bfd
|
1998-03-12 05:14:19 +00:00
|
|
|
INTERNALLIB= true
|
2004-06-16 07:09:44 +00:00
|
|
|
CLEANFILES+= bfdver.h config.h targmatch.h
|
1998-03-01 23:41:17 +00:00
|
|
|
|
1998-05-04 21:16:46 +00:00
|
|
|
SELARCH=
|
2003-04-26 03:28:21 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64"
|
|
|
|
SELARCH= &bfd_i386_arch
|
|
|
|
.elif ${TARGET_ARCH} == "sparc64"
|
2001-10-14 00:58:59 +00:00
|
|
|
SELARCH= &bfd_sparc_arch
|
2000-04-02 22:36:56 +00:00
|
|
|
.else
|
1998-05-04 21:16:46 +00:00
|
|
|
.for _a in ${ARCHS}
|
|
|
|
.if ${SELARCH} == ""
|
2001-10-14 00:58:59 +00:00
|
|
|
SELARCH+= &bfd_${_a}_arch
|
1998-05-04 21:16:46 +00:00
|
|
|
.else
|
2001-10-14 00:58:59 +00:00
|
|
|
SELARCH+= ,&bfd_${_a}_arch
|
1998-05-04 21:16:46 +00:00
|
|
|
.endif
|
|
|
|
.endfor
|
2000-04-02 22:36:56 +00:00
|
|
|
.endif
|
2001-10-14 00:58:59 +00:00
|
|
|
CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}"
|
1998-05-04 21:16:46 +00:00
|
|
|
|
|
|
|
SELVEC=
|
|
|
|
.for _v in ${VECS}
|
2002-12-02 09:53:59 +00:00
|
|
|
CFLAGS+= -DHAVE_${_v}
|
1998-05-04 21:16:46 +00:00
|
|
|
.if ${SELVEC} == ""
|
2001-10-14 00:58:59 +00:00
|
|
|
SELVEC+= &${_v}
|
1998-05-04 21:16:46 +00:00
|
|
|
.else
|
2001-10-14 00:58:59 +00:00
|
|
|
SELVEC+= ,&${_v}
|
1998-05-04 21:16:46 +00:00
|
|
|
.endif
|
|
|
|
.endfor
|
2001-10-14 00:58:59 +00:00
|
|
|
CFLAGS+= -DSELECT_VECS="${SELVEC}"
|
1998-05-04 21:16:46 +00:00
|
|
|
|
2004-06-16 07:09:44 +00:00
|
|
|
# XXX:DEO should grab BFD_VERSION_DATE from ${VERSION}...
|
|
|
|
bfdver.h: Makefile
|
|
|
|
echo '#define BFD_VERSION 214920000' > ${.TARGET}
|
|
|
|
echo '#define BFD_VERSION_DATE 20040510' >> ${.TARGET}
|
|
|
|
echo '#define BFD_VERSION_STRING ${VERSION}' >> ${.TARGET}
|
|
|
|
|
1998-03-01 23:41:17 +00:00
|
|
|
targmatch.h: targmatch.sed config.bfd
|
|
|
|
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET}
|
2001-10-14 01:24:07 +00:00
|
|
|
|
|
|
|
config.h: config.h.fbsd
|
2002-09-22 05:29:37 +00:00
|
|
|
.if ${TARGET_ARCH} == "i386"
|
2001-10-14 01:24:07 +00: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 23:41:17 +00:00
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|