# Makefile for Sockets, a socket library for Mathematica. # 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 MATHDIR = /opt/eecs/math/mathematica4.0 #MATHDIR = /usr/local/mathematica MLBASE = AddOns/MathLink/DevelopersKits # EDIT HERE: choose your platform (comment out the others) #PLATFORM = Linux PLATFORM = Solaris # EDIT HERE: Linux wants the first line, Suns want the 2nd line #MLLIBS = -lML -lm MLLIBS = -lML -lm -lsocket -lnsl MLDIR = ${MATHDIR}/${MLBASE}/${PLATFORM}/CompilerAdditions MLINCDIR = ${MLDIR} MLLIBDIR = ${MLDIR} MPREP = ${MLDIR}/mprep ##################################################################### all : Sockets Sockets : Sockets-tm.o Sockets.o ${CC} -I${MLINCDIR} $? -L${MLLIBDIR} ${MLLIBS} -o $@ Sockets-tm.c : Sockets.tm ${MPREP} $? > $@ .c.o : ${CC} ${CFLAGS} -c -I${MLINCDIR} $< clean : /bin/rm *.o Sockets Sockets-tm.c