changeset 8:173e1c48e335

Cleaned up mess of makefiles. Force user to copy Makefile.templ to Makefile.
author samer
date Thu, 19 Jan 2012 15:23:35 +0000
parents 39982f16da0b
children 60b7b78b3167
files INSTALL Makefile Makefile.lnx Makefile.maci64 Makefile.osx Makefile.templ README
diffstat 7 files changed, 68 insertions(+), 207 deletions(-) [+]
line wrap: on
line diff
--- a/INSTALL	Thu Jan 19 14:32:49 2012 +0000
+++ b/INSTALL	Thu Jan 19 15:23:35 2012 +0000
@@ -9,7 +9,7 @@
 ***    Centre for Computational Creativity
 ***    Goldsmiths College, University of London
 ***
-*** Dec 2004--November 2008
+*** Dec 2004--January 2012
 
 
 -------------------------------------------------------------------------
@@ -17,43 +17,27 @@
 
 
 Before you start, you need a working SWI Prolog installation and
-a Matlab installation. The compilation is done using the plld utility
+a Matlab installation. The compilation is done using the swipl-ld utility
 that comes with SWI.  This only has a hope of working on Unix systems, 
 and I've only tried with Mac OS X and Linux. 
 
 
 *** Binary and Prolog code ***
 
-There are several possible make files:
-
-	Makefile.osx - Makefile for OS X
-	Makefile.lnx - Makefile for Linux
-	Makefile.maci64 - Makefile for OS X 64 bit Intel
-
-The top of each make file contains configuration variables that
-you may need to adjust:
+There is a template makefile in Makefile.templ
+Copy it to Makefile and adjust the configuration variables at 
+the top to suit your system.
 	
-	MATLAB   - Top Matlab installation directory
-	MLARCH   - Matlab name for system architecture (mac,glnx86)
-	SO       - Extension for shared objects (dylib,so)
-	INCLUDES - extra include options
-	PLLD     - command to run SWI Prolog compiler/linker plld
-	MLLIBS   - Matlab libraries to link with
-	INSTALL_LIB_TO - directory to install shared object to 
-	INSTALL_PL_TO  - directroy to install Prolog files to
-
-See one of the make files for more information.
-Copy of one the make files to Makefile and
-modify as necessary.
 Then run
 	$ make 
 	$ make install
 
 This should copy the binary object and Prolog libraries to the target
 installation directory. SWI Prolog needs to be able to find them,
-eg, with INSTALL_PL_TO=~/lib/prolog I put
+eg, with INSTALL_PL_TO=~/lib/prolog and INSTALL_LIB_TO=~/lib/prolog/x86_64 
+I put
 
-	file_search_path(foreign,'/Users/samer/lib/prolog').
+	file_search_path(foreign,'/Users/samer/lib/prolog/x86_64').
 
 into my ~/.plrc
 Since ~/lib/prolog is automatically in the file_search_path(library,_),
--- a/Makefile	Thu Jan 19 14:32:49 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-# ---------------- configuration ----------------------
-
-# Point this at your Matlab installation
-export MATLAB=/usr/local/matlab7
-
-# this needs to match the correct subdirectory of $(MATLAB)/bin
-export MLARCH=maci64
-
-# I arrived at these by trial and error so it may need adjusting. 
-export MLLIBS=-leng 
-#export MLLIBS=-leng -lmx -lmat -licuuc -licudata -licui18n -lz -lreadline
-
-# target is plml.dylib for OSX, plml.so under Linux
-export SO=dylib
-
-# if you have multiple SWI Prolog installations or an installation
-# in a non-standard place, set PLLD to the appropriate plld invokation, eg
-# PLLD=/usr/local/bin/plld -p /usr/local/bin/swipl
-export PLLD=swipl-ld
-
-# 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 ---------------
-
-main: 
-	make -C cpp
-
-clean:
-	make -C cpp clean
-
-install: main
-	make -C cpp install
-	make -C prolog install
-	make -C matlab install
-
-tarball:
-	mkdirhier release
-	(cd .. && tar czf plml/release/plml-$(VER).tar.gz --exclude CVS --exclude "*.gz" --exclude release plml)
--- a/Makefile.lnx	Thu Jan 19 14:32:49 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-# ---------------- configuration ----------------------
-
-# Point this at your Matlab installation
-export MATLAB=/usr/local/matlab7
-
-# this needs to match the correct subdirectory of $(MATLAB)/bin
-export MLARCH=glnx86
-
-# I arrived at these by trial and error so it may need adjusting. 
-export MLLIBS=-leng -lmx -lmat -licuuc -licudata -licui18n -lz -lreadline
-
-# target is plml.dylib for OSX, plml.so under Linux
-export SO=so
-
-# Any extra includes go here - I use Fink, hence /sw/include
-export INCLUDES=
-
-# if you have multiple SWI Prolog installations or an installation
-# in a non-standard place, set PLLD to the appropriate plld invokation, eg
-# PLLD=/usr/local/bin/plld -p /usr/local/bin/swipl
-export PLLD=swipl-ld
-
-# install directories
-export INSTALL_LIB_TO=~/lib/prolog
-export INSTALL_PL_TO=~/lib/prolog
-
-# flags for install - BSD install seems to be different from GNU install
-export INSTALL_FLAGS='-bp'
-
-VER=0.91
-# ---------------- end of configuration ---------------
-
-main: 
-	make -C cpp
-
-clean:
-	make -C cpp clean
-
-install: main
-	make -C cpp install
-	make -C prolog install
-
-tarball:
-	mkdirhier release
-	(cd .. && tar czf plml/release/plml-$(VER).tar.gz --exclude CVS --exclude "*.gz" --exclude release plml)
--- a/Makefile.maci64	Thu Jan 19 14:32:49 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-# ---------------- configuration ----------------------
-
-# Point this at your Matlab installation
-export MATLAB=/usr/local/matlab7
-
-# this needs to match the correct subdirectory of $(MATLAB)/bin
-export MLARCH=maci64
-
-# I arrived at these by trial and error so it may need adjusting. 
-export MLLIBS=-leng 
-#export MLLIBS=-leng -lmx -lmat -licuuc -licudata -licui18n -lz -lreadline
-
-# target is plml.dylib for OSX, plml.so under Linux
-export SO=dylib
-
-# if you have multiple SWI Prolog installations or an installation
-# in a non-standard place, set PLLD to the appropriate plld invokation, eg
-# PLLD=/usr/local/bin/plld -p /usr/local/bin/swipl
-export PLLD=swipl-ld
-
-# install directories
-export INSTALL_LIB_TO=~/lib/prolog
-export INSTALL_PL_TO=~/lib/prolog
-
-# flags for install - BSD install seems to be different from GNU install
-export INSTALL_FLAGS='-bCS'
-
-VER=0.92
-# ---------------- end of configuration ---------------
-
-main: 
-	make -C cpp
-
-clean:
-	make -C cpp clean
-
-install: main
-	make -C cpp install
-	make -C prolog install
-
-tarball:
-	mkdirhier release
-	(cd .. && tar czf plml/release/plml-$(VER).tar.gz --exclude CVS --exclude "*.gz" --exclude release plml)
--- a/Makefile.osx	Thu Jan 19 14:32:49 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-# ---------------- configuration ----------------------
-
-# Point this at your Matlab installation
-export MATLAB=/usr/local/matlab7
-
-# this needs to match the correct subdirectory of $(MATLAB)/bin
-export MLARCH=mac
-
-# I arrived at these by trial and error so it may need adjusting. 
-export MLLIBS=-leng -lmx -lmat -licuuc -licudata -licui18n -lz -lreadline
-
-# target is plml.dylib for OSX, plml.so under Linux
-export SO=dylib
-
-# Any extra includes go here - I use Fink, hence /sw/include
-export INCLUDES=-I/sw/include
-
-# if you have multiple SWI Prolog installations or an installation
-# in a non-standard place, set PLLD to the appropriate plld invokation, eg
-# PLLD=/usr/local/bin/plld -p /usr/local/bin/swipl
-export PLLD=swipl-ld
-
-# install directories
-export INSTALL_LIB_TO=~/lib/prolog
-export INSTALL_PL_TO=~/lib/prolog
-
-# flags for install - BSD install seems to be different from GNU install
-export INSTALL_FLAGS='-bCS'
-
-VER=0.91
-# ---------------- end of configuration ---------------
-
-main: 
-	make -C cpp
-
-clean:
-	make -C cpp clean
-
-install: main
-	make -C cpp install
-	make -C prolog install
-
-tarball:
-	mkdirhier release
-	(cd .. && tar czf plml/release/plml-$(VER).tar.gz --exclude CVS --exclude "*.gz" --exclude release plml)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.templ	Thu Jan 19 15:23:35 2012 +0000
@@ -0,0 +1,56 @@
+# ---------------- configuration ----------------------
+
+# Point this at your Matlab installation, eg
+# export MATLAB=/Applications/MATLAB_R2009b.app
+export MATLAB=/usr/local/matlab7
+
+# this needs to match the correct subdirectory of $(MATLAB)/bin
+# export MLARCH=glnx86   # 32 bit Linux
+# export MLARCH=maci     # 32 bit Intel Mac
+# export MLARCH=mac      # PowerPC Mac
+export MLARCH=maci64
+
+# I arrived at these by trial and error so it may need adjusting. 
+# export MLLIBS=-leng -lmx -lmat -licuuc -licudata -licui18n -lz -lreadline
+export MLLIBS=-leng 
+
+# target is plml.dylib for OSX, plml.so under Linux
+# export SO=so
+export SO=dylib
+
+# if you have multiple SWI Prolog installations or an installation
+# in a non-standard place, set PLLD to the appropriate plld invokation, eg
+# PLLD=/usr/local/bin/plld -p /usr/local/bin/swipl
+export PLLD=swipl-ld
+
+# install directories
+export INSTALL_LIB_TO=~/lib/prolog/x86_64
+export INSTALL_PL_TO=~/lib/prolog/source
+export INSTALL_ML_TO=~/matlab
+
+# flags for install - BSD install seems to be different from GNU install
+# export INSTALL_FLAGS='-bp'  # for GNU/Linux
+export INSTALL_FLAGS='-bCS'   # for Mac OS X
+
+# 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 ---------------
+
+main: 
+	make -C cpp
+
+clean:
+	make -C cpp clean
+
+install: main
+	make -C cpp install
+	make -C prolog install
+	make -C matlab install
+
+tarball:
+	mkdirhier release
+	(cd .. && tar czf plml/release/plml-$(VER).tar.gz --exclude CVS --exclude "*.gz" --exclude release plml)
--- a/README	Thu Jan 19 14:32:49 2012 +0000
+++ b/README	Thu Jan 19 15:23:35 2012 +0000
@@ -12,6 +12,10 @@
 *** Dec 2004--January 2012
 
 
+-------------------------------------------------------------------------
+NB: output type tagging system has changed but this documentation
+has not yet. See pldoc documentation of plml.pl.
+
 
 
 -------------------------------------------------------------------------