aboutsummaryrefslogtreecommitdiff
path: root/tests/tests2
diff options
context:
space:
mode:
authorgrischka <grischka>2016-10-01 21:06:33 +0200
committergrischka <grischka>2016-10-01 21:06:33 +0200
commit0a624782dfc8fee6f0600066b135d3b20e4274f4 (patch)
treee47f5f74ee3570445a7bc44f11bfb0ed98f4f427 /tests/tests2
parent6d2be31b93bec581391ea4476482693ee7452f59 (diff)
downloadtinycc-0a624782dfc8fee6f0600066b135d3b20e4274f4.tar.gz
tinycc-0a624782dfc8fee6f0600066b135d3b20e4274f4.tar.bz2
build: revert Makefiles to 0.9.26 state (mostly)
Except - that libtcc1.a is now installed in subdirs i386/ etc. - the support for arm and arm64 - some of the "Darwin" fixes - tests are mosly unchanged Also - removed the "legacy links for cross compilers" (was total mess) - removed "out-of-tree" build support (was broken anyway)
Diffstat (limited to 'tests/tests2')
-rw-r--r--tests/tests2/Makefile24
1 files changed, 6 insertions, 18 deletions
diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile
index 65bf2dc..587f1e7 100644
--- a/tests/tests2/Makefile
+++ b/tests/tests2/Makefile
@@ -1,22 +1,11 @@
TOP = ../..
include $(TOP)/Makefile
-# clear CFLAGS and LDFLAGS
-CFLAGS :=
-LDFLAGS :=
-
+# run local version of tcc with local libraries and includes
+TCCFLAGS = -B$(TOP) -I$(TOP)
ifdef CONFIG_WIN32
- TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir)/include -L$(TOP)
-else
- TCCFLAGS = -B$(TOP) -I$(top_srcdir)/include -lm
+ TCCFLAGS = -B$(TOP)/win32 -I$(TOP)/include -I$(TOP) -L$(TOP)
endif
-
-ifeq ($(TARGETOS),Darwin)
- CFLAGS += -Wl,-flat_namespace,-undefined,warning
- TCCFLAGS += -D_ANSI_SOURCE
- export MACOSX_DEPLOYMENT_TARGET:=10.2
-endif
-
TCC = $(TOP)/tcc $(TCCFLAGS)
TESTS = $(patsubst %.c,%.test,$(sort $(wildcard *.c)))
@@ -48,8 +37,7 @@ ARGS =
46_grep.test : ARGS = '[^* ]*[:a:d: ]+\:\*-/: $$' 46_grep.c
# Some tests might need different flags
-FLAGS =
-76_dollars_in_identifiers.test : FLAGS = -fdollars-in-identifiers
+76_dollars_in_identifiers.test : TCCFLAGS += -fdollars-in-identifiers
# Filter some always-warning
FILTER =
@@ -62,7 +50,7 @@ all test: $(filter-out $(SKIP),$(TESTS))
%.test: %.c %.expect
@echo Test: $*...
# test -run
- @$(TCC) $(FLAGS) -run $< $(ARGS) $(FILTER) >$*.output 2>&1 || true
+ @$(TCC) -run $< $(ARGS) $(FILTER) >$*.output 2>&1 || true
@diff -Nbu $*.expect $*.output && rm -f $*.output
# test exe (disabled for speed)
# @($(TCC) $(FLAGS) $< -o $*.exe && ./$*.exe $(ARGS)) $(FiLTER) >$*.output2 2>&1 ; \
@@ -76,4 +64,4 @@ all test: $(filter-out $(SKIP),$(TESTS))
.PRECIOUS: %.expect
clean:
- rm -vf fred.txt *.output a.exe
+ rm -f fred.txt *.output a.exe