version 1.2, 1999/11/02 06:11:57 |
version 1.8, 2000/01/19 06:18:50 |
|
|
# -*- mode: Makefile; coding: euc-japan -*- |
# -*- mode: Makefile -*- |
# $OpenXM$ |
# $OpenXM: OpenXM/src/ox_math/Makefile.solaris,v 1.7 1999/12/15 05:40:21 ohara Exp $ |
|
|
# |
|
PREFIX=/usr/local |
PREFIX=/usr/local |
|
OpenXM_HOME=../.. |
|
|
MLINKDIR = ${PREFIX}/mathematica/AddOns/MathLink/DevelopersKits |
MLINKDIR = ${PREFIX}/mathematica/AddOns/MathLink/DevelopersKits |
SYS = Solaris |
SYS = Solaris |
#SYS = Linux |
|
ADDONSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions |
ADDONSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions |
MPREP = ${ADDONSDIR}/mprep |
MPREP = ${ADDONSDIR}/mprep |
|
|
# ADDONSDIR = |
|
|
|
CC = gcc |
CC = gcc |
GMPSRC = ../kan96xx/gmp-2.0.2 |
GMPSRC = ${OpenXM_HOME}/src/gmp |
#GMPSRC = ${PREFIX}/lib |
|
GMPINC = -I${GMPSRC} |
|
#GMPINC = -I${PREFIX}/include |
|
|
|
# CDEFS = -DDEBUG -DSTREAM_PIPE |
|
CDEFS = -DDEBUG |
CDEFS = -DDEBUG |
INCDIR = -I${ADDONSDIR} ${GMPINC} |
INCDIR = -I${ADDONSDIR} -I${GMPSRC} -I${OpenXM_HOME}/src/ox_toolkit |
LIBDIR = -L${ADDONSDIR} -L. |
LIBDIR = -L${ADDONSDIR} -L. |
CFLAGS = -O2 ${CDEFS} ${INCDIR} ${LIBDIR} |
CFLAGS = -g -O2 ${CDEFS} ${INCDIR} ${LIBDIR} |
|
|
SOLLIBS = -lsocket -lnsl |
LIBS = -lox -lgmp -lML -lm -lsocket -lnsl |
MATHLIBS = -lML -lm |
|
LIBS = -lox -lgmp ${MATHLIBS} ${SOLLIBS} |
|
|
|
LIBOBJS = ox.o parse.o mysocket.o |
BINARIES = ox_math math2ox |
|
|
all: libox.a bconv testclient ox_math math2ox |
all: libgmp.a libox.a ${BINARIES} |
|
|
bconv.o: ox.h oxtag.h parse.h |
serv1.o serv2.o mlo.o: serv2.h |
parse.o: ox.h oxtag.h parse.h |
|
ox.o: ox.h oxtag.h parse.h mysocket.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 \ |
test -f ${GMPSRC}/libgmp.a || (cd ${GMPSRC}; ./configure; ${MAKE}) |
(cd ${GMPSRC}; ./configure; make) \ |
-rm -f libgmp.a |
fi |
ln -s ${GMPSRC}/libgmp.a . |
cp ${GMPSRC}/libgmp.a . |
|
|
|
libox.a: ${LIBOBJS} libgmp.a |
libox.a: |
-rm -f $@ |
-rm -f libox.a |
ar -rc $@ ${LIBOBJS} |
(cd ${OpenXM_HOME}/src/ox_toolkit; ${MAKE} libox.a) |
ranlib $@ |
ln -s ${OpenXM_HOME}/src/ox_toolkit/libox.a . |
|
|
bconv: bconv.o libox.a |
ox_math: serv1.o serv2.o mlo.o libox.a libgmp.a |
${CC} ${CFLAGS} -o $@ bconv.o ${LIBS} |
${CC} ${CFLAGS} -o $@ serv2.o serv1.o mlo.o ${LIBS} |
|
|
testclient: testclient.o libox.a |
math2ox: math2ox.o math2.o mlo.o serv2.o libox.a libgmp.a |
${CC} ${CFLAGS} -o $@ testclient.o ${LIBS} |
${CC} ${CFLAGS} -o $@ math2ox.o math2.o serv2.o mlo.o ${LIBS} |
|
|
ox_math: serv1.o serv2.o libox.a |
|
${CC} ${CFLAGS} -o $@ serv2.o serv1.o ${LIBS} |
|
|
|
math2ox: math2ox.o math2.o libox.a |
|
${CC} ${CFLAGS} -o $@ math2ox.o math2.o ${LIBS} |
|
|
|
sample : sample.o libox.a |
|
${CC} ${CFLAGS} -o $@ sample.o ${LIBS} |
|
|
|
math2.c: math2.tm |
math2.c: math2.tm |
-rm -f $@ |
-rm -f $@ |
${MPREP} $? > $@ |
${MPREP} $? > $@ |
|
|
install-openXM-bin: ox_math math2ox |
install-bin: ${BINARIES} |
install -c -m 755 ox_math math2ox ${OpenXM_HOME}/bin/ |
install -c -m 755 ${BINARIES} ${OpenXM_HOME}/bin/ |
|
|
|
install: ${BINARIES} |
|
-for i in ${BINARIES}; do \ |
|
ln -s -f ../src/ox_math/$$i ${OpenXM_HOME}/bin ; \ |
|
done |
|
|
clean: |
clean: |
-rm -f *.o *~ libox.a libgmp.a math2.c |
-rm -f *.o *~ libox.a libgmp.a math2.c ox_math math2ox |
-rm -f bconv testclient ox_math math2ox |
|
-rm -f sample |
|