# a makefile

VERSION=5.2
# MLINKDIR = /home/asmirnov/M/AddOns/MathLink/DeveloperKit
# MLINKDIR = /export/pc/mathematica/AddOns/MathLink/DeveloperKit
MLINKDIR = /export/local/Wolfram/Mathematica/5.2/AddOns/MathLink/DeveloperKit
SYS = Linux-x86-64
#SYS = Linux
BIT=64
#BIT=32
CADDSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions
INCDIR = ${CADDSDIR}
LIBDIR = ${CADDSDIR}
MPREP = ${CADDSDIR}/mprep

EXTRA_CFLAGS=
#CADDSDIR2 = /home/asmirnov/qdbm/qdbm-1.8.75
CADDSDIR2 = /users/guest/asmirnov/qdbm/qdbm-1.8.75
INCDIR2 = ${CADDSDIR2}
LIBDIR2 = ${CADDSDIR2}


CFLAGS = -I${INCDIR} -I${INCDIR2} -I/usr/local/include -lqdbm

QLink${BIT} : QLink.o MathSide.o
QLink${BIT} : QLink.o MathSide.o
	cc ${LFLAGS} QLink.o MathSide.o  -L${LIBDIR} ${LIBDIR2}/libqdbm.a -L/usr/local/lib  -lML -lm -lpthread -lrt -o $@

QLink.o : QLink.c
	cc -c ${CFLAGS} QLink.c

MathSide.o : MathSide.c
	cc -c ${CFLAGS} MathSide.c

MathSide.c : MathSide.tm
	${MPREP} -o MathSide.c MathSide.tm
