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
93
# 34_array_assignment.test -- array assignment is not in C standard
95
SKIP = 34_array_assignment.test
97
# some tests do not pass on all platforms, remove them for now
98
ifeq ($(CONFIG_arm_eabi),yes) # not ARM soft-float
99
SKIP += 22_floating_point.test
101
ifeq ($(TARGETOS),Darwin)
102
SKIP += 40_stdio.test
105
SKIP += 24_math_library.test # don't have round()
106
SKIP += 28_strings.test # don't have r/index() / strings.h
109
# Some tests might need arguments
111
31_args.test : ARGS = arg1 arg2 arg3 arg4 arg5
112
46_grep.test : ARGS = '[^* ]*[:a:d: ]+\:\*-/: $$' 46_grep.c
114
all test: $(filter-out $(SKIP),$(TESTS))
119
@$(TCC) -run $< $(ARGS) >$*.output 2>&1 || true
120
@diff -bu $*.expect $*.output && rm -f $*.output
122
@($(TCC) $< -o $*.exe && ./$*.exe $(ARGS)) >$*.output2 2>&1 || true
123
@diff -bu $*.expect $*.output2 && rm -f $*.output2 $*.exe
126
rm -vf fred.txt *.output* *.exe