aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile
diff options
context:
space:
mode:
authorgrischka <grischka>2010-12-04 16:47:08 +0100
committergrischka <grischka>2010-12-04 16:47:08 +0100
commit86ffc4812952f11a35afa19b24a3e6d1a12f4490 (patch)
tree7793f0de96d21eae73564d907f97fb25e85a69eb /tests/Makefile
parent2ce9a0e2fe10a4e9a851ff2b8d4c14b36fff5eef (diff)
downloadtinycc-86ffc4812952f11a35afa19b24a3e6d1a12f4490.tar.gz
tinycc-86ffc4812952f11a35afa19b24a3e6d1a12f4490.tar.bz2
make: new lib/Makefile for libtcc1.a on more platforms
win32/64 cross-compilers now build libtcc1.a and install it together with the windows headers in a 'win32' sub-directory of TCCDIR.
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile24
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 74303d4..d7e94b9 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -14,6 +14,10 @@ TESTS = libtest test3
TOP = ..
include $(TOP)/Makefile
+ifdef DISABLE_STATIC
+export LD_LIBRARY_PATH:=$(CURDIR)/..
+endif
+
# run local version of tcc with local libraries and includes
TCC = ../tcc -B..
RUN_TCC = $(NATIVE_DEFINES) -run ../tcc.c -B..
@@ -22,23 +26,21 @@ DISAS=objdump -d
all test : $(TESTS)
# make sure that tcc exists
-$(TESTS) : ../tcc
-
-../tcc ../libtcc.a :
- $(MAKE) -C ..
+test1 test2 test3 test4 btest speedtest asmtest : ../tcc
+../%:
+ $(MAKE) -C .. $*
# libtcc test
-libtest: libtcc_test$(EXESUF)
+libtest: libtcc_test$(EXESUF) ../libtcc1.a
@echo ------------ $@ ------------
- ./libtcc_test lib_path=..
+ ./libtcc_test$(EXESUF) lib_path=..
-libtcc_test$(EXESUF): libtcc_test.c ../libtcc.a
- $(CC) -o $@ $^ -I.. $(CFLAGS) $(LIBS)
+libtcc_test$(EXESUF): libtcc_test.c ../$(LIBTCC)
+ $(CC) -o $@ $^ -I.. $(CFLAGS) $(LIBS) $(LINK_LIBTCC)
# test.ref - generate using gcc
test.ref: tcctest.c
- cp -u ../include/tcclib.h .
- $(CC) -o tcctest.gcc $< -I. -w $(CFLAGS)
+ $(CC) -o tcctest.gcc $< -w $(CFLAGS) -I../include
./tcctest.gcc > $@
# auto test
@@ -84,7 +86,7 @@ test4: test.ref
BOUNDS_OK = 1 4 8 10 14
BOUNDS_FAIL= 2 5 7 9 11 12 13 15
-btest: boundtest.c
+btest: boundtest.c ../bcheck.o
@echo ------------ $@ ------------
@for i in $(BOUNDS_OK); do \
echo ; echo --- boundtest $$i ---; \