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
11 TCCFLAGS
=-I
$(TOP
)/win32
/include -L
$(TOP
)
14 TESTS
= 00_assignment.
test \
27 13_integer_literals.
test \
33 19_pointer_arithmetic.
test \
34 20_pointer_comparison.
test \
36 22_floating_point.
test \
37 23_type_coercion.
test \
38 24_math_library.
test \
40 26_character_constants.
test \
43 29_array_address.
test \
48 36_array_initialisers.
test \
50 38_multiple_array_index.
test \
54 42_function_pointer.
test \
56 44_scoped_declarations.
test \
58 47_switch_return.
test \
59 48_nested_break.
test \
60 49_bracket_evaluation.
test \
61 50_logical_second_arg.
test \
63 52_unnamed_enum.
test \
66 # 30_hanoi.test \ # seg fault in the code, gcc as well
67 # 34_array_assignment.test \ # array assignment is not in C standard
68 # 46_grep.test \ # does not compile even with gcc
70 # some tests do not pass on all platforms, remove them for now
71 ifeq ($(TARGETOS
),Darwin
)
72 TESTS
:= $(filter-out 40_stdio.
test,$(TESTS
))
75 TESTS
:= $(filter-out 24_math_library.
test,$(TESTS
))
76 TESTS
:= $(filter-out 28_strings.
test,$(TESTS
))
81 @if
[ "x`echo $* | grep args`" != "x" ]; \
83 ..
/tcc
-B..
$(TCCFLAGS
) -run
$*.c
- arg1 arg2 arg3 arg4
2>&1 >$*.output
; \
85 ..
/tcc
-B..
$(TCCFLAGS
) -run
$*.c
2>&1 >$*.output
; \
87 @if diff
-bu
$*.expect
$*.output
; \
91 echo
"ERROR: test $*"; \
98 # vim: set expandtab ts=4 sw=4 sts=4 tw=80 :