tb_asm: update to compile on x86_64 systems

sstrip won't happen though
This commit is contained in:
Vince Weaver 2014-12-01 14:21:28 -05:00
parent 4acb1d16c8
commit f0fc207ce7
3 changed files with 16 additions and 12 deletions

View File

@ -15,18 +15,18 @@ compress_data.o: compress_data.c
lzss.o: lzss.c
gcc -O2 -Wall -c lzss.c
$(CC) $(CFLAGS) -c lzss.c
lzss_new.o: lzss_new.c
gcc -O2 -Wall -c lzss_new.c
$(CC) $(CFLAGS) -c lzss_new.c
tb_asm: tb_asm.o ./sstrip/sstrip
ld -o tb_asm tb_asm.o
ld -melf_i386 -N -o tb_asm tb_asm.o
./sstrip/sstrip tb_asm
tb_asm.o: tb_asm.s data.lzss data.labels
as -o tb_asm.o tb_asm.s
as --32 -o tb_asm.o tb_asm.s
tb_asm.s: configure
./configure
@ -40,7 +40,7 @@ data.lzss: compress_data data.inc
configure: configure.c
gcc -O2 -Wall -o configure configure.c
$(CC) $(CFLAGS) -o configure configure.c
clean:
rm -f *~ *.o tb_asm tb_asm.s core configure compress_data data.lzss data.header data.raw data.labels

View File

@ -12,6 +12,7 @@
#define ARCH_SH3 11
#define ARCH_SPARC 12
#define ARCH_VAX 13
#define ARCH_X86_64 14
char *arch_names[]={
@ -19,7 +20,7 @@ char *arch_names[]={
"alpha",
"arm",
"cris",
"ia64",
"ia64",
"ix86",
"m68k",
"mips",
@ -28,5 +29,6 @@ char *arch_names[]={
"s390",
"sh3",
"sparc",
"vax"
"vax",
"x86_64",
};

View File

@ -7,14 +7,14 @@
#include "arch.h"
int linux_detect_arch(void) {
/* Yes this is a bit messy, but it cleans up the makefile a bit *\
\* The C-Preproccessor can be out friend ;) */
/* return ARCH_SPARC; */
#if defined(__alpha__)
return ARCH_ALPHA;
return ARCH_ALPHA;
#elif defined(__arm__)
return ARCH_ARM;
#elif defined(__cris__)
@ -34,14 +34,16 @@ int linux_detect_arch(void) {
#elif defined(__s390__)
return ARCH_S390;
#elif defined(__sh3__) || defined(__sh2__) || defined(__sh4)
return ARCH_SH3
return ARCH_SH3
#elif defined(__sparc__)
return ARCH_SPARC;
#elif defined(__vax__)
return ARCH_VAX;
#elif defined(__x86_64__)
return ARCH_IX86;
#else
return ARCH_UNKNOWN;
#endif
#endif
}