changeset 5:193d582746e5

Add CXX variable to select which C++ compiler to use, needed for Lion.
author samer
date Thu, 19 Jan 2012 14:25:38 +0000
parents 460f6c74b33a (current diff) 9b16fbec2f33 (diff)
children 39982f16da0b
files Makefile cpp/Makefile
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Jan 17 18:39:14 2012 +0000
+++ b/Makefile	Thu Jan 19 14:25:38 2012 +0000
@@ -21,10 +21,16 @@
 # install directories
 export INSTALL_LIB_TO=~/lib/prolog/x86_64
 export INSTALL_PL_TO=~/lib/prolog/source
+export INSTALL_ML_TO=~/lib/matlab
 
 # flags for install - BSD install seems to be different from GNU install
 export INSTALL_FLAGS='-bCS'
 
+# on Mac OS X Lion using MacPorts gcc 4.2, you need this to select
+# the correct C++ compiler. Leave CXX blank otherwise.
+export CXX=-c++ g++-apple-4.2
+#export CXX=
+
 VER=1.0
 # ---------------- end of configuration ---------------
 
@@ -37,6 +43,7 @@
 install: main
 	make -C cpp install
 	make -C prolog install
+	make -C matlab install
 
 tarball:
 	mkdirhier release
--- a/cpp/Makefile	Tue Jan 17 18:39:14 2012 +0000
+++ b/cpp/Makefile	Thu Jan 19 14:25:38 2012 +0000
@@ -4,8 +4,7 @@
 TARGET=plml.$(SO)
 INCML=$(MATLAB)/extern/include
 LIBML=$(MATLAB)/bin/$(MLARCH)
-PLLDFLAGS=-c++ g++-apple-4.2 $(INCLUDES) -I$(INCML) -Wall
-# use -c++ g++-4.2 on Snow Leopard
+PLLDFLAGS=$(CXX) $(INCLUDES) -I$(INCML) -Wall
 
 .SUFFIXES: .cpp .o .so .dylib