2 include $(TOP
)/Makefile
3 VPATH
= $(top_srcdir
)/tests
/tests2
5 TCCFLAGS
= -B
$(TOP
) -I
$(top_srcdir
)/include
7 TCCFLAGS
= -B
$(top_srcdir
)/win32
-I
$(top_srcdir
)/include -L
$(TOP
)
10 ifeq ($(TARGETOS
),Darwin
)
11 CFLAGS
+= -Wl
,-flat_namespace
,-undefined
,warning
12 TCCFLAGS
+= -D_ANSI_SOURCE
13 export MACOSX_DEPLOYMENT_TARGET
:=10.2
16 TCC
= $(TOP
)/tcc
$(TCCFLAGS
)
32 13_integer_literals.
test \
38 19_pointer_arithmetic.
test \
39 20_pointer_comparison.
test \
41 22_floating_point.
test \
42 23_type_coercion.
test \
43 24_math_library.
test \
45 26_character_constants.
test \
48 29_array_address.
test \
53 36_array_initialisers.
test \
55 38_multiple_array_index.
test \
59 42_function_pointer.
test \
61 44_scoped_declarations.
test \
63 47_switch_return.
test \
64 48_nested_break.
test \
65 49_bracket_evaluation.
test \
66 50_logical_second_arg.
test \
68 52_unnamed_enum.
test \
71 56_btype_excess-1.
test \
72 57_btype_excess-2.
test \
73 58_function_redefinition.
test \
74 59_function_array.
test \
75 60_enum_redefinition.
test \
76 61_undefined_enum.
test \
77 62_enumerator_redefinition.
test \
78 63_local_enumerator_redefinition.
test
80 # 30_hanoi.test -- seg fault in the code, gcc as well
81 # 34_array_assignment.test -- array assignment is not in C standard
82 # 46_grep.test -- does not compile even with gcc
84 # some tests do not pass on all platforms, remove them for now
85 ifeq ($(TARGETOS
),Darwin
)
86 TESTS
:= $(filter-out 40_stdio.
test,$(TESTS
))
89 TESTS
:= $(filter-out 24_math_library.
test 28_strings.
test,$(TESTS
))
94 @if
[ "x`echo $* | grep args`" != "x" ]; \
95 then
$(TCC
) $< -norunsrc
-run
$(notdir $<) - arg1 arg2 arg3 arg4
>$*.output
2>&1; \
96 else $(TCC
) -run
$< >$*.output
2>&1; \
98 @if diff
-bu
$(<:.c
=.expect
) $*.output
; \
99 then
rm -f
$*.output
; \
106 rm -vf fred.txt
*.output