From 8281a9243bd4343add28c1140762beea587e258a Mon Sep 17 00:00:00 2001 From: mescalinum Date: Thu, 3 Sep 2009 14:05:08 +0000 Subject: add two variables to Makefile (TCL_RUNTIME_VERSION and TCL_HEADERS_VERSION), and conditionally add tclpd only if OS == linux AND tcl-dev >= 8.5 svn path=/trunk/; revision=12210 --- externals/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'externals/Makefile') diff --git a/externals/Makefile b/externals/Makefile index 865cb135..26248222 100644 --- a/externals/Makefile +++ b/externals/Makefile @@ -86,6 +86,9 @@ endif CXXFLAGS = $(CFLAGS) +TCL_RUNTIME_VERSION=$(shell echo 'puts $$tcl_version' | tclsh) +TCL_HEADERS_VERSION=$(shell sed -n 's|^#define TCL_VERSION.*"\([0-9]\.[0-9][0-9]*\)".*|\1|p' /usr/include/tcl.h) + ### C++ files %.$(EXTENSION): %.cpp %.$(EXTENSION): %.cc @@ -139,6 +142,10 @@ else else # GNU/Linux, BSD, IRIX, etc. LIB_TARGETS += hid pdp pidip gem2pdp iem16 pdp_opengl pdvjtools postlude sixaxis + # externals that depend on Tcl 8.5 or greater + ifeq ($(TCL_HEADERS_VERSION),8.5) + LIB_TARGETS += tclpd + endif endif endif -- cgit v1.2.1