Update
[qemu-kvm/fedora.git] / tests / cris / Makefile
blobcfe494c3ad808305be9919a6e993925be29e0478
1 -include ../../config-host.mak
3 CROSS=crisv32-axis-linux-gnu-
4 SIM=../../cris-linux-user/qemu-cris -L ./
5 SIMG=cris-axis-linux-gnu-run --sysroot=./
7 CC = $(CROSS)gcc
8 #AS = $(CROSS)as
9 AS = $(CC) -x assembler-with-cpp
10 SIZE = $(CROSS)size
11 LD = $(CC)
12 OBJCOPY = $(CROSS)objcopy
14 # we rely on GCC inline:ing the stuff we tell it to in many places here.
15 CFLAGS = -Winline -Wall -g -O2 -static
16 NOSTDFLAGS = -nostartfiles -nostdlib
17 ASFLAGS += -g -Wa,-I,$(SRC_PATH)/tests/cris/
18 LDLIBS =
19 NOSTDLIBS = -lgcc
21 CRT = crt.o
22 SYS = sys.o
23 TESTCASES += check_abs.tst
24 TESTCASES += check_addc.tst
25 TESTCASES += check_addcm.tst
26 TESTCASES += check_addo.tst
27 TESTCASES += check_addoq.tst
28 TESTCASES += check_addi.tst
29 TESTCASES += check_addiv32.tst
30 TESTCASES += check_addm.tst
31 TESTCASES += check_addr.tst
32 TESTCASES += check_addq.tst
33 TESTCASES += check_addxc.tst
34 TESTCASES += check_addxm.tst
35 TESTCASES += check_addxr.tst
36 TESTCASES += check_andc.tst
37 TESTCASES += check_andm.tst
38 TESTCASES += check_andr.tst
39 TESTCASES += check_andq.tst
40 TESTCASES += check_asr.tst
41 TESTCASES += check_ba.tst
42 TESTCASES += check_bas.tst
43 TESTCASES += check_bcc.tst
44 TESTCASES += check_bound.tst
45 TESTCASES += check_boundc.tst
46 TESTCASES += check_boundr.tst
47 TESTCASES += check_btst.tst
48 TESTCASES += check_clearfv32.tst
49 TESTCASES += check_cmpc.tst
50 TESTCASES += check_cmpr.tst
51 TESTCASES += check_cmpq.tst
52 TESTCASES += check_cmpm.tst
53 TESTCASES += check_cmpxc.tst
54 TESTCASES += check_cmpxm.tst
55 TESTCASES += check_cmp-2.tst
56 TESTCASES += check_clrjmp1.tst
57 TESTCASES += check_dstep.tst
58 TESTCASES += check_ftag.tst
59 TESTCASES += check_int64.tst
60 # check_jsr is broken.
61 #TESTCASES += check_jsr.tst
62 TESTCASES += check_mcp.tst
63 TESTCASES += check_movei.tst
64 TESTCASES += check_mover.tst
65 TESTCASES += check_moverm.tst
66 TESTCASES += check_moveq.tst
67 TESTCASES += check_movemr.tst
68 TESTCASES += check_movemrv32.tst
69 TESTCASES += check_movecr.tst
70 TESTCASES += check_movmp.tst
71 TESTCASES += check_movpr.tst
72 TESTCASES += check_movprv32.tst
73 TESTCASES += check_movdelsr1.tst
74 TESTCASES += check_movpmv32.tst
75 TESTCASES += check_movsr.tst
76 TESTCASES += check_movsm.tst
77 TESTCASES += check_movscr.tst
78 TESTCASES += check_movur.tst
79 TESTCASES += check_movum.tst
80 TESTCASES += check_movucr.tst
81 TESTCASES += check_mulx.tst
82 TESTCASES += check_mulv32.tst
83 TESTCASES += check_neg.tst
84 TESTCASES += check_not.tst
85 TESTCASES += check_lz.tst
86 TESTCASES += check_lapc.tst
87 TESTCASES += check_lsl.tst
88 TESTCASES += check_lsr.tst
89 TESTCASES += check_orc.tst
90 TESTCASES += check_orm.tst
91 TESTCASES += check_orr.tst
92 TESTCASES += check_orq.tst
93 TESTCASES += check_ret.tst
94 TESTCASES += check_swap.tst
95 TESTCASES += check_scc.tst
96 TESTCASES += check_subc.tst
97 TESTCASES += check_subq.tst
98 TESTCASES += check_subr.tst
99 TESTCASES += check_subm.tst
100 TESTCASES += check_glibc_kernelversion.tst
101 TESTCASES += check_xarith.tst
103 TESTCASES += check_hello.ctst
104 TESTCASES += check_stat1.ctst
105 TESTCASES += check_stat2.ctst
106 TESTCASES += check_stat3.ctst
107 TESTCASES += check_stat4.ctst
108 TESTCASES += check_openpf1.ctst
109 TESTCASES += check_openpf2.ctst
110 TESTCASES += check_openpf3.ctst
111 TESTCASES += check_openpf4.ctst
112 TESTCASES += check_openpf5.ctst
113 TESTCASES += check_mapbrk.ctst
114 TESTCASES += check_mmap1.ctst
115 TESTCASES += check_mmap2.ctst
116 TESTCASES += check_mmap3.ctst
117 TESTCASES += check_sigalrm.ctst
118 TESTCASES += check_time1.ctst
119 TESTCASES += check_time2.ctst
122 TESTCASES += check_gcctorture_pr28634-1.ctst
123 #TESTCASES += check_gcctorture_pr28634.ctst
125 all: build
127 %.o: $(SRC_PATH)/tests/cris/%.c
128 $(CC) $(CFLAGS) -c $< -o $@
130 %.o: $(SRC_PATH)/tests/cris/%.s
131 $(AS) $(ASFLAGS) -c $< -o $@
133 %.tst: %.o
134 $(CC) $(CFLAGS) $(NOSTDFLAGS) $(LDLIBS) $(NOSTDLIBS) $(CRT) $< $(SYS) -o $@
136 %.ctst: %.o
137 $(CC) $(CFLAGS) $(LDLIBS) $< -o $@
139 build: $(CRT) $(SYS) $(TESTCASES)
141 check: $(CRT) $(SYS) $(TESTCASES)
142 @echo -e "\nQEMU simulator."
143 for case in $(TESTCASES); do \
144 echo -n "$$case "; \
145 $(SIM) ./$$case; \
146 done
147 check-g: $(CRT) $(SYS) $(TESTCASES)
148 @echo -e "\nGDB simulator."
149 @for case in $(TESTCASES); do \
150 echo -n "$$case "; \
151 $(SIMG) $$case; \
152 done
154 clean:
155 $(RM) -fr $(TESTCASES) $(CRT) $(SYS)