2 include $(TOP
)/Makefile
3 VPATH
= $(top_srcdir
)/tests
/tests2
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 \
72 # 30_hanoi.test -- seg fault in the code, gcc as well
73 # 34_array_assignment.test -- array assignment is not in C standard
74 # 46_grep.test -- does not compile even with gcc
76 # some tests do not pass on all platforms, remove them for now
77 ifeq ($(TARGETOS
),Darwin
)
78 TESTS
:= $(filter-out 40_stdio.
test,$(TESTS
))
81 TESTS
:= $(filter-out 24_math_library.
test 28_strings.
test,$(TESTS
))
86 @if
[ "x`echo $* | grep args`" != "x" ]; \
87 then
$(TCC
) $< -norunsrc
-run
$(notdir $<) - arg1 arg2 arg3 arg4
>$*.output
; \
88 else $(TCC
) -run
$< >$*.output
; \
90 @if diff
-bu
$(<:.c
=.expect
) $*.output
; \
91 then
rm -f
$*.output
; \
98 rm -vf fred.txt
*.output
100 Makefile
: $(top_srcdir
)/tests
/tests2
/Makefile