3 .include "../Makefile.inc0"
5 .PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes
8 SRCS+= archive.c archive64.c archures.c bfd.c bfdwin.c binary.c cache.c \
9 coffgen.c corefile.c elf.c elf-eh-frame.c elf-strtab.c format.c \
10 hash.c ihex.c init.c libbfd.c linker.c merge.c opncls.c reloc.c \
11 section.c srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \
12 targmatch.h dwarf1.c dwarf2.c config.h bfdver.h bfdio.c simple.c
14 .if (${TARGET_ARCH} == "alpha" || ${TARGET_ARCH} == "ia64" || \
15 ${TARGET_ARCH} == "sparc64")
18 CFLAGS+= -D_GNU_SOURCE
19 CFLAGS+= -I${SRCDIR}/bfd
21 CLEANFILES+= bfdver.h config.h targmatch.h
24 .if ${TARGET_ARCH} == "amd64"
25 SELARCH= &bfd_i386_arch
26 .elif ${TARGET_ARCH} == "sparc64"
27 SELARCH= &bfd_sparc_arch
31 SELARCH+= &bfd_${_a}_arch
33 SELARCH+= ,&bfd_${_a}_arch
37 CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}"
48 CFLAGS+= -DSELECT_VECS="${SELVEC}"
49 CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR}
51 # XXX:DEO should grab BFD_VERSION_DATE from ${VERSION}...
53 echo '#define BFD_VERSION 215000000' > ${.TARGET}
54 echo '#define BFD_VERSION_DATE 20040517' >> ${.TARGET}
55 echo '#define BFD_VERSION_STRING ${VERSION}' >> ${.TARGET}
57 targmatch.h: targmatch.sed config.bfd
58 sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET}
60 config.h: config.h.fbsd
61 .if ${TARGET_ARCH} == "i386"
62 sed -e 's,!!TRAD_HEADER!!,"hosts/i386bsd.h",g' ${.ALLSRC} > ${.TARGET}
64 sed -e 's,!!TRAD_HEADER!!,,g' ${.ALLSRC} > ${.TARGET}
67 CLEANFILES+= elf32-target.h elf64-target.h
68 elf32-target.h: elfxx-target.h
69 sed -e s/NN/32/g ${.ALLSRC} > ${.TARGET}
71 elf64-target.h: elfxx-target.h
72 sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET}