=================================================================== RCS file: /home/cvs/OpenXM/src/ox_math/Makefile.linux,v retrieving revision 1.1.1.1 retrieving revision 1.11 diff -u -p -r1.1.1.1 -r1.11 --- OpenXM/src/ox_math/Makefile.linux 1999/10/29 08:06:42 1.1.1.1 +++ OpenXM/src/ox_math/Makefile.linux 2000/01/17 20:28:52 1.11 @@ -1,78 +1,57 @@ -# -*- mode: Makefile; coding: euc-japan -*- -# $OpenXM$ +# -*- mode: Makefile -*- +# $OpenXM: OpenXM/src/ox_math/Makefile.linux,v 1.10 1999/12/15 05:40:21 ohara Exp $ -# PREFIX=/usr/local MLINKDIR = ${PREFIX}/mathematica/AddOns/MathLink/DevelopersKits -#SYS = Solaris SYS = Linux ADDONSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions MPREP = ${ADDONSDIR}/mprep -# ADDONSDIR = +GMPSRC = ${OpenXM_HOME}/src/gmp -CC = gcc -#GMPSRC = ../kan96xx/gmp-2.0.2 -GMPSRC = ${PREFIX}/lib -GMPINC = -I${GMPSRC} -#GMPINC = -I${PREFIX}/include - -# CDEFS = -DDEBUG -DSTREAM_PIPE CDEFS = -DDEBUG -INCDIR = -I${ADDONSDIR} ${GMPINC} +INCDIR = -I${ADDONSDIR} -I${GMPSRC} -I${OpenXM_HOME}/src/ox_toolkit LIBDIR = -L${ADDONSDIR} -L. -CFLAGS = -O2 ${CDEFS} ${INCDIR} ${LIBDIR} +CFLAGS = -g -O2 ${CDEFS} ${INCDIR} ${LIBDIR} -#SOLLIBS = -lsocket -lnsl -MATHLIBS = -lML -lm -LIBS = -lox -lgmp ${MATHLIBS} ${SOLLIBS} +LIBS = -lox -lgmp -lML -lm -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 -parse.o: ox.h oxtag.h parse.h -ox.o: ox.h oxtag.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 +serv1.o serv2.o mlo.o: serv2.h libgmp.a: - @if [ ! -f ${GMPSRC}/libgmp.a ]; then \ - (cd ${GMPSRC}; ./configure; make) \ - fi - cp ${GMPSRC}/libgmp.a . + test -f ${GMPSRC}/libgmp.a || (cd ${GMPSRC}; ./configure; ${MAKE}) + ln -s -f ${GMPSRC}/libgmp.a . -libox.a: ${LIBOBJS} libgmp.a - -rm -f $@ - ar -rc $@ ${LIBOBJS} - ranlib $@ +libox.a: + -rm -f libox.a + (cd ${OpenXM_HOME}/src/ox_toolkit; ${MAKE} libox.a) + ln -s ${OpenXM_HOME}/src/ox_toolkit/libox.a . -bconv: bconv.o libox.a - ${CC} ${CFLAGS} -o $@ bconv.o ${LIBS} +ox_math: serv1.o serv2.o mlo.o libox.a libgmp.a + ${CC} ${CFLAGS} -o $@ serv2.o serv1.o mlo.o ${LIBS} -testclient: testclient.o libox.a - ${CC} ${CFLAGS} -o $@ testclient.o ${LIBS} +math2ox: math2ox.o math2.o mlo.o serv2.o libox.a libgmp.a + ${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 -rm -f $@ ${MPREP} $? > $@ -install-openXM-bin: ox_math math2ox - install -c -m 755 ox_math math2ox ${OpenXM_HOME}/bin/ +install: ${BINARIES} + install -c -m 755 ${BINARIES} ${OpenXM_HOME}/bin/ +install-for-debug: ${BINARIES} + -for i in ${BINARIES}; do \ + ln -s -f ${OpenXM_HOME}/src/ox_math/$$i ${OpenXM_HOME}/bin ; \ + done + +clean-for-debug: + (cd ${OpenXM_HOME}/bin; rm -f ${BINARIES}) + clean: - -rm -f *.o *~ libox.a libgmp.a math2.c - -rm -f bconv testclient ox_math math2ox - -rm -f sample + -rm -f *.o *~ libox.a libgmp.a math2.c ox_math math2ox