| 4 |
LDFLAGS= |
LDFLAGS= |
| 5 |
|
|
| 6 |
ifeq ($(ARCH),i386) |
ifeq ($(ARCH),i386) |
| 7 |
TESTS=testclone testsig testthread sha1-i386 test-i386 runcom |
TESTS=linux-test testthread sha1-i386 test-i386 runcom |
| 8 |
endif |
endif |
| 9 |
TESTS+=sha1 test_path |
TESTS+=sha1# test_path |
| 10 |
|
#TESTS+=test_path |
| 11 |
|
|
| 12 |
QEMU=../i386/qemu |
QEMU=../i386/qemu-i386 |
| 13 |
|
|
| 14 |
all: $(TESTS) |
all: $(TESTS) |
| 15 |
|
|
| 17 |
$(CC) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< |
$(CC) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< |
| 18 |
strip $@ |
strip $@ |
| 19 |
|
|
|
testclone: testclone.c |
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< |
|
|
|
|
|
testsig: testsig.c |
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< |
|
|
|
|
| 20 |
testthread: testthread.c |
testthread: testthread.c |
| 21 |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread |
| 22 |
|
|
| 27 |
# i386 emulation test (test various opcodes) */ |
# i386 emulation test (test various opcodes) */ |
| 28 |
test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \ |
test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \ |
| 29 |
test-i386.h test-i386-shift.h test-i386-muldiv.h |
test-i386.h test-i386-shift.h test-i386-muldiv.h |
| 30 |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ test-i386.c \ |
$(CC) $(CFLAGS) $(LDFLAGS) -static -o $@ test-i386.c \ |
| 31 |
test-i386-code16.S test-i386-vm86.S -lm |
test-i386-code16.S test-i386-vm86.S -lm |
| 32 |
|
|
| 33 |
ifeq ($(ARCH),i386) |
ifeq ($(ARCH),i386) |
| 39 |
$(QEMU) test-i386 > test-i386.out |
$(QEMU) test-i386 > test-i386.out |
| 40 |
@if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi |
@if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi |
| 41 |
|
|
| 42 |
|
# generic Linux and CPU test |
| 43 |
|
linux-test: linux-test.c |
| 44 |
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm |
| 45 |
|
|
| 46 |
# speed test |
# speed test |
| 47 |
sha1-i386: sha1.c |
sha1-i386: sha1.c |
| 48 |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< |