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