Annotation of OpenXM/src/ox_math/Makefile.linux, Revision 1.1.1.1
1.1 ohara 1: # -*- mode: Makefile; coding: euc-japan -*-
2: # $OpenXM$
3:
4: #
5: PREFIX=/usr/local
6:
7: MLINKDIR = ${PREFIX}/mathematica/AddOns/MathLink/DevelopersKits
8: #SYS = Solaris
9: SYS = Linux
10: ADDONSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions
11: MPREP = ${ADDONSDIR}/mprep
12:
13: # ADDONSDIR =
14:
15: CC = gcc
16: #GMPSRC = ../kan96xx/gmp-2.0.2
17: GMPSRC = ${PREFIX}/lib
18: GMPINC = -I${GMPSRC}
19: #GMPINC = -I${PREFIX}/include
20:
21: # CDEFS = -DDEBUG -DSTREAM_PIPE
22: CDEFS = -DDEBUG
23: INCDIR = -I${ADDONSDIR} ${GMPINC}
24: LIBDIR = -L${ADDONSDIR} -L.
25: CFLAGS = -O2 ${CDEFS} ${INCDIR} ${LIBDIR}
26:
27: #SOLLIBS = -lsocket -lnsl
28: MATHLIBS = -lML -lm
29: LIBS = -lox -lgmp ${MATHLIBS} ${SOLLIBS}
30:
31: LIBOBJS = ox.o parse.o mysocket.o
32:
33: all: libox.a bconv testclient ox_math math2ox
34:
35: bconv.o: ox.h oxtag.h parse.h
36: parse.o: ox.h oxtag.h parse.h
37: ox.o: ox.h oxtag.h mysocket.h
38: testclient.o: ox.h oxtag.h
39: serv1.o: ox.h oxtag.h serv2.h
40: serv2.o: ox.h oxtag.h serv2.h
41:
42: libgmp.a:
43: @if [ ! -f ${GMPSRC}/libgmp.a ]; then \
44: (cd ${GMPSRC}; ./configure; make) \
45: fi
46: cp ${GMPSRC}/libgmp.a .
47:
48: libox.a: ${LIBOBJS} libgmp.a
49: -rm -f $@
50: ar -rc $@ ${LIBOBJS}
51: ranlib $@
52:
53: bconv: bconv.o libox.a
54: ${CC} ${CFLAGS} -o $@ bconv.o ${LIBS}
55:
56: testclient: testclient.o libox.a
57: ${CC} ${CFLAGS} -o $@ testclient.o ${LIBS}
58:
59: ox_math: serv1.o serv2.o libox.a
60: ${CC} ${CFLAGS} -o $@ serv2.o serv1.o ${LIBS}
61:
62: math2ox: math2ox.o math2.o libox.a
63: ${CC} ${CFLAGS} -o $@ math2ox.o math2.o ${LIBS}
64:
65: sample : sample.o libox.a
66: ${CC} ${CFLAGS} -o $@ sample.o ${LIBS}
67:
68: math2.c: math2.tm
69: -rm -f $@
70: ${MPREP} $? > $@
71:
72: install-openXM-bin: ox_math math2ox
73: install -c -m 755 ox_math math2ox ${OpenXM_HOME}/bin/
74:
75: clean:
76: -rm -f *.o *~ libox.a libgmp.a math2.c
77: -rm -f bconv testclient ox_math math2ox
78: -rm -f sample
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>