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