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