diff options
author | ru <ru@FreeBSD.org> | 2002-05-25 13:39:20 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2002-05-25 13:39:20 +0000 |
commit | 4eb7a2371e4c31f0df6ef14a3f83f8f7d25f7049 (patch) | |
tree | 56efa843361933aa9d5aa0ec09828f04be8622c1 | |
parent | 6e02fb840443f42eaf8103794237ed1897c9b22e (diff) | |
download | FreeBSD-src-4eb7a2371e4c31f0df6ef14a3f83f8f7d25f7049.zip FreeBSD-src-4eb7a2371e4c31f0df6ef14a3f83f8f7d25f7049.tar.gz |
Get all the fruit from makefile.
-rw-r--r-- | usr.sbin/crunch/crunchide/Makefile | 15 | ||||
-rw-r--r-- | usr.sbin/crunch/crunchide/crunchide.c | 2 | ||||
-rw-r--r-- | usr.sbin/crunch/crunchide/extern.h | 26 |
3 files changed, 13 insertions, 30 deletions
diff --git a/usr.sbin/crunch/crunchide/Makefile b/usr.sbin/crunch/crunchide/Makefile index ae91f3e..7b6abed 100644 --- a/usr.sbin/crunch/crunchide/Makefile +++ b/usr.sbin/crunch/crunchide/Makefile @@ -1,12 +1,23 @@ # $FreeBSD$ PROG= crunchide -SRCS= crunchide.c exec_elf32.c exec_elf64.c +SRCS= crunchide.c TARGET_ARCH?= ${MACHINE_ARCH} + .if ${TARGET_ARCH} == i386 && ${MACHINE_ARCH} == i386 +CFLAGS+=-DNLIST_AOUT SRCS+= exec_aout.c .endif -CFLAGS+=-Darch_${TARGET_ARCH} + +.if ${TARGET_ARCH} == alpha || ${TARGET_ARCH} == ia64 || \ + ${TARGET_ARCH} == sparc64 +CFLAGS+=-DNLIST_ELF64 +SRCS+= exec_elf64.c +exec_elf64.o: exec_elf32.c +.else +CFLAGS+=-DNLIST_ELF32 +SRCS+= exec_elf32.c +.endif .include <bsd.prog.mk> diff --git a/usr.sbin/crunch/crunchide/crunchide.c b/usr.sbin/crunch/crunchide/crunchide.c index 32b0451..f50d3e5 100644 --- a/usr.sbin/crunch/crunchide/crunchide.c +++ b/usr.sbin/crunch/crunchide/crunchide.c @@ -208,11 +208,9 @@ struct { int (*check)(int, const char *); /* 1 if match, zero if not */ int (*hide)(int, const char *); /* non-zero if error */ } exec_formats[] = { -#if defined(__i386__) && defined(arch_i386) #ifdef NLIST_AOUT { "a.out", check_aout, hide_aout, }, #endif -#endif #ifdef NLIST_ECOFF { "ECOFF", check_elf64, hide_elf64, }, #endif diff --git a/usr.sbin/crunch/crunchide/extern.h b/usr.sbin/crunch/crunchide/extern.h index 0fd773b..4200bc3 100644 --- a/usr.sbin/crunch/crunchide/extern.h +++ b/usr.sbin/crunch/crunchide/extern.h @@ -31,32 +31,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef arch_alpha -#define NLIST_ECOFF -#define NLIST_ELF64 -#else -#ifdef arch_ia64 -#define NLIST_ELF64 -#else -#ifdef arch_sparc64 -#define NLIST_ELF64 -#else -#ifdef arch_mips -#define NLIST_ELF32 -#else -#ifdef arch_powerpc -#define NLIST_ELF32 -#else -#define NLIST_AOUT -/* #define NLIST_ECOFF */ -#define NLIST_ELF32 -/* #define NLIST_ELF64 */ -#endif -#endif -#endif -#endif -#endif - #ifdef NLIST_AOUT int check_aout(int, const char *); int hide_aout(int, const char *); |