]> git.proxmox.com Git - mirror_qemu.git/blob - tests/Makefile
glibc2.2 fixes - more command line options - misc doc fixes
[mirror_qemu.git] / tests / Makefile
1 include ../config.mak
2
3 CFLAGS=-Wall -O2 -g
4 LDFLAGS=
5
6 ifeq ($(ARCH),i386)
7 TESTS=testclone testsig testthread sha1-i386 test-i386
8 endif
9 TESTS+=sha1
10
11 QEMU=../qemu
12
13 all: $(TESTS)
14
15 hello: hello.c
16 $(CC) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
17 strip hello
18
19 testclone: testclone.c
20 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
21
22 testsig: testsig.c
23 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
24
25 testthread: testthread.c
26 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread
27
28 # i386 emulation test (test various opcodes) */
29 test-i386: test-i386.c test-i386-code16.S \
30 test-i386.h test-i386-shift.h test-i386-muldiv.h
31 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test-i386.c test-i386-code16.S -lm
32
33 test: test-i386
34 ifeq ($(ARCH),i386)
35 ./test-i386 > test-i386.ref
36 endif
37 $(QEMU) test-i386 > test-i386.out
38 @if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi
39
40 # speed test
41 sha1-i386: sha1.c
42 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
43
44 sha1: sha1.c
45 $(HOST_CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
46
47 speed: sha1 sha1-i386
48 time ./sha1
49 time $(QEMU) ./sha1-i386
50
51 clean:
52 rm -f *~ *.o $(TESTS)