Add armv6l to ARM supported processors
[tinycc.git] / tests2 / Makefile
blobb6833bd7715f5624cf36a62b26721c3a4ac27c58
1 TOP = ..
2 include $(TOP)/Makefile
4 ifeq ($(TARGETOS),Darwin)
5 CFLAGS+=-Wl,-flat_namespace,-undefined,warning
6 TCCFLAGS=-D_ANSI_SOURCE
7 export MACOSX_DEPLOYMENT_TARGET:=10.2
8 endif
10 ifdef CONFIG_WIN32
11 TCCFLAGS=-I $(TOP)/win32/include -L$(TOP)
12 endif
14 TESTS= 00_assignment.test \
15 01_comment.test \
16 02_printf.test \
17 03_struct.test \
18 04_for.test \
19 05_array.test \
20 06_case.test \
21 07_function.test \
22 08_while.test \
23 09_do_while.test \
24 10_pointer.test \
25 11_precedence.test \
26 12_hashdefine.test \
27 13_integer_literals.test \
28 14_if.test \
29 15_recursion.test \
30 16_nesting.test \
31 17_enum.test \
32 18_include.test \
33 19_pointer_arithmetic.test \
34 20_pointer_comparison.test \
35 21_char_array.test \
36 22_floating_point.test \
37 23_type_coercion.test \
38 24_math_library.test \
39 25_quicksort.test \
40 26_character_constants.test \
41 27_sizeof.test \
42 28_strings.test \
43 29_array_address.test \
44 31_args.test \
45 32_led.test \
46 33_ternary_op.test \
47 35_sizeof.test \
48 36_array_initialisers.test \
49 37_sprintf.test \
50 38_multiple_array_index.test \
51 39_typedef.test \
52 40_stdio.test \
53 41_hashif.test \
54 42_function_pointer.test \
55 43_void_param.test \
56 44_scoped_declarations.test \
57 45_empty_for.test \
58 47_switch_return.test \
59 48_nested_break.test \
60 49_bracket_evaluation.test \
61 50_logical_second_arg.test \
62 51_static.test \
63 52_unnamed_enum.test \
64 54_goto.test \
65 55_lshift_type.test
67 # 30_hanoi.test \ # seg fault in the code, gcc as well
68 # 34_array_assignment.test \ # array assignment is not in C standard
69 # 46_grep.test \ # does not compile even with gcc
71 # some tests do not pass on all platforms, remove them for now
72 ifeq ($(TARGETOS),Darwin)
73 TESTS := $(filter-out 40_stdio.test,$(TESTS))
74 endif
75 ifdef CONFIG_WIN32
76 TESTS := $(filter-out 24_math_library.test,$(TESTS))
77 TESTS := $(filter-out 28_strings.test,$(TESTS))
78 endif
80 %.test: %.expect %.c
81 @echo Test: $*...
82 @if [ "x`echo $* | grep args`" != "x" ]; \
83 then \
84 ../tcc -B.. $(TCCFLAGS) -run $*.c - arg1 arg2 arg3 arg4 2>&1 >$*.output; \
85 else \
86 ../tcc -B.. $(TCCFLAGS) -run $*.c 2>&1 >$*.output; \
88 @if diff -bu $*.expect $*.output ; \
89 then \
90 rm -f $*.output \
91 else \
92 echo "ERROR: test $*"; \
95 all: test
97 test: $(TESTS)
99 # vim: set expandtab ts=4 sw=4 sts=4 tw=80 :
101 clean:
102 rm -vf fred.txt