Merge from vendor branch HEIMDAL:
[dragonfly.git] / gnu / usr.bin / binutils215 / libbfd / Makefile.i386
1 # $DragonFly: src/gnu/usr.bin/binutils215/libbfd/Attic/Makefile.i386,v 1.1 2004/12/20 13:14:45 asmodai Exp $
2
3 # see main Makefile
4 SRCS+=  cpu-i386.c 
5 SRCS+=  elf32-i386-fbsd.c elf32-target.h elf32.c elflink.c
6 SRCS+=  elf64-amd64-fbsd.c elf64-target.h elf64-gen.c elf64.c
7 VECS+=  bfd_elf32_i386_vec
8 VECS+=  bfd_elf64_x86_64_vec
9 .if ${TARGET_ARCH} == "i386"
10 CFLAGS+= -DDEFAULT_VECTOR=bfd_elf32_i386_vec
11 .endif
12 CFLAGS+= -DHAVE_bfd_elf32_i386_vec
13
14 .if     defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
15 SRCS+=  pe-i386.c pei-i386.c
16 VECS+=  i386pe_vec i386pei_vec
17 CFLAGS+= -DHAVE_i386pe_vec -DHAVE_i386pei_vec
18 .endif
19
20 CLEANFILES+=    elf32-target.h
21
22 elf32-target.h: elfxx-target.h
23         sed -e s/NN/32/g ${.ALLSRC} > ${.TARGET}
24
25 CLEANFILES+=    elf64-target.h
26
27 elf64-target.h: elfxx-target.h
28         sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET}
29
30 CLEANFILES+=    elf64-amd64-fbsd.c
31
32 # Make sure generated binaries are properly branded.  This is kind of a
33 # hack but it's more dependable to override whatever binutils thought it
34 # was going to do then figure out whether binutils supports us natively.
35 #
36 elf32-i386-fbsd.c: ${.CURDIR}/elf-fbsd-brand.c ${SRCDIR}/bfd/elf32-i386.c
37         cat ${.ALLSRC:M*elf-fbsd-brand.c} > ${.TARGET}.new
38         echo "#define elf_backend_post_process_headers elf_fbsd_post_process_headers" \
39             >> ${.TARGET}.new
40         cat ${.ALLSRC:M*elf32-i386.c} >> ${.TARGET}.new
41         mv -f ${.TARGET}.new ${.TARGET}
42
43 elf64-amd64-fbsd.c: ${.CURDIR}/elf-fbsd-brand.c ${SRCDIR}/bfd/elf64-x86-64.c
44         cat ${.ALLSRC:M*elf-fbsd-brand.c} > ${.TARGET}.new
45         echo "#define elf_backend_post_process_headers elf_fbsd_post_process_headers" \
46             >> ${.TARGET}.new
47         cat ${.ALLSRC:M*elf64-x86-64.c} >> ${.TARGET}.new
48         mv -f ${.TARGET}.new ${.TARGET}