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