1# 2# $FreeBSD$ 3# 4 5.include "../Makefile.inc0" 6 7.PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes 8 9LIB= bfd 10SRCS+= archive.c archures.c bfd.c binary.c cache.c \ 11 coffgen.c corefile.c elf.c format.c hash.c ihex.c \ 12 init.c libbfd.c linker.c opncls.c reloc.c section.c \ 13 srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \ 14 targmatch.h dwarf2.c 15CFLAGS+= -I${SRCDIR}/bfd 16NOPROFILE= true 17NOPIC= true 18INTERNALLIB= true 19INTERNALSTATICLIB=true 20CLEANFILES+= targmatch.h 21 22# If set, BINUTILSDISTDIR is the path to a directory containing the full GNU 23# binutils release. FreeBSD only distributes the bits that are required to 24# build native architectures. BINUTILSDISTDIR is needed to build cross tools. 25.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR}) 26.PATH: ${BINUTILSDISTDIR}/bfd ${BINUTILSDISTDIR}/opcodes 27CFLAGS+= -I${BINUTILSDISTDIR}/bfd 28CFLAGS+= -I${BINUTILSDISTDIR}/include 29.endif 30 31SELARCH= 32.if ${BINUTIL_ARCH} == "sparc64" 33SELARCH=&bfd_sparc_arch 34.else 35.for _a in ${ARCHS} 36.if ${SELARCH} == "" 37SELARCH+=&bfd_${_a}_arch 38.else 39SELARCH+=,&bfd_${_a}_arch 40.endif 41.endfor 42.endif 43CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}" 44 45SELVEC= 46.for _v in ${VECS} 47.if ${SELVEC} == "" 48SELVEC+=&${_v} 49.else 50SELVEC+=,&${_v} 51.endif 52.endfor 53CFLAGS+= -DSELECT_VECS="${SELVEC}" 54 55targmatch.h: targmatch.sed config.bfd 56 sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET} 57 58.include <bsd.lib.mk> 59