Makefile revision 84902
1184610Salfred# $FreeBSD: head/gnu/usr.bin/binutils/libbfd/Makefile 84902 2001-10-14 00:58:59Z obrien $ 2184610Salfred 3184610Salfred.include "../Makefile.inc0" 4184610Salfred 5184610Salfred.PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes 6184610Salfred 7184610SalfredLIB= bfd 8184610SalfredSRCS+= archive.c archures.c bfd.c binary.c cache.c \ 9184610Salfred coffgen.c corefile.c elf.c format.c hash.c ihex.c \ 10184610Salfred init.c libbfd.c linker.c opncls.c reloc.c section.c \ 11184610Salfred srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \ 12184610Salfred targmatch.h dwarf1.c dwarf2.c 13184610SalfredCFLAGS+= -I${SRCDIR}/bfd 14184610SalfredCFLAGS+= -DBFD_VERSION=\"${VERSION}\" 15184610SalfredNOPROFILE= true 16184610SalfredNOPIC= true 17184610SalfredINTERNALLIB= true 18184610SalfredINTERNALSTATICLIB=true 19184610SalfredCLEANFILES+= targmatch.h 20184610Salfred 21184610Salfred# If set, BINUTILSDISTDIR is the path to a directory containing the full GNU 22184610Salfred# binutils release. FreeBSD only distributes the bits that are required to 23184610Salfred# build native architectures. BINUTILSDISTDIR is needed to build cross tools. 24184610Salfred.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR}) 25184610Salfred.PATH: ${BINUTILSDISTDIR}/bfd ${BINUTILSDISTDIR}/opcodes 26184610SalfredCFLAGS+= -I${BINUTILSDISTDIR}/bfd 27184610SalfredCFLAGS+= -I${BINUTILSDISTDIR}/include 28194677Sthompsa.endif 29194677Sthompsa 30194677SthompsaSELARCH= 31194677Sthompsa.if ${BINUTIL_ARCH} == "sparc64" 32194677SthompsaSELARCH= &bfd_sparc_arch 33194677Sthompsa.else 34194677Sthompsa.for _a in ${ARCHS} 35194677Sthompsa.if ${SELARCH} == "" 36194677SthompsaSELARCH+= &bfd_${_a}_arch 37194677Sthompsa.else 38194677SthompsaSELARCH+= ,&bfd_${_a}_arch 39194677Sthompsa.endif 40194677Sthompsa.endfor 41194677Sthompsa.endif 42194677SthompsaCFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}" 43194677Sthompsa 44194677SthompsaSELVEC= 45194677Sthompsa.for _v in ${VECS} 46194677Sthompsa.if ${SELVEC} == "" 47188942SthompsaSELVEC+= &${_v} 48194677Sthompsa.else 49184610SalfredSELVEC+= ,&${_v} 50188942Sthompsa.endif 51188942Sthompsa.endfor 52188942SthompsaCFLAGS+= -DSELECT_VECS="${SELVEC}" 53188942Sthompsa 54184610Salfredtargmatch.h: targmatch.sed config.bfd 55188942Sthompsa sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET} 56188942Sthompsa 57188942Sthompsa.include <bsd.lib.mk> 58198151Sthompsa