# Makefile for CLISP module set libsvm

srcdir = @srcdir@
CC = @CC@
SVMCPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
CLISP = @CLISP@ -norc -q
CLISP_LINKKIT = @CLISP_LINKKIT@

LN = @LN@
LN_S = @LN_S@

MAKE = make

SHELL = /bin/sh

GENERATED = libsvm.fas libsvm.o preload.lisp
DISTRIBFILES = link.sh Makefile $(GENERATED) \
	$(srcdir)/libsvm.lisp $(srcdir)/README
distribdir =

# default target: make the module
clisp-module : $(GENERATED)

libsvm.c libsvm.fas : $(srcdir)/libsvm.lisp
	$(CLISP) -c $(srcdir)/libsvm.lisp -o ./

libsvm.o : libsvm.c config.h
	$(CC) $(CPPFLAGS) $(SVMCPPFLAGS) $(CFLAGS) -I$(CLISP_LINKKIT) -c libsvm.c

preload.lisp : $(srcdir)/preload.lisp
	$(LN_S) $(srcdir)/preload.lisp .

# Make a module distribution into $(distribdir)
clisp-module-distrib : clisp-module force
	$(LN) $(DISTRIBFILES) $(distribdir)

clean : force
	rm -f core *.o *.a *.fas *.lib

distclean : clean

force :

