]> git.proxmox.com Git - mirror_qemu.git/blob - tests/Makefile
added translation cache
[mirror_qemu.git] / tests / Makefile
1 include ../config.mak
2
3 CFLAGS=-Wall -O2 -g
4 LDFLAGS=
5
6 ifeq ($(ARCH),i386)
7 TESTS=hello test2 sha1 test-i386
8 endif
9
10 GEMU=../gemu
11
12 all: $(TESTS)
13
14 hello: hello.c
15 $(CC) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
16
17 test2: test2.c
18 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
19
20 # i386 emulation test (dump various opcodes) */
21 test-i386: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h
22 $(CC) $(CFLAGS) $(LDFLAGS) -static -o $@ $< -lm
23
24 test: test-i386
25 ./test-i386 > test-i386.ref
26 $(GEMU) test-i386 > test-i386.out
27 @if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi
28
29 # speed test
30 sha1: sha1.c
31 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
32
33 speed: sha1
34 time ./sha1
35 time $(GEMU) sha1
36
37 clean:
38 rm -f *~ *.o $(TESTS)