Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/mdsetimage Select the object format in the Makefile...



details:   https://anonhg.NetBSD.org/src/rev/7aaede0d5711
branches:  trunk
changeset: 500797:7aaede0d5711
user:      scw <scw%NetBSD.org@localhost>
date:      Mon Dec 18 20:43:58 2000 +0000

description:
Select the object format in the Makefile, to allow selecting on
%MACHINE when deciding what object formats to support.

diffstat:

 usr.sbin/mdsetimage/Makefile |  27 ++++++++++++++++++++++++++-
 usr.sbin/mdsetimage/extern.h |  25 +------------------------
 2 files changed, 27 insertions(+), 25 deletions(-)

diffs (77 lines):

diff -r 420b39eca15b -r 7aaede0d5711 usr.sbin/mdsetimage/Makefile
--- a/usr.sbin/mdsetimage/Makefile      Mon Dec 18 20:41:44 2000 +0000
+++ b/usr.sbin/mdsetimage/Makefile      Mon Dec 18 20:43:58 2000 +0000
@@ -1,8 +1,33 @@
-#      $NetBSD: Makefile,v 1.3 1999/09/12 16:08:13 itojun Exp $
+#      $NetBSD: Makefile,v 1.4 2000/12/18 20:43:58 scw Exp $
 
 PROG=  mdsetimage
 SRCS=  mdsetimage.c exec_aout.c exec_ecoff.c exec_elf32.c exec_elf64.c \
        exec_coff.c
 MAN=   mdsetimage.8
 
+.if    ${MACHINE_ARCH} == "alpha"
+CPPFLAGS+=-DNLIST_ECOFF
+CPPFLAGS+=-DNLIST_ELF64
+.elif  ${MACHINE_ARCH} == "mips"
+CPPFLAGS+=-DNLIST_ECOFF
+CPPFLAGS+=-DNLIST_ELF32
+CPPFLAGS+=-DNLIST_AOUT
+.elif  ${MACHINE_ARCH} == "powerpc" || \
+       ${MACHINE} == "mvme68k"
+CPPFLAGS+=-DNLIST_ELF32
+.elif  ${MACHINE_ARCH} == "i386" || \
+       ${MACHINE_ARCH} == "sparc"
+CPPFLAGS+=-DNLIST_ELF32
+CPPFLAGS+=-DNLIST_AOUT
+.elif  ${MACHINE_ARCH} == "sh3"
+CPPFLAGS+=-DNLIST_COFF
+CPPFLAGS+=-DNLIST_ELF32
+.else
+CPPFLAGS+=-DNLIST_AOUT
+#CPPFLAGS+=-DNLIST_ECOFF
+#CPPFLAGS+=-DNLIST_ELF32
+#CPPFLAGS+=-DNLIST_ELF64
+#CPPFLAGS+=-DNLIST_COFF
+.endif
+
 .include <bsd.prog.mk>
diff -r 420b39eca15b -r 7aaede0d5711 usr.sbin/mdsetimage/extern.h
--- a/usr.sbin/mdsetimage/extern.h      Mon Dec 18 20:41:44 2000 +0000
+++ b/usr.sbin/mdsetimage/extern.h      Mon Dec 18 20:43:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.7 2000/06/14 17:26:17 cgd Exp $ */
+/* $NetBSD: extern.h,v 1.8 2000/12/18 20:43:58 scw Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -34,29 +34,6 @@
  * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
  */
 
-#if defined(__alpha__)
-# define       NLIST_ECOFF
-# define       NLIST_ELF64
-#elif defined(__mips__)
-# define       NLIST_ECOFF
-# define       NLIST_ELF32
-# define       NLIST_AOUT
-#elif defined(__powerpc__)
-# define       NLIST_ELF32
-#elif defined(__i386__) || defined(__sparc__)
-# define       NLIST_ELF32
-# define       NLIST_AOUT
-#elif defined(__sh3__)
-# define       NLIST_COFF
-# define       NLIST_ELF32
-#else
-# define       NLIST_AOUT
-/* #define     NLIST_ECOFF */
-/* #define     NLIST_ELF32 */
-/* #define     NLIST_ELF64 */
-/* #define     NLIST_COFF */
-#endif
-
 #ifdef NLIST_AOUT
 int    check_aout __P((const char *, size_t));
 int    findoff_aout __P((const char *, size_t, u_long, size_t *));



Home | Main Index | Thread Index | Old Index