2 include $(TOP
)/Makefile
4 # clear CFLAGS and LDFLAGS
9 TCCFLAGS
= -B
$(top_srcdir
)/win32
-I
$(top_srcdir
)/include -L
$(TOP
)
11 TCCFLAGS
= -B
$(TOP
) -I
$(top_srcdir
)/include -lm
14 ifeq ($(TARGETOS
),Darwin
)
15 CFLAGS
+= -Wl
,-flat_namespace
,-undefined
,warning
16 TCCFLAGS
+= -D_ANSI_SOURCE
17 export MACOSX_DEPLOYMENT_TARGET
:=10.2
20 TCC
= $(TOP
)/tcc
$(TCCFLAGS
)
36 13_integer_literals.
test \
42 19_pointer_arithmetic.
test \
43 20_pointer_comparison.
test \
45 22_floating_point.
test \
46 23_type_coercion.
test \
47 24_math_library.
test \
49 26_character_constants.
test \
52 29_array_address.
test \
57 34_array_assignment.
test \
59 36_array_initialisers.
test \
61 38_multiple_array_index.
test \
65 42_function_pointer.
test \
67 44_scoped_declarations.
test \
70 47_switch_return.
test \
71 48_nested_break.
test \
72 49_bracket_evaluation.
test \
73 50_logical_second_arg.
test \
75 52_unnamed_enum.
test \
78 56_btype_excess-1.
test \
79 57_btype_excess-2.
test \
80 58_function_redefinition.
test \
81 59_function_array.
test \
82 60_enum_redefinition.
test \
83 61_undefined_enum.
test \
84 62_enumerator_redefinition.
test \
85 63_local_enumerator_redefinition.
test \
86 64_macro_nesting.
test \
87 65_macro_concat_start.
test \
88 66_macro_concat_end.
test \
89 67_macro_concat.
test \
90 68_macro_param_list_err_1.
test \
91 69_macro_param_list_err_2.
test \
92 70_floating_point_literals.
test \
93 71_macro_empty_arg.
test \
94 72_long_long_constant.
test \
97 # 34_array_assignment.test -- array assignment is not in C standard
99 SKIP
= 34_array_assignment.
test
101 # some tests do not pass on all platforms, remove them for now
102 ifeq ($(TARGETOS
),Darwin
)
103 SKIP
+= 40_stdio.
test
106 SKIP
+= 24_math_library.
test # don't have round()
107 SKIP
+= 28_strings.
test # don't have r/index() / strings.h
110 # Some tests might need arguments
112 31_args.
test : ARGS
= arg1 arg2 arg3 arg4 arg5
113 46_grep.
test : ARGS
= '[^* ]*[:a:d: ]+\:\*-/: $$' 46_grep.c
115 all test: $(filter-out $(SKIP
),$(TESTS
))
120 @
$(TCC
) -run
$< $(ARGS
) 2>&1 | grep
-v
'warning: soft float ABI currently not supported: default to softfp' >$*.output || true
121 @diff
-Nbu
$*.expect
$*.output
&& rm -f
$*.output
123 @
($(TCC
) $< -o
$*.exe
&& .
/$*.exe
$(ARGS
)) 2>&1 | grep
-v
'warning: soft float ABI currently not supported: default to softfp' >$*.output2 || true
124 @diff
-Nbu
$*.expect
$*.output2
&& rm -f
$*.output2
$*.exe
127 rm -vf fred.txt
*.output
* *.exe