]> git.proxmox.com Git - qemu.git/blame - tests/Makefile
arm emulation support
[qemu.git] / tests / Makefile
CommitLineData
7d13299d
FB
1include ../config.mak
2
4d1135e4
FB
3CFLAGS=-Wall -O2 -g
4LDFLAGS=
5
7d13299d 6ifeq ($(ARCH),i386)
c3c7c292 7TESTS=testclone testsig testthread sha1-i386 test-i386 runcom
7d13299d 8endif
7fb9a24e 9TESTS+=sha1 test_path
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
7fb9a24e
FB
28test_path: test_path.c
29 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
30 ./$@ || { rm $@; exit 1; }
31
04369ff2 32# i386 emulation test (test various opcodes) */
5132455e 33test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \
e5918247 34 test-i386.h test-i386-shift.h test-i386-muldiv.h
5132455e
FB
35 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test-i386.c \
36 test-i386-code16.S test-i386-vm86.S -lm
4d1135e4 37
04369ff2 38ifeq ($(ARCH),i386)
d3032929 39test: test-i386
4d1135e4 40 ./test-i386 > test-i386.ref
d3032929
FB
41else
42test:
04369ff2 43endif
3ef693a0 44 $(QEMU) test-i386 > test-i386.out
4d1135e4
FB
45 @if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi
46
47# speed test
04369ff2 48sha1-i386: sha1.c
4d1135e4
FB
49 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
50
04369ff2
FB
51sha1: sha1.c
52 $(HOST_CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
53
54speed: sha1 sha1-i386
4d1135e4 55 time ./sha1
3ef693a0 56 time $(QEMU) ./sha1-i386
4d1135e4 57
c3c7c292
FB
58# vm86 test
59runcom: runcom.c
60 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
61
394411ac
FB
62# arm test
63hello-arm: hello-arm.o
64 arm-linux-ld -o $@ $<
65
66hello-arm.o: hello-arm.c
67 arm-linux-gcc -Wall -g -O2 -c -o $@ $<
68
7d13299d
FB
69clean:
70 rm -f *~ *.o $(TESTS)