Annotation of OpenXM/src/ox_math/Makefile.FreeBSD, Revision 1.3
1.1 ohara 1: # -*- mode: Makefile; coding: euc-japan -*-
1.3 ! ohara 2: # $OpenXM: OpenXM/src/ox_math/Makefile.FreeBSD,v 1.2 1999/11/02 06:11:57 ohara Exp $
1.1 ohara 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
1.3 ! ohara 16: #GMPSRC = ${OpenXM_HOME}/src/gmp
1.1 ohara 17: GMPSRC = /usr/lib
18: #GMPINC = -I${GMPSRC}
19:
20: CDEFS = -DDEBUG
21: INCDIR = -I${ADDONSDIR} ${GMPINC}
22: LIBDIR = -L${ADDONSDIR} -L.
1.3 ! ohara 23: CFLAGS = -g -O2 ${CDEFS} ${INCDIR} ${LIBDIR}
1.1 ohara 24:
25: #SOLLIBS = -lsocket -lnsl
26: #MATHLIBS = -lML -lm
27: LIBS = -lox -lgmp ${MATHLIBS} ${SOLLIBS}
28:
29: LIBOBJS = ox.o parse.o mysocket.o
1.3 ! ohara 30: BINARIES = bconv testclient
1.1 ohara 31:
1.3 ! ohara 32: all: libox.a $(BINARIES)
1.1 ohara 33:
1.3 ! ohara 34: configure:
! 35: @(cd ${OpenXM_HOME}/src; ${MAKE} configure)
! 36: @(cd ${OpenXM_HOME}/src/gmp; ./configure; make)
! 37:
! 38: bconv.o: ox.h oxtag.h parse.h
! 39: math2ox.o: ox.h oxtag.h parse.h
! 40: mysocket.o: mysocket.h
! 41: ox.o: ox.h oxtag.h parse.h mysocket.h
! 42: parse.o: ox.h oxtag.h parse.h
! 43: serv1.o: ox.h oxtag.h serv2.h
! 44: serv2.o: ox.h oxtag.h parse.h serv2.h
1.1 ohara 45: testclient.o: ox.h oxtag.h
46:
47: libgmp.a:
48: @if [ ! -f ${GMPSRC}/libgmp.a ]; then \
1.3 ! ohara 49: ${MAKE} configure; \
1.2 ohara 50: fi
1.3 ! ohara 51: cp -f ${GMPSRC}/libgmp.a .
1.1 ohara 52:
53: libox.a: ${LIBOBJS} libgmp.a
54: -rm -f $@
55: ar -rc $@ ${LIBOBJS}
56: ranlib $@
57:
58: bconv: bconv.o libox.a
59: ${CC} ${CFLAGS} -o $@ bconv.o ${LIBS}
60:
61: testclient: testclient.o libox.a
62: ${CC} ${CFLAGS} -o $@ testclient.o ${LIBS}
63:
64: ox_math: serv1.o serv2.o libox.a
65: ${CC} ${CFLAGS} -o $@ serv2.o serv1.o ${LIBS}
66:
67: math2ox: math2ox.o math2.o libox.a
68: ${CC} ${CFLAGS} -o $@ math2ox.o math2.o ${LIBS}
69:
70: sample : sample.o libox.a
71: ${CC} ${CFLAGS} -o $@ sample.o ${LIBS}
72:
73: math2.c: math2.tm
74: -rm -f $@
75: ${MPREP} $? > $@
76:
1.3 ! ohara 77: install-openXM-bin: $(BINARIES)
! 78: install -c -m 755 $(BINARIES) ${OpenXM_HOME}/bin/
1.1 ohara 79:
80: clean:
81: -rm -f *.o *~ libox.a libgmp.a math2.c
82: -rm -f bconv testclient ox_math math2ox
83: -rm -f sample
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>