# This makefile can be used to build all or some of the sample # programs. To build all of them, use the command # 'make all'. To build one, say addtwo, use the command # 'make addtwo'. MLINKDIR = /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/MathLink/DeveloperKit SYS = Linux # Set this value with the result of evaluating $SystemID CADDSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions INCDIR = ${CADDSDIR} LIBDIR = ${CADDSDIR} CC = gcc EXTRALIBS = -lm -lpthread -lrt # Set these with appropriate libs for your system. MLLIB = ML32i3 # Set this to ML64i3 if using a 64-bit system MPREP = ${CADDSDIR}/mprep all: make f.exe make g.exe f.exe: f.tm f.c echo ${CADDSDIR} mcc ${EXTRALIBS} -o f.exe f.tm f.c g.exe: g.tm g.c mcc ${EXTRALIBS} -o g.exe g.tm g.c clean: rm -f *.o *.exe