Make vector selection easier to maintain.
authorSimon Schubert <corecode@dragonflybsd.org>
Sat, 2 Aug 2008 15:29:53 +0000 (15:29 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Sat, 2 Aug 2008 15:29:53 +0000 (15:29 +0000)
gnu/usr.bin/gdb/libbfd/Makefile
gnu/usr.bin/gdb/libbfd/Makefile.amd64
gnu/usr.bin/gdb/libbfd/Makefile.i386

index 21952ae..fb759a6 100644 (file)
@@ -1,4 +1,4 @@
-# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile,v 1.3 2008/07/28 22:33:21 corecode Exp $
+# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile,v 1.4 2008/08/02 15:29:53 corecode Exp $
 
 .include "../Makefile.inc"
 
@@ -33,6 +33,15 @@ elf64-target.h: elfxx-target.h
 TARGET_ARCH?=  ${MACHINE_ARCH}
 .include "Makefile.${TARGET_ARCH}"
 
+.for _v in ${VECTORS}
+CFLAGS+= -DHAVE_${_v}
+_select+= &${_v},
+.endfor
+CFLAGS+= -DSELECT_VECS='${_select}NULL'
+CFLAGS+= -DSELECT_ARCHITECTURES='&${ARCHITECTURE}'
+CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR}
+
+
 SRCS+=         bfd.h bfdver.h
 CLEANFILES+=   bfd.h bfdver.h
 
index 16a3e56..8c56850 100644 (file)
@@ -1,14 +1,16 @@
-# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile.amd64,v 1.3 2008/07/28 22:33:21 corecode Exp $
+# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile.amd64,v 1.4 2008/08/02 15:29:53 corecode Exp $
+
+.include "${.CURDIR}/Makefile.i386"
 
 SRCS+= elf32-gen.c elf32.c elf32-target.h
 SRCS+= coff-i386.c cpu-i386.c elf32-i386.c
 SRCS+= elf64-gen.c elf64.c elf64-x86-64.c elf64-target.h
 
-CFLAGS+= -DDEFAULT_VECTOR=bfd_elf64_x86_64_vec \
-  -DSELECT_VECS='&bfd_elf64_x86_64_vec,&bfd_elf32_i386_freebsd_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&i386coff_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' \
-  -DSELECT_ARCHITECTURES='&bfd_i386_arch' -DHAVE_bfd_elf64_x86_64_vec \
-  -DHAVE_bfd_elf32_i386_freebsd_vec \
-  -DHAVE_i386coff_vec -DHAVE_bfd_elf32_little_generic_vec \
-  -DHAVE_bfd_elf32_big_generic_vec
+VECTORS=       bfd_elf64_x86_64_vec \
+               bfd_elf64_little_generic_vec \
+               bfd_elf64_big_generic_vec \
+               ${DEFAULT_VECTOR}
+
+DEFAULT_VECTOR=        bfd_elf64_x86_64_vec
 
 BFD_DEFAULT_TARGET_SIZE?=      64
index 5d89d88..ef98cb6 100644 (file)
@@ -1,12 +1,15 @@
-# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile.i386,v 1.3 2008/07/28 22:33:21 corecode Exp $
+# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile.i386,v 1.4 2008/08/02 15:29:53 corecode Exp $
 
 SRCS+= elf32-gen.c elf32.c elf32-target.h
 SRCS+= coff-i386.c cpu-i386.c elf32-i386.c
 
-CFLAGS+= -DDEFAULT_VECTOR=bfd_elf32_i386_vec \
-  -DSELECT_VECS='&bfd_elf32_i386_vec,&i386coff_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' \
-  -DSELECT_ARCHITECTURES='&bfd_i386_arch' -DHAVE_bfd_elf32_i386_vec \
-  -DHAVE_i386coff_vec -DHAVE_bfd_elf32_little_generic_vec \
-  -DHAVE_bfd_elf32_big_generic_vec
+VECTORS=       bfd_elf32_i386_vec \
+               i386coff_vec \
+               bfd_elf32_little_generic_vec \
+               bfd_elf32_big_generic_vec
+
+DEFAULT_VECTOR=        bfd_elf32_i386_vec
+
+ARCHITECTURE=  bfd_i386_arch
 
 BFD_DEFAULT_TARGET_SIZE?=      32