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