d328ce7dfe1ff65f8a50475d78f289a5ed175f36
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
12 TCCFLAGS
=-I
$(TOP
)/win32
/include -L
$(TOP
)
15 TESTS
= 00_assignment.
test \
28 13_integer_literals.
test \
34 19_pointer_arithmetic.
test \
35 20_pointer_comparison.
test \
37 22_floating_point.
test \
38 23_type_coercion.
test \
39 24_math_library.
test \
41 26_character_constants.
test \
44 29_array_address.
test \
49 36_array_initialisers.
test \
51 38_multiple_array_index.
test \
55 42_function_pointer.
test \
57 44_scoped_declarations.
test \
59 47_switch_return.
test \
60 48_nested_break.
test \
61 49_bracket_evaluation.
test \
62 50_logical_second_arg.
test \
64 52_unnamed_enum.
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
))
77 TESTS
:= $(filter-out 24_math_library.
test,$(TESTS
))
78 TESTS
:= $(filter-out 28_strings.
test,$(TESTS
))
83 @if
[ "x`echo $* | grep args`" != "x" ]; \
85 ..
/tcc
-B..
$(TCCFLAGS
) -run
$< - arg1 arg2 arg3 arg4
2>&1 >$*.output
; \
87 ..
/tcc
-B..
$(TCCFLAGS
) -run
$< 2>&1 >$*.output
; \
89 @if diff
-bu
$(<:.c
=.expect
) $*.output
; \
93 echo
"ERROR: test $*"; \
100 # vim: set expandtab ts=4 sw=4 sts=4 tw=80 :