# Makefile for MASH, Mathematica Scripting Hack # This file may need to be edited wherever it says "EDIT HERE" CC = gcc # FLAGS = -g -W -Wall FLAGS = -O3 # EDIT HERE: your path to mathematica (Mac wants 1st line, linux 2nd) MATHDIR= /Applications/Mathematica\ 5.2.app #MATHDIR = /usr/local/Wolfram/Mathematica/5.2 #MATHDIR = /usr/local/mathematica MLBASE = AddOns/MathLink/DeveloperKit # EDIT HERE: choose your platform (Mac wants 1st line) PLATFORM = Darwin #PLATFORM = Linux #PLATFORM = Linux-x86-64 #PLATFORM = Solaris # EDIT HERE: Linux/Mac want the first line, Suns want the 2nd line MLLIBS = -lML -lm -lpthread #MLLIBS = -lML -lm -lsocket -lnsl #MLLIBS = -lML -lm -lnsl # (Sun may also want -lpthread) # EDIT HERE: If you had RedHat Linux you once needed the 2nd line... MLDIR = ${MATHDIR}/${MLBASE}/${PLATFORM}/CompilerAdditions #MLDIR = . MLINCDIR = ${MLDIR} MLLIBDIR = ${MLDIR} MPREP = ${MLDIR}/mprep ##################################################################### all : mash mash : mash.o ${CC} -I${MLINCDIR} $? -L${MLLIBDIR} ${MLLIBS} -o $@ .c.o : ${CC} ${FLAGS} -c -I${MLINCDIR} $< clean : /bin/rm *.o mash /bin/mv *~ tmp