freebsd-dev/gnu/usr.bin/binutils/libbfd/Makefile

64 lines
1.6 KiB
Makefile
Raw Normal View History

1999-08-27 23:37:10 +00:00
# $FreeBSD$
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes
2001-10-14 00:58:59 +00:00
LIB= bfd
SRCS+= archive.c archures.c bfd.c binary.c cache.c \
2002-01-27 13:04:21 +00:00
coffgen.c corefile.c elf.c elf-eh-frame.c elf-strtab.c format.c \
hash.c ihex.c init.c libbfd.c linker.c merge.c opncls.c reloc.c \
section.c srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \
targmatch.h dwarf1.c dwarf2.c config.h
2001-10-14 00:58:59 +00:00
CFLAGS+= -I${SRCDIR}/bfd
CFLAGS+= -DBFD_VERSION=\"${VERSION}\"
NOPROFILE= true
NOPIC= true
INTERNALLIB= true
INTERNALSTATICLIB=true
CLEANFILES+= config.h targmatch.h
# If set, BINUTILSDISTDIR is the path to a directory containing the full GNU
# binutils release. FreeBSD only distributes the bits that are required to
# build native architectures. BINUTILSDISTDIR is needed to build cross tools.
2001-10-14 00:58:59 +00:00
.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
.PATH: ${BINUTILSDISTDIR}/bfd ${BINUTILSDISTDIR}/opcodes
CFLAGS+= -I${BINUTILSDISTDIR}/bfd -I${BINUTILSDISTDIR}/include -I.
.endif
1998-05-04 21:16:46 +00:00
SELARCH=
.if ${BINUTIL_ARCH} == "sparc64"
2001-10-14 00:58:59 +00:00
SELARCH= &bfd_sparc_arch
.else
1998-05-04 21:16:46 +00:00
.for _a in ${ARCHS}
.if ${SELARCH} == ""
2001-10-14 00:58:59 +00:00
SELARCH+= &bfd_${_a}_arch
1998-05-04 21:16:46 +00:00
.else
2001-10-14 00:58:59 +00:00
SELARCH+= ,&bfd_${_a}_arch
1998-05-04 21:16:46 +00:00
.endif
.endfor
.endif
2001-10-14 00:58:59 +00:00
CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}"
1998-05-04 21:16:46 +00:00
SELVEC=
.for _v in ${VECS}
.if ${SELVEC} == ""
2001-10-14 00:58:59 +00:00
SELVEC+= &${_v}
1998-05-04 21:16:46 +00:00
.else
2001-10-14 00:58:59 +00:00
SELVEC+= ,&${_v}
1998-05-04 21:16:46 +00:00
.endif
.endfor
2001-10-14 00:58:59 +00:00
CFLAGS+= -DSELECT_VECS="${SELVEC}"
1998-05-04 21:16:46 +00:00
targmatch.h: targmatch.sed config.bfd
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET}
config.h: config.h.fbsd
.if ${BINUTIL_ARCH} == "i386"
sed -e 's,!!TRAD_HEADER!!,"hosts/i386bsd.h",g' ${.ALLSRC} > ${.TARGET}
.else
sed -e 's,!!TRAD_HEADER!!,,g' ${.ALLSRC} > ${.TARGET}
.endif
.include <bsd.lib.mk>