From 86ffc4812952f11a35afa19b24a3e6d1a12f4490 Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 4 Dec 2010 16:47:08 +0100 Subject: 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. --- tests/Makefile | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'tests/Makefile') 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 ---; \ -- cgit v1.3.1