Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / gnu / usr.bin / binutils / libbfd / Makefile
1 # $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile,v 1.9.2.3 2002/09/01 23:39:15 obrien Exp $
2 # $DragonFly: src/gnu/usr.bin/binutils/libbfd/Attic/Makefile,v 1.2 2003/06/17 04:25:44 dillon Exp $
3
4 .include "../Makefile.inc0"
5
6 .PATH: ${SRCDIR}/bfd ${SRCDIR}/opcodes
7
8 LIB=    bfd
9 SRCS+=  archive.c archive64.c archures.c bfd.c binary.c cache.c \
10         coffgen.c corefile.c elf.c elf-eh-frame.c elf-strtab.c format.c \
11         hash.c ihex.c init.c libbfd.c linker.c merge.c opncls.c reloc.c \
12         section.c srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c \
13         targmatch.h dwarf1.c dwarf2.c config.h
14 .if (${TARGET_ARCH} == "alpha" || ${TARGET_ARCH} == "sparc64")
15 WARNS=  2
16 .endif
17 CFLAGS+= -I${SRCDIR}/bfd
18 CFLAGS+= -DBFD_VERSION=\"${VERSION_DATE}\" -DBFD_VERSION_DATE=${VERSION_DATE}
19 CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"
20 INTERNALLIB=    true
21 CLEANFILES+=    config.h targmatch.h
22
23 # If set, BINUTILSDISTDIR is the path to a directory containing the full GNU
24 # binutils release. FreeBSD only distributes the bits that are required to
25 # build native architectures. BINUTILSDISTDIR is needed to build cross tools.
26 .if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
27 .PATH: ${BINUTILSDISTDIR}/bfd ${BINUTILSDISTDIR}/opcodes
28 CFLAGS+= -I${BINUTILSDISTDIR}/bfd -I${BINUTILSDISTDIR}/include -I.
29 .endif
30
31 SELARCH=
32 .if ${BINUTIL_ARCH} == "sparc64"
33 SELARCH= &bfd_sparc_arch
34 .else
35 .for _a in ${ARCHS}
36 .if ${SELARCH} == ""
37 SELARCH+= &bfd_${_a}_arch
38 .else
39 SELARCH+= ,&bfd_${_a}_arch
40 .endif
41 .endfor
42 .endif
43 CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}"
44
45 SELVEC=
46 .for _v in ${VECS}
47 .if ${SELVEC} == ""
48 SELVEC+= &${_v}
49 .else
50 SELVEC+= ,&${_v}
51 .endif
52 .endfor
53 CFLAGS+= -DSELECT_VECS="${SELVEC}"
54
55 targmatch.h: targmatch.sed config.bfd
56         sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET}
57         
58 config.h: config.h.fbsd
59 .if ${BINUTIL_ARCH} == "i386"
60         sed -e 's,!!TRAD_HEADER!!,"hosts/i386bsd.h",g' ${.ALLSRC} > ${.TARGET}
61 .else
62         sed -e 's,!!TRAD_HEADER!!,,g' ${.ALLSRC} > ${.TARGET}
63 .endif
64
65 .include <bsd.lib.mk>