master
text 32 lines 689 Bytes
Raw
1 -include ../../../../config-host.mak
2
3 CROSS=mipsr5900el-unknown-linux-gnu-
4
5 SIM=qemu-mipsel
6 SIM_FLAGS=-cpu R5900
7
8 CC = $(CROSS)gcc
9 CFLAGS = -Wall -mabi=32 -march=r5900 -static
10
11 TESTCASES = test_r5900_div1.tst
12 TESTCASES += test_r5900_divu1.tst
13 TESTCASES += test_r5900_madd.tst
14 TESTCASES += test_r5900_maddu.tst
15 TESTCASES += test_r5900_mflohi1.tst
16 TESTCASES += test_r5900_mtlohi1.tst
17 TESTCASES += test_r5900_mult.tst
18 TESTCASES += test_r5900_multu.tst
19
20 all: $(TESTCASES)
21
22 %.tst: %.c
23 $(CC) $(CFLAGS) $< -o $@
24
25 check: $(TESTCASES)
26 @for case in $(TESTCASES); do \
27 echo $(SIM) $(SIM_FLAGS) ./$$case;\
28 $(SIM) $(SIM_FLAGS) ./$$case; \
29 done
30
31 clean:
32 $(RM) -rf $(TESTCASES)