Add qemu 2.4.0
[kvmfornfv.git] / qemu / tests / tcg / lm32 / Makefile
1 -include ../../../config-host.mak
2
3 CROSS=lm32-elf-
4
5 SIM = qemu-system-lm32
6 SIMFLAGS = -M lm32-evr -nographic -semihosting -net none -kernel
7
8 CC      = $(CROSS)gcc
9 AS      = $(CROSS)as
10 AS      = $(CC) -x assembler
11 SIZE    = $(CROSS)size
12 LD      = $(CC)
13 OBJCOPY = $(CROSS)objcopy
14
15 TSRC_PATH = $(SRC_PATH)/tests/tcg/lm32
16
17 LDFLAGS = -T$(TSRC_PATH)/linker.ld
18 ASFLAGS += -Wa,-I,$(TSRC_PATH)/
19
20 CRT        = crt.o
21 HELPER     = helper.o
22 TESTCASES += test_add.tst
23 TESTCASES += test_addi.tst
24 TESTCASES += test_and.tst
25 TESTCASES += test_andhi.tst
26 TESTCASES += test_andi.tst
27 TESTCASES += test_b.tst
28 TESTCASES += test_be.tst
29 TESTCASES += test_bg.tst
30 TESTCASES += test_bge.tst
31 TESTCASES += test_bgeu.tst
32 TESTCASES += test_bgu.tst
33 TESTCASES += test_bi.tst
34 TESTCASES += test_bne.tst
35 TESTCASES += test_break.tst
36 TESTCASES += test_bret.tst
37 TESTCASES += test_call.tst
38 TESTCASES += test_calli.tst
39 TESTCASES += test_cmpe.tst
40 TESTCASES += test_cmpei.tst
41 TESTCASES += test_cmpg.tst
42 TESTCASES += test_cmpgi.tst
43 TESTCASES += test_cmpge.tst
44 TESTCASES += test_cmpgei.tst
45 TESTCASES += test_cmpgeu.tst
46 TESTCASES += test_cmpgeui.tst
47 TESTCASES += test_cmpgu.tst
48 TESTCASES += test_cmpgui.tst
49 TESTCASES += test_cmpne.tst
50 TESTCASES += test_cmpnei.tst
51 TESTCASES += test_divu.tst
52 TESTCASES += test_eret.tst
53 TESTCASES += test_lb.tst
54 TESTCASES += test_lbu.tst
55 TESTCASES += test_lh.tst
56 TESTCASES += test_lhu.tst
57 TESTCASES += test_lw.tst
58 TESTCASES += test_modu.tst
59 TESTCASES += test_mul.tst
60 TESTCASES += test_muli.tst
61 TESTCASES += test_nor.tst
62 TESTCASES += test_nori.tst
63 TESTCASES += test_or.tst
64 TESTCASES += test_ori.tst
65 TESTCASES += test_orhi.tst
66 #TESTCASES += test_rcsr.tst
67 TESTCASES += test_ret.tst
68 TESTCASES += test_sb.tst
69 TESTCASES += test_scall.tst
70 TESTCASES += test_sextb.tst
71 TESTCASES += test_sexth.tst
72 TESTCASES += test_sh.tst
73 TESTCASES += test_sl.tst
74 TESTCASES += test_sli.tst
75 TESTCASES += test_sr.tst
76 TESTCASES += test_sri.tst
77 TESTCASES += test_sru.tst
78 TESTCASES += test_srui.tst
79 TESTCASES += test_sub.tst
80 TESTCASES += test_sw.tst
81 #TESTCASES += test_wcsr.tst
82 TESTCASES += test_xnor.tst
83 TESTCASES += test_xnori.tst
84 TESTCASES += test_xor.tst
85 TESTCASES += test_xori.tst
86
87 all: build
88
89 %.o: $(TSRC_PATH)/%.c
90         $(CC) $(CFLAGS) -c $< -o $@
91
92 %.o: $(TSRC_PATH)/%.S
93         $(AS) $(ASFLAGS) -c $< -o $@
94
95 %.tst: %.o $(TSRC_PATH)/macros.inc $(CRT) $(HELPER)
96         $(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $(HELPER) $< -o $@
97
98 build: $(TESTCASES)
99
100 check: $(TESTCASES:test_%.tst=check_%)
101
102 check_%: test_%.tst
103         @$(SIM) $(SIMFLAGS) $<
104
105 clean:
106         $(RM) -fr $(TESTCASES) $(CRT) $(HELPER)