From eb152022a0359841266c0f37022e4c7ad08d1f85 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Sat, 14 May 2011 16:21:45 +0200 Subject: [PATCH] make test work when LIBTCC1 not defined Make libtest depends on LIBTCC1 instead of ../libtcc1.a and define LIBTCC1 to $(TOP)/$(LIBTCC1) if LIBTCC1 is defined --- Makefile | 2 ++ tests/Makefile | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 74bb4bef..10b7cda0 100644 --- a/Makefile +++ b/Makefile @@ -331,6 +331,8 @@ tar: rm -rf /tmp/$(TCC-VERSION) # in tests subdir +export LIBTCC1 + %est: $(MAKE) -C tests $@ diff --git a/tests/Makefile b/tests/Makefile index d1c732ae..36dd5fcd 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -31,7 +31,11 @@ test1 test2 test3 test4 btest speedtest asmtest weaktest : ../tcc $(MAKE) -C .. $* # libtcc test -libtest: libtcc_test$(EXESUF) ../libtcc1.a +ifdef LIBTCC1 +LIBTCC1:=$(TOP)/$(LIBTCC1) +endif + +libtest: libtcc_test$(EXESUF) $(LIBTCC1) @echo ------------ $@ ------------ ./libtcc_test$(EXESUF) lib_path=..