Merge branch 'vendor/OPENSSL'
[dragonfly.git] / gnu / usr.bin / binutils225 / block1 / libbfd / Makefile
1 .include "../Makefile.block1"
2
3 LIB=            bfd
4 INTERNALLIB=    true
5
6 CONTRIBDIR=     ${SRCDIR}/bfd
7 .PATH:          ${CONTRIBDIR}
8
9 CFLAGS+=        -I${SRCDIR}/include -I${CONTRIBDIR} -I${.CURDIR} -I${.OBJDIR}
10 CFLAGS+=        -DDEBUGDIR='"/usr/lib/debug"'  # no clue why this is needed
11 FLAGS_GROUPS=   target
12
13 # BFD32_LIBS_CFILES 
14 SRCS=   archive.c archures.c bfd.c bfdio.c bfdwin.c \
15         cache.c coffgen.c corefile.c \
16         format.c init.c libbfd.c opncls.c reloc.c \
17         section.c syms.c targets.c hash.c linker.c \
18         srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
19         merge.c dwarf2.c simple.c compress.c verilog.c
20
21 # from Makefile, BFD64_BACKENDS_CFILES  (x86-64 specific)
22 SRCS+=  elf64-x86-64.c elf-ifunc.c elf-nacl.c elf64.c elf.c elflink.c \
23         elf-attrs.c elf-strtab.c elf-eh-frame.c dwarf1.c elf32-i386.c \
24         elf-vxworks.c elf32.c elf64-gen.c elf32-gen.c
25
26 # ALL_MACHINES_CFILES
27 SRCS+=  cpu-i386.c cpu-l1om.c cpu-k1om.c
28
29 # BFD64_LIBS_CFILES
30 SRCS+=          archive64.c
31
32 VECTORS=        x86_64_elf64_vec \
33                 i386_elf32_vec \
34                 l1om_elf64_vec \
35                 k1om_elf64_vec \
36                 elf64_le_vec \
37                 elf64_be_vec \
38                 elf32_le_vec \
39                 elf32_be_vec 
40
41 DEFAULT_VECTOR= x86_64_elf64_vec
42 ARCHITECTURES=  bfd_i386_arch bfd_l1om_arch bfd_k1om_arch
43
44 _selvec=
45 .for _v in ${VECTORS}
46 target_FLAGS+= -DHAVE_${_v}
47 .if !empty(_selvec)
48 _selvec+= ,
49 .endif
50 _selvec+= &${_v}
51 .endfor
52 target_FLAGS+= -DSELECT_VECS='${_selvec}'
53 target_FLAGS+= -DSELECT_ARCHITECTURES='${ARCHITECTURES:S/^/\&/:S/$/,/} 0'
54 target_FLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR}
55 target_FLAGS_FILES=     targets.c archures.c
56
57 ${SRCS}: bfd.h
58 targets.c: targmatch.h
59 elf32-gen.c elf32-i386.c elf64-x86-64.c: elf32-target.h
60 elf64-gen.c elf64-x86-64.c: elf64-target.h
61 cache.c elf32-i386.c elf64-x86-64.c: bfd_stdint.h
62
63 bfd_stdint.h:
64         touch ${.TARGET}
65
66 targmatch.h: config.bfd targmatch.sed
67         sed -f ${CONTRIBDIR}/targmatch.sed < ${CONTRIBDIR}/config.bfd \
68         > ${.TARGET}
69
70 elf32-target.h: elfxx-target.h
71         sed -e s/NN/32/g < ${CONTRIBDIR}/elfxx-target.h > ${.TARGET}
72 elf64-target.h: elfxx-target.h
73         sed -e s/NN/64/g < ${CONTRIBDIR}/elfxx-target.h > ${.TARGET}
74
75 CLEANFILES=     bfd_stdint.h bfd.h elf64-target.h elf32-target.h targmatch.h
76
77 .include <bsd.lib.mk>