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
|
2002-02-04 12:06:30 -05:00
|
|
|
SRCS+= archive.c archive64.c archures.c bfd.c binary.c cache.c \
|
2002-01-27 08:04:21 -05: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 \
|
2001-10-13 21:24:07 -04:00
|
|
|
targmatch.h dwarf1.c dwarf2.c config.h
|
2002-03-13 21:24:25 -05:00
|
|
|
.if (${TARGET_ARCH} == "alpha")
|
|
|
|
|
WARNS= 2
|
|
|
|
|
.endif
|
2001-10-13 20:58:59 -04:00
|
|
|
CFLAGS+= -I${SRCDIR}/bfd
|
2002-01-27 17:47:22 -05:00
|
|
|
CFLAGS+= -DBFD_VERSION=\"${VERSION_DATE}\" -DBFD_VERSION_DATE=${VERSION_DATE}
|
|
|
|
|
CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"
|
1998-03-01 18:41:17 -05:00
|
|
|
NOPROFILE= true
|
|
|
|
|
NOPIC= true
|
1998-03-12 00:14:19 -05:00
|
|
|
INTERNALLIB= true
|
|
|
|
|
INTERNALSTATICLIB=true
|
2001-10-13 21:24:07 -04:00
|
|
|
CLEANFILES+= config.h targmatch.h
|
1998-03-01 18:41:17 -05:00
|
|
|
|
1999-11-06 16:04:46 -05:00
|
|
|
# If set, BINUTILSDISTDIR is the path to a directory containing the full GNU
|
|
|
|
|
# binutils release. FreeBSD only distributes the bits that are required to
|
|
|
|
|
# build native architectures. BINUTILSDISTDIR is needed to build cross tools.
|
2001-10-13 20:58:59 -04:00
|
|
|
.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
|
|
|
|
|
.PATH: ${BINUTILSDISTDIR}/bfd ${BINUTILSDISTDIR}/opcodes
|
2001-10-13 21:24:07 -04:00
|
|
|
CFLAGS+= -I${BINUTILSDISTDIR}/bfd -I${BINUTILSDISTDIR}/include -I.
|
1999-11-06 16:04:46 -05:00
|
|
|
.endif
|
|
|
|
|
|
1998-05-04 17:16:46 -04:00
|
|
|
SELARCH=
|
2000-04-02 18:36:56 -04:00
|
|
|
.if ${BINUTIL_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}
|
|
|
|
|
.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}"
|
1998-05-04 17:16:46 -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}
|
2001-10-13 21:24:07 -04:00
|
|
|
|
|
|
|
|
config.h: config.h.fbsd
|
|
|
|
|
.if ${BINUTIL_ARCH} == "i386"
|
|
|
|
|
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
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|