=================================================================== RCS file: /home/cvs/OpenXM/src/ox_math/Makefile.linux,v retrieving revision 1.1.1.1 retrieving revision 1.7 diff -u -p -r1.1.1.1 -r1.7 --- OpenXM/src/ox_math/Makefile.linux 1999/10/29 08:06:42 1.1.1.1 +++ OpenXM/src/ox_math/Makefile.linux 1999/11/23 02:03:14 1.7 @@ -1,11 +1,10 @@ # -*- mode: Makefile; coding: euc-japan -*- -# $OpenXM$ +# $OpenXM: OpenXM/src/ox_math/Makefile.linux,v 1.6 1999/11/19 20:51:36 ohara Exp $ # PREFIX=/usr/local MLINKDIR = ${PREFIX}/mathematica/AddOns/MathLink/DevelopersKits -#SYS = Solaris SYS = Linux ADDONSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions MPREP = ${ADDONSDIR}/mprep @@ -13,37 +12,41 @@ MPREP = ${ADDONSDIR}/mprep # ADDONSDIR = CC = gcc -#GMPSRC = ../kan96xx/gmp-2.0.2 -GMPSRC = ${PREFIX}/lib +GMPSRC = ${OpenXM_HOME}/src/gmp GMPINC = -I${GMPSRC} -#GMPINC = -I${PREFIX}/include -# CDEFS = -DDEBUG -DSTREAM_PIPE CDEFS = -DDEBUG INCDIR = -I${ADDONSDIR} ${GMPINC} 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} LIBOBJS = ox.o parse.o mysocket.o +BINARIES = bconv testclient ox_math math2ox -all: libox.a bconv testclient ox_math math2ox +all: 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 +configure: + @(cd ${OpenXM_HOME}/src; ${MAKE} configure) + @(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 -serv1.o: ox.h oxtag.h serv2.h -serv2.o: ox.h oxtag.h serv2.h libgmp.a: @if [ ! -f ${GMPSRC}/libgmp.a ]; then \ - (cd ${GMPSRC}; ./configure; make) \ + ${MAKE} configure; \ fi - cp ${GMPSRC}/libgmp.a . + cp -f ${GMPSRC}/libgmp.a . libox.a: ${LIBOBJS} libgmp.a -rm -f $@ @@ -59,8 +62,8 @@ testclient: testclient.o libox.a 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} +math2ox: math2ox.o math2.o serv2.o libox.a + ${CC} ${CFLAGS} -o $@ math2ox.o math2.o serv2.o ${LIBS} sample : sample.o libox.a ${CC} ${CFLAGS} -o $@ sample.o ${LIBS} @@ -69,8 +72,8 @@ math2.c: math2.tm -rm -f $@ ${MPREP} $? > $@ -install-openXM-bin: ox_math math2ox - install -c -m 755 ox_math math2ox ${OpenXM_HOME}/bin/ +install-openXM-bin: $(BINARIES) + install -c -m 755 $(BINARIES) ${OpenXM_HOME}/bin/ clean: -rm -f *.o *~ libox.a libgmp.a math2.c