Get all the fruit from makefile.

This commit is contained in:
Ruslan Ermilov 2002-05-25 13:39:20 +00:00
parent 02c0301fa7
commit a2acc41379
3 changed files with 13 additions and 30 deletions

View File

@ -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>

View File

@ -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

View File

@ -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 *);