From e84d3d09690119edc80511229df027635a36fe48 Mon Sep 17 00:00:00 2001 From: Carlos Ungil Date: Mon, 1 Oct 2007 02:20:56 +0200 Subject: [PATCH] alternative Makefile and ifdef directive added for compilation on MacOSX --- lib/Makefile.macosx | 39 +++++++++++++++++++++++++++++++++++++++ lib/cffi-glue.c | 5 +++++ 2 files changed, 44 insertions(+) create mode 100644 lib/Makefile.macosx diff --git a/lib/Makefile.macosx b/lib/Makefile.macosx new file mode 100644 index 0000000..e56e8b7 --- /dev/null +++ b/lib/Makefile.macosx @@ -0,0 +1,39 @@ +## -*- mode: Makefile -*- + +LISPSTAT-SO = liblispstat.dylib + +CDISTOBJS = betabase.o bivnor.o cdists.o gamln.o gammabase.o nor.o ppnd.o \ + studentbase.o + +CLINALGOBJS = cholesky.o linalgdata.o ludecomp.o complex.o svdecomp.o \ + qrdecomp.o cfft.o clinalg.o rcondest.o kernel.o lowess.o splines.o \ + makerotation.o eigen.o + +CBAYESOBJS = cbayes.o functions.o derivatives.o minimize.o + +CGLUE = cffi-glue.o + +## CFLAGS = -g -DINTPTR -fPIC -Wall +CFLAGS = -g -Wall + +cffi : $(LISPSTAT-SO) + +sbcl : clib.a + +kcl: clib.a + +excl: clib.a exclglue.o + +clib.a: ${CDISTOBJS} ${CLINALGOBJS} ${CBAYESOBJS} $(CGLUE) + ar rcv clib.a ${CDISTOBJS} ${CLINALGOBJS} ${CBAYESOBJS} $(CGLUE) + ranlib clib.a + +$(LISPSTAT-SO) :${CDISTOBJS} ${CLINALGOBJS} ${CBAYESOBJS} $(CGLUE) + gcc -dynamiclib -single_module -undefined dynamic_lookup -o $(LISPSTAT-SO) ${CDISTOBJS} ${CLINALGOBJS} ${CBAYESOBJS} $(CGLUE) + +clean: + rm -f ${CDISTOBJS} ${CLINALGOBJS} ${CBAYESOBJS} $(CGLUE) *~ + +cleanall: + make clean + rm -f clib.a exclglue.o diff --git a/lib/cffi-glue.c b/lib/cffi-glue.c index 19cff4c..c4232dd 100644 --- a/lib/cffi-glue.c +++ b/lib/cffi-glue.c @@ -1,4 +1,9 @@ +#ifdef __APPLE__ +#include +#else #include +#endif + #include #include "linalg.h" -- 2.11.4.GIT