mirror of https://github.com/deater/tb1.git
tb_asm: update to compile on x86_64 systems
sstrip won't happen though
This commit is contained in:
parent
4acb1d16c8
commit
f0fc207ce7
|
@ -15,18 +15,18 @@ compress_data.o: compress_data.c
|
||||||
|
|
||||||
|
|
||||||
lzss.o: lzss.c
|
lzss.o: lzss.c
|
||||||
gcc -O2 -Wall -c lzss.c
|
$(CC) $(CFLAGS) -c lzss.c
|
||||||
|
|
||||||
lzss_new.o: lzss_new.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
|
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
|
./sstrip/sstrip tb_asm
|
||||||
|
|
||||||
tb_asm.o: tb_asm.s data.lzss data.labels
|
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
|
tb_asm.s: configure
|
||||||
./configure
|
./configure
|
||||||
|
@ -40,7 +40,7 @@ data.lzss: compress_data data.inc
|
||||||
|
|
||||||
|
|
||||||
configure: configure.c
|
configure: configure.c
|
||||||
gcc -O2 -Wall -o configure configure.c
|
$(CC) $(CFLAGS) -o configure configure.c
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ *.o tb_asm tb_asm.s core configure compress_data data.lzss data.header data.raw data.labels
|
rm -f *~ *.o tb_asm tb_asm.s core configure compress_data data.lzss data.header data.raw data.labels
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#define ARCH_SH3 11
|
#define ARCH_SH3 11
|
||||||
#define ARCH_SPARC 12
|
#define ARCH_SPARC 12
|
||||||
#define ARCH_VAX 13
|
#define ARCH_VAX 13
|
||||||
|
#define ARCH_X86_64 14
|
||||||
|
|
||||||
|
|
||||||
char *arch_names[]={
|
char *arch_names[]={
|
||||||
|
@ -19,7 +20,7 @@ char *arch_names[]={
|
||||||
"alpha",
|
"alpha",
|
||||||
"arm",
|
"arm",
|
||||||
"cris",
|
"cris",
|
||||||
"ia64",
|
"ia64",
|
||||||
"ix86",
|
"ix86",
|
||||||
"m68k",
|
"m68k",
|
||||||
"mips",
|
"mips",
|
||||||
|
@ -28,5 +29,6 @@ char *arch_names[]={
|
||||||
"s390",
|
"s390",
|
||||||
"sh3",
|
"sh3",
|
||||||
"sparc",
|
"sparc",
|
||||||
"vax"
|
"vax",
|
||||||
|
"x86_64",
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
|
|
||||||
int linux_detect_arch(void) {
|
int linux_detect_arch(void) {
|
||||||
|
|
||||||
/* Yes this is a bit messy, but it cleans up the makefile a bit *\
|
/* Yes this is a bit messy, but it cleans up the makefile a bit *\
|
||||||
\* The C-Preproccessor can be out friend ;) */
|
\* The C-Preproccessor can be out friend ;) */
|
||||||
|
|
||||||
/* return ARCH_SPARC; */
|
/* return ARCH_SPARC; */
|
||||||
|
|
||||||
#if defined(__alpha__)
|
#if defined(__alpha__)
|
||||||
return ARCH_ALPHA;
|
return ARCH_ALPHA;
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
return ARCH_ARM;
|
return ARCH_ARM;
|
||||||
#elif defined(__cris__)
|
#elif defined(__cris__)
|
||||||
|
@ -34,14 +34,16 @@ int linux_detect_arch(void) {
|
||||||
#elif defined(__s390__)
|
#elif defined(__s390__)
|
||||||
return ARCH_S390;
|
return ARCH_S390;
|
||||||
#elif defined(__sh3__) || defined(__sh2__) || defined(__sh4)
|
#elif defined(__sh3__) || defined(__sh2__) || defined(__sh4)
|
||||||
return ARCH_SH3
|
return ARCH_SH3
|
||||||
#elif defined(__sparc__)
|
#elif defined(__sparc__)
|
||||||
return ARCH_SPARC;
|
return ARCH_SPARC;
|
||||||
#elif defined(__vax__)
|
#elif defined(__vax__)
|
||||||
return ARCH_VAX;
|
return ARCH_VAX;
|
||||||
|
#elif defined(__x86_64__)
|
||||||
|
return ARCH_IX86;
|
||||||
#else
|
#else
|
||||||
return ARCH_UNKNOWN;
|
return ARCH_UNKNOWN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue