root / tests / Makefile @ 9d8e9c09
History | View | Annotate | Download (1.2 kB)
1 | 4d1135e4 | bellard | CC=gcc |
---|---|---|---|
2 | 4d1135e4 | bellard | CFLAGS=-Wall -O2 -g |
3 | 4d1135e4 | bellard | LDFLAGS= |
4 | 4d1135e4 | bellard | |
5 | 367e86e8 | bellard | TESTS=hello test1 test2 sha1 test-i386 |
6 | 367e86e8 | bellard | TESTS+=op-i386.o #op-i386.o op-ppc.o op-arm.o op-mips.o op-sparc.o |
7 | 367e86e8 | bellard | |
8 | 4d1135e4 | bellard | GEMU=../gemu |
9 | 4d1135e4 | bellard | |
10 | 4d1135e4 | bellard | all: $(TESTS) |
11 | 4d1135e4 | bellard | |
12 | 4d1135e4 | bellard | hello: hello.c |
13 | 4d1135e4 | bellard | $(CC) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< |
14 | 4d1135e4 | bellard | |
15 | 4d1135e4 | bellard | test1: test1.c |
16 | 9d8e9c09 | bellard | $(CC) $(CFLAGS) -static $(LDFLAGS) -o $@ $< |
17 | 4d1135e4 | bellard | |
18 | 4d1135e4 | bellard | test2: test2.c |
19 | 4d1135e4 | bellard | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< |
20 | 4d1135e4 | bellard | |
21 | 4d1135e4 | bellard | # i386 emulation test (dump various opcodes) */ |
22 | d57c4e01 | bellard | test-i386: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h |
23 | 9d8e9c09 | bellard | $(CC) $(CFLAGS) $(LDFLAGS) -static -o $@ $< -lm |
24 | 4d1135e4 | bellard | |
25 | 4d1135e4 | bellard | test: test-i386 |
26 | 4d1135e4 | bellard | ./test-i386 > test-i386.ref |
27 | 4d1135e4 | bellard | $(GEMU) test-i386 > test-i386.out |
28 | 4d1135e4 | bellard | @if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi |
29 | 4d1135e4 | bellard | |
30 | 367e86e8 | bellard | # dyngen tests |
31 | 367e86e8 | bellard | op-i386.o: op.c |
32 | 367e86e8 | bellard | gcc $(CFLAGS) -c -o $@ $< |
33 | 367e86e8 | bellard | |
34 | 367e86e8 | bellard | op-ppc.o: op.c |
35 | 367e86e8 | bellard | powerpc-linux-gcc $(CFLAGS) -c -o $@ $< |
36 | 367e86e8 | bellard | |
37 | 367e86e8 | bellard | op-arm.o: op.c |
38 | 367e86e8 | bellard | arm-linux-gcc $(CFLAGS) -c -o $@ $< |
39 | 367e86e8 | bellard | |
40 | 367e86e8 | bellard | op-mips.o: op.c |
41 | 367e86e8 | bellard | mips-linux-gcc $(CFLAGS) -mno-abicalls -c -o $@ $< |
42 | 367e86e8 | bellard | |
43 | 367e86e8 | bellard | op-sparc.o: op.c |
44 | 367e86e8 | bellard | sparc-linux-gcc $(CFLAGS) -mflat -c -o $@ $< |
45 | 367e86e8 | bellard | |
46 | 4d1135e4 | bellard | # speed test |
47 | 4d1135e4 | bellard | sha1: sha1.c |
48 | 4d1135e4 | bellard | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< |
49 | 4d1135e4 | bellard | |
50 | 4d1135e4 | bellard | speed: sha1 |
51 | 4d1135e4 | bellard | time ./sha1 |
52 | 4d1135e4 | bellard | time $(GEMU) sha1 |
53 | 4d1135e4 | bellard | |
54 | 4d1135e4 | bellard | # interpreter test |
55 | 4d1135e4 | bellard | interp: interp.c interploop.c |
56 | 4d1135e4 | bellard | $(CC) $(CFLAGS) -fomit-frame-pointer $(LDFLAGS) -o $@ $^ |