version 1.2, 1999/11/02 06:11:57 |
version 1.4, 1999/11/23 02:03:14 |
|
|
# -*- mode: Makefile; coding: euc-japan -*- |
# -*- mode: Makefile; coding: euc-japan -*- |
# $OpenXM$ |
# $OpenXM: OpenXM/src/ox_math/Makefile.FreeBSD,v 1.3 1999/11/07 12:12:54 ohara Exp $ |
|
|
# |
# |
PREFIX=/usr/local |
PREFIX=/usr/local |
|
|
MLINKDIR = ${PREFIX}/mathematica/AddOns/MathLink/DevelopersKits |
MLINKDIR = ${PREFIX}/mathematica/AddOns/MathLink/DevelopersKits |
#SYS = Solaris |
|
SYS = Linux |
SYS = Linux |
ADDONSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions |
ADDONSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions |
MPREP = ${ADDONSDIR}/mprep |
MPREP = ${ADDONSDIR}/mprep |
Line 13 MPREP = ${ADDONSDIR}/mprep |
|
Line 12 MPREP = ${ADDONSDIR}/mprep |
|
# ADDONSDIR = |
# ADDONSDIR = |
|
|
CC = gcc |
CC = gcc |
#GMPSRC = ../kan96xx/gmp-2.0.2 |
|
GMPSRC = /usr/lib |
GMPSRC = /usr/lib |
#GMPINC = -I${GMPSRC} |
GMPINC = -I${PREFIX}/include |
#GMPINC = -I${PREFIX}/include |
|
|
|
# CDEFS = -DDEBUG -DSTREAM_PIPE |
|
CDEFS = -DDEBUG |
CDEFS = -DDEBUG |
INCDIR = -I${ADDONSDIR} ${GMPINC} |
INCDIR = -I${ADDONSDIR} ${GMPINC} |
LIBDIR = -L${ADDONSDIR} -L. |
LIBDIR = -L${ADDONSDIR} -L. |
CFLAGS = -O2 ${CDEFS} ${INCDIR} ${LIBDIR} |
CFLAGS = -g -O2 ${CDEFS} ${INCDIR} ${LIBDIR} |
|
|
#SOLLIBS = -lsocket -lnsl |
#SOLLIBS = -lsocket -lnsl |
#MATHLIBS = -lML -lm |
#MATHLIBS = -lML -lm |
LIBS = -lox -lgmp ${MATHLIBS} ${SOLLIBS} |
LIBS = -lox -lgmp ${MATHLIBS} ${SOLLIBS} |
|
|
LIBOBJS = ox.o parse.o mysocket.o |
LIBOBJS = ox.o parse.o mysocket.o |
|
BINARIES = bconv testclient |
|
|
all: libox.a bconv testclient |
all: libox.a $(BINARIES) |
|
|
bconv.o: ox.h oxtag.h parse.h |
configure: |
parse.o: ox.h oxtag.h parse.h |
@(cd ${OpenXM_HOME}/src; ${MAKE} configure) |
ox.o: ox.h oxtag.h parse.h mysocket.h |
@(cd ${OpenXM_HOME}/src/gmp; ./configure; make) |
|
|
|
bconv.o: ox.h oxtag.h parse.h |
|
math2ox.o: ox.h oxtag.h parse.h |
|
mysocket.o: mysocket.h |
|
ox.o: ox.h oxtag.h parse.h mysocket.h |
|
parse.o: ox.h oxtag.h parse.h |
|
serv1.o: ox.h oxtag.h serv2.h |
|
serv2.o: ox.h oxtag.h parse.h serv2.h |
testclient.o: ox.h oxtag.h |
testclient.o: ox.h oxtag.h |
serv1.o: ox.h oxtag.h serv2.h |
|
serv2.o: ox.h oxtag.h serv2.h |
|
|
|
libgmp.a: |
libgmp.a: |
@if [ ! -f ${GMPSRC}/libgmp.a ]; then \ |
@if [ ! -f ${GMPSRC}/libgmp.a ]; then \ |
(cd ${GMPSRC}; ./configure; make) \ |
${MAKE} configure; \ |
fi |
fi |
@if [ ! -f ./libgmp.a ]; then \ |
cp -f ${GMPSRC}/libgmp.a . |
cp ${GMPSRC}/libgmp.a . ; \ |
|
fi |
|
|
|
libox.a: ${LIBOBJS} libgmp.a |
libox.a: ${LIBOBJS} libgmp.a |
-rm -f $@ |
-rm -f $@ |
Line 61 testclient: testclient.o libox.a |
|
Line 62 testclient: testclient.o libox.a |
|
ox_math: serv1.o serv2.o libox.a |
ox_math: serv1.o serv2.o libox.a |
${CC} ${CFLAGS} -o $@ serv2.o serv1.o ${LIBS} |
${CC} ${CFLAGS} -o $@ serv2.o serv1.o ${LIBS} |
|
|
math2ox: math2ox.o math2.o libox.a |
math2ox: math2ox.o math2.o serv2.o libox.a |
${CC} ${CFLAGS} -o $@ math2ox.o math2.o ${LIBS} |
${CC} ${CFLAGS} -o $@ math2ox.o math2.o serv2.o ${LIBS} |
|
|
sample : sample.o libox.a |
sample : sample.o libox.a |
${CC} ${CFLAGS} -o $@ sample.o ${LIBS} |
${CC} ${CFLAGS} -o $@ sample.o ${LIBS} |
Line 71 math2.c: math2.tm |
|
Line 72 math2.c: math2.tm |
|
-rm -f $@ |
-rm -f $@ |
${MPREP} $? > $@ |
${MPREP} $? > $@ |
|
|
install-openXM-bin: ox_math math2ox |
install-openXM-bin: $(BINARIES) |
install -c -m 755 ox_math math2ox ${OpenXM_HOME}/bin/ |
install -c -m 755 $(BINARIES) ${OpenXM_HOME}/bin/ |
|
|
clean: |
clean: |
-rm -f *.o *~ libox.a libgmp.a math2.c |
-rm -f *.o *~ libox.a libgmp.a math2.c |