[BACK]Return to Makefile.linux CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_math

File: [local] / OpenXM / src / ox_math / Makefile.linux (download)

Revision 1.4, Fri Nov 5 08:41:19 1999 UTC (24 years, 6 months ago) by ohara
Branch: MAIN
Changes since 1.3: +2 -3 lines

I add a target "configure" to each makefiles

# -*- mode: Makefile; coding: euc-japan -*-
# $OpenXM: OpenXM/src/ox_math/Makefile.linux,v 1.4 1999/11/05 08:41:19 ohara Exp $ 

#
PREFIX=/usr/local

MLINKDIR = ${PREFIX}/mathematica/AddOns/MathLink/DevelopersKits
#SYS = Solaris
SYS = Linux
ADDONSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions
MPREP = ${ADDONSDIR}/mprep

# ADDONSDIR =

CC = gcc
#GMPSRC = ${OpenXM_HOME}/src/gmp
GMPSRC = ${PREFIX}/lib
#GMPINC = -I${GMPSRC}
GMPINC = -I${PREFIX}/include

CDEFS  = -DDEBUG
INCDIR = -I${ADDONSDIR} ${GMPINC}
LIBDIR = -L${ADDONSDIR} -L.
CFLAGS = -g -O2 ${CDEFS} ${INCDIR} ${LIBDIR}

#SOLLIBS  = -lsocket -lnsl
MATHLIBS = -lML  -lm
LIBS = -lox -lgmp ${MATHLIBS} ${SOLLIBS}

LIBOBJS = ox.o parse.o mysocket.o

all: libox.a bconv testclient ox_math math2ox

configure:
	@(cd ${OpenXM_HOME}/src; ${MAKE} configure)
	@(cd ${OpenXM_HOME}/src/gmp; ./configure; make)

bconv.o:  ox.h oxtag.h parse.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:
	@if [ ! -f ${GMPSRC}/libgmp.a ]; then \
		${MAKE} configure; \
	fi
	cp -f ${GMPSRC}/libgmp.a .

libox.a: ${LIBOBJS} libgmp.a
	-rm -f $@
	ar -rc $@ ${LIBOBJS}
	ranlib $@

bconv: bconv.o libox.a
	${CC} ${CFLAGS} -o $@ bconv.o ${LIBS}

testclient: testclient.o libox.a
	${CC} ${CFLAGS} -o $@ testclient.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 testclient bconv
	install -c -m 755 ox_math math2ox testclient bconv ${OpenXM_HOME}/bin/

clean:
	-rm -f *.o *~ libox.a libgmp.a math2.c
	-rm -f bconv testclient ox_math math2ox
	-rm -f sample