2 include $(TOP
)/Makefile
5 TCCFLAGS
= -B
$(top_srcdir
)/win32
-I
$(top_srcdir
)/include -L
$(TOP
)
7 TCCFLAGS
= -B
$(TOP
) -I
$(top_srcdir
)/include -lm
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 34_array_assignment.
test \
55 36_array_initialisers.
test \
57 38_multiple_array_index.
test \
61 42_function_pointer.
test \
63 44_scoped_declarations.
test \
66 47_switch_return.
test \
67 48_nested_break.
test \
68 49_bracket_evaluation.
test \
69 50_logical_second_arg.
test \
71 52_unnamed_enum.
test \
74 56_btype_excess-1.
test \
75 57_btype_excess-2.
test \
76 58_function_redefinition.
test \
77 59_function_array.
test \
78 60_enum_redefinition.
test \
79 61_undefined_enum.
test \
80 62_enumerator_redefinition.
test \
81 63_local_enumerator_redefinition.
test \
82 64_macro_nesting.
test \
83 65_macro_concat_start.
test \
84 66_macro_concat_end.
test \
85 67_macro_concat.
test \
86 68_macro_concat.
test \
89 # 34_array_assignment.test -- array assignment is not in C standard
91 SKIP
= 34_array_assignment.
test
93 # some tests do not pass on all platforms, remove them for now
94 ifeq ($(TARGETOS
),Darwin
)
98 SKIP
+= 24_math_library.
test # don't have round()
99 SKIP
+= 28_strings.
test # don't have r/index() / strings.h
102 # Some tests might need arguments
104 31_args.
test : ARGS
= arg1 arg2 arg3 arg4 arg5
105 46_grep.
test : ARGS
= '[^* ]*[:a:d: ]+\:\*-/: $$' 46_grep.c
107 all test: $(filter-out $(SKIP
),$(TESTS
))
112 @
$(TCC
) -run
$< $(ARGS
) >$*.output
2>&1 || true
113 @diff
-bu
$*.expect
$*.output
&& rm -f
$*.output
115 @
($(TCC
) $< -o
$*.exe
&& .
/$*.exe
$(ARGS
)) >$*.output2
2>&1 || true
116 @diff
-bu
$*.expect
$*.output2
&& rm -f
$*.output2
$*.exe
119 rm -vf fred.txt
*.output
* *.exe