Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/crunch/crunchide Pick the supported object formats i...
details: https://anonhg.NetBSD.org/src/rev/b555bb3aa645
branches: trunk
changeset: 500759:b555bb3aa645
user: scw <scw%NetBSD.org@localhost>
date: Mon Dec 18 08:51:39 2000 +0000
description:
Pick the supported object formats in the Makefile instead of extern.h.
This gives more control of which platforms support which formats.
(Basically because __%{MACHINE}__ is not pre-defined by the compiler)
diffstat:
usr.bin/crunch/crunchide/Makefile | 20 +++++++++++++++++++-
usr.bin/crunch/crunchide/extern.h | 26 +-------------------------
2 files changed, 20 insertions(+), 26 deletions(-)
diffs (70 lines):
diff -r 84608af0914f -r b555bb3aa645 usr.bin/crunch/crunchide/Makefile
--- a/usr.bin/crunch/crunchide/Makefile Mon Dec 18 07:57:02 2000 +0000
+++ b/usr.bin/crunch/crunchide/Makefile Mon Dec 18 08:51:39 2000 +0000
@@ -1,7 +1,25 @@
-# $NetBSD: Makefile,v 1.5 1999/11/26 13:47:52 msaitoh Exp $
+# $NetBSD: Makefile,v 1.6 2000/12/18 08:51:39 scw Exp $
PROG= crunchide
SRCS= crunchide.c exec_aout.c exec_coff.c exec_ecoff.c exec_elf32.c \
exec_elf64.c
+.if ${MACHINE_ARCH} == "alpha"
+CPPFLAGS+=-DNLIST_ELF64 -DNLIST_ECOFF
+.elif ${MACHINE_ARCH} == "arm26" || \
+ ${MACHINE_ARCH} == "mips" || \
+ ${MACHINE_ARCH} == "powerpc" || \
+ ${MACHINE} == "mvme68k"
+CPPFLAGS+=-DNLIST_ELF32
+.elif ${MACHINE_ARCH} == "sh3"
+CPPFLAGS+=-DNLIST_ELF32 -DNLIST_COFF
+.elif ${MACHINE_ARCH} == "sparc64"
+CPPFLAGS+=-DNLIST_AOUT -DNLIST_ELF32 -DNLIST_ELF64
+.elif ${MACHINE_ARCH} == "sparc" || \
+ ${MACHINE_ARCH} == "i386"
+CPPFLAGS+=-DNLIST_AOUT -DNLIST_ELF32
+.else
+CPPFLAGS+=-DNLIST_AOUT
+.endif
+
.include <bsd.prog.mk>
diff -r 84608af0914f -r b555bb3aa645 usr.bin/crunch/crunchide/extern.h
--- a/usr.bin/crunch/crunchide/extern.h Mon Dec 18 07:57:02 2000 +0000
+++ b/usr.bin/crunch/crunchide/extern.h Mon Dec 18 08:51:39 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.11 2000/08/09 14:22:15 mrg Exp $ */
+/* $NetBSD: extern.h,v 1.12 2000/12/18 08:51:39 scw Exp $ */
/*
* Copyright (c) 1997 Christopher G. Demetriou
@@ -34,30 +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(__arm26__) || defined(__mips__)
-# define NLIST_ELF32
-#elif defined(__powerpc__)
-# define NLIST_ELF32
-#elif defined(__sh3__)
-# define NLIST_COFF
-# define NLIST_ELF32
-#elif defined(__sparc64__)
-# define NLIST_AOUT
-# define NLIST_ELF32
-# define NLIST_ELF64
-#elif defined(__sparc__) || defined(__i386__)
-# define NLIST_AOUT
-# define NLIST_ELF32
-#else
-# define NLIST_AOUT
-/* #define NLIST_ECOFF */
-/* #define NLIST_ELF32 */
-/* #define NLIST_ELF64 */
-#endif
-
#ifdef NLIST_AOUT
int check_aout(int, const char *);
int hide_aout(int, const char *);
Home |
Main Index |
Thread Index |
Old Index