VirtualBox

source: vbox/trunk/src/recompiler/tests/Makefile@ 49959

Last change on this file since 49959 was 37689, checked in by vboxsync, 13 years ago

recompiler: Merged in changes from 0.13.0.

  • Property svn:eol-style set to native
File size: 2.8 KB
Line 
1-include ../config-host.mak
2
3$(call set-vpath, $(SRC_PATH)/tests)
4
5CFLAGS=-Wall -O2 -g -fno-strict-aliasing
6#CFLAGS+=-msse2
7LDFLAGS=
8
9ifeq ($(ARCH),i386)
10TESTS=linux-test testthread sha1-i386 test-i386
11endif
12ifeq ($(ARCH),x86_64)
13TESTS=test-x86_64
14endif
15TESTS+=sha1# test_path
16#TESTS+=test_path
17#TESTS+=runcom
18
19QEMU=../i386-linux-user/qemu-i386
20
21all: $(TESTS)
22
23hello-i386: hello-i386.c
24 $(CC) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
25 strip $@
26
27testthread: testthread.c
28 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread
29
30test_path: test_path.c
31 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
32 ./$@ || { rm $@; exit 1; }
33
34# i386/x86_64 emulation test (test various opcodes) */
35test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \
36 test-i386.h test-i386-shift.h test-i386-muldiv.h
37 $(CC) -m32 $(CFLAGS) $(LDFLAGS) -static -o $@ \
38 $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
39
40test-x86_64: test-i386.c \
41 test-i386.h test-i386-shift.h test-i386-muldiv.h
42 $(CC) -m64 $(CFLAGS) $(LDFLAGS) -static -o $@ $(<D)/test-i386.c -lm
43
44ifeq ($(ARCH),i386)
45test: test-i386
46 ./test-i386 > test-i386.ref
47else
48test:
49endif
50 $(QEMU) test-i386 > test-i386.out
51 @if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi
52
53.PHONY: test-mmap
54test-mmap: test-mmap.c
55 $(CC) $(CFLAGS) -Wall -static -O2 $(LDFLAGS) -o $@ $<
56 -./test-mmap
57 -$(QEMU) ./test-mmap
58 -$(QEMU) -p 8192 ./test-mmap 8192
59 -$(QEMU) -p 16384 ./test-mmap 16384
60 -$(QEMU) -p 32768 ./test-mmap 32768
61
62# generic Linux and CPU test
63linux-test: linux-test.c
64 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm
65
66# speed test
67sha1-i386: sha1.c
68 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
69
70sha1: sha1.c
71 $(HOST_CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
72
73speed: sha1 sha1-i386
74 time ./sha1
75 time $(QEMU) ./sha1-i386
76
77# vm86 test
78runcom: runcom.c
79 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
80
81# NOTE: -fomit-frame-pointer is currently needed : this is a bug in libqemu
82qruncom: qruncom.c ../ioport-user.c ../i386-user/libqemu.a
83 $(CC) $(CFLAGS) -fomit-frame-pointer $(LDFLAGS) -I../target-i386 -I.. -I../i386-user -I../fpu \
84 -o $@ $(filter %.c, $^) -L../i386-user -lqemu -lm
85
86# arm test
87hello-arm: hello-arm.o
88 arm-linux-ld -o $@ $<
89
90hello-arm.o: hello-arm.c
91 arm-linux-gcc -Wall -g -O2 -c -o $@ $<
92
93test-arm-iwmmxt: test-arm-iwmmxt.s
94 cpp < $< | arm-linux-gnu-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
95
96# MIPS test
97hello-mips: hello-mips.c
98 mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
99
100hello-mipsel: hello-mips.c
101 mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
102
103# testsuite for the CRIS port.
104test-cris:
105 $(MAKE) -C cris check
106
107clean:
108 rm -f *~ *.o test-i386.out test-i386.ref \
109 test-x86_64.log test-x86_64.ref qruncom $(TESTS)
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette