1# $FreeBSD: releng/11.0/gnu/usr.bin/binutils/libbfd/Makefile 284373 2015-06-14 03:33:27Z sjg $ 2 3.include "../Makefile.inc0" 4 5.PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes 6 7LIB= bfd 8SRCS+= archive.c \ 9 archive64.c \ 10 archures.c \ 11 bfd.c \ 12 bfdio.c \ 13 bfdver.h \ 14 bfdwin.c \ 15 binary.c \ 16 cache.c \ 17 coffgen.c \ 18 config.h \ 19 corefile.c \ 20 dwarf1.c \ 21 dwarf2.c \ 22 elf-attrs.c \ 23 elf-eh-frame.c \ 24 elf-strtab.c \ 25 elf-vxworks.c \ 26 elf.c \ 27 format.c \ 28 hash.c \ 29 ihex.c \ 30 init.c \ 31 libbfd.c \ 32 linker.c \ 33 merge.c \ 34 opncls.c \ 35 reloc.c \ 36 section.c \ 37 simple.c \ 38 srec.c \ 39 stab-syms.c \ 40 stabs.c \ 41 syms.c \ 42 targets.c \ 43 targmatch.h \ 44 tekhex.c 45.if ${TARGET_ARCH} == "sparc64" 46WARNS?= 2 47.endif 48CFLAGS+= -D_GNU_SOURCE 49CFLAGS+= -I${SRCDIR}/bfd 50INTERNALLIB= 51CLEANFILES+= bfdver.h config.h targmatch.h 52 53SELARCH= 54.if ${TARGET_ARCH} == "amd64" 55SELARCH= &bfd_i386_arch 56.elif ${TARGET_ARCH} == "sparc64" 57SELARCH= &bfd_sparc_arch 58.else 59.for _a in ${ARCHS} 60.if ${SELARCH} == "" 61SELARCH+= &bfd_${_a}_arch 62.else 63SELARCH+= ,&bfd_${_a}_arch 64.endif 65.endfor 66.endif 67CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}" 68 69SELVEC= 70.for _v in ${VECS} 71CFLAGS+= -DHAVE_${_v} 72.if ${SELVEC} == "" 73SELVEC+= &${_v} 74.else 75SELVEC+= ,&${_v} 76.endif 77.endfor 78CFLAGS+= -DSELECT_VECS="${SELVEC}" 79CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} 80CFLAGS+= -DDEBUGDIR="NULL" 81 82# XXX:DEO should grab BFD_VERSION_DATE from ${VERSION}... 83bfdver.h: Makefile 84 echo '#define BFD_VERSION 217500000' > ${.TARGET} 85 echo '#define BFD_VERSION_DATE 20070703' >> ${.TARGET} 86 echo '#define BFD_VERSION_STRING ${VERSION}' >> ${.TARGET} 87 echo '#define REPORT_BUGS_TO "<http://www.freebsd.org/support.html>"' >> ${.TARGET} 88 89targmatch.h: targmatch.sed config.bfd 90 sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET} 91 92config.h: config.h.fbsd 93.if ${TARGET_ARCH} == "i386" 94 sed -e 's,!!TRAD_HEADER!!,"hosts/i386bsd.h",g' ${.ALLSRC} > ${.TARGET} 95.else 96 sed -e 's,!!TRAD_HEADER!!,,g' ${.ALLSRC} > ${.TARGET} 97.endif 98 99CLEANFILES+= elf32-target.h elf64-target.h 100elf32-target.h: elfxx-target.h 101 sed -e s/NN/32/g ${.ALLSRC} > ${.TARGET} 102 103elf64-target.h: elfxx-target.h 104 sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET} 105 106# avoid cicular dependency 107GENDIRDEPS_FILTER+= N*/nm 108 109.include <bsd.lib.mk> 110