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)
This commit is contained in:
parent
84a116117c
commit
9bb48d10db
@ -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>
|
||||
|
@ -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 *);
|
||||
|
Loading…
Reference in New Issue
Block a user