# # makefile for svm_light # # based on the original makefile by Thorsten Joachims, 2002 # adapted by Stephan Bloehdorn for compiling the JNI Kernel plugin with C++, 2006-2007. # JDK_INCLUDE_WIN="-Ic:\Programme\Java\jdk1.5.0\include" "-IC:\Programme\Java\jdk1.5.0\include\win32" JDK_INCLUDE_LINUX=-I/usr/lib/j2sdk1.5-sun/include -I/usr/lib/j2sdk1.5-sun/include/linux JDK_LIB_WIN="-LC:\Programme\Java\jdk1.5.0\lib" -ljvm #search for jvm.lib --> jvm.dll must be on path when running the thing! JDK_LIB_LINUX="-L/usr/lib/j2sdk1.5-sun/jre/lib/i386/client" -ljvm #search for libjvm.so --> libjvm.so must be on path when running the thing! #Windows CFLAGS= -O3 -mno-cygwin $(JDK_INCLUDE_WIN) # C-Compiler flags LFLAGS= -O3 -mno-cygwin # linker flags LIBS=-L. -lm $(JDK_LIB_WIN) # used libraries #Linux #CFLAGS= -O3 $(JDK_INCLUDE_LINUX) # C-Compiler flags #LFLAGS= -O3 # linker flags #LIBS=-L. -lm $(JDK_LIB_LINUX) # used libraries #Common CC=gcc # used C-compiler LD=gcc # used linker CPPC=g++ # used C++ compiler CPPLD=g++ # used C++ aware linker all: svm_learn_hideo svm_classify tidy: rm -f *.o rm -f donlp2/*.o rm -f donlp2_c/*.o rm -f pr_loqo/*.o clean: tidy rm -f svm_learn rm -f svm_classify rm -f svm_learn.exe rm -f svm_classify.exe help: info info: @echo @echo "make for SVM-light with JNI kernel extensions" @echo @echo "based on the original makefile by Thorsten Joachims, 2002" @echo "adapted by Stephan Bloehdorn for compiling the JNI Kernel plugin with C++, 2006-2007" @echo @echo @echo "USAGE: make [svm_learn | svm_learn_loqo | svm_learn_hideo | " @echo " svm_classify | all | clean | tidy]" @echo @echo " svm_learn builds the learning module (prefers HIDEO)" @echo " svm_learn_hideo builds the learning module using HIDEO" @echo " svm_learn_loqo builds the learning module using PR_LOQO" @echo " svm_classify builds the classfication module" @echo " all (default) builds svm_learn + svm_classify" @echo " clean removes .o and target files" @echo " tidy removes .o files" @echo svm_learn_hideo_noexe: svm_learn_main.o svm_learn.o svm_common.o svm_hideo.o # change sbl start kernel.o: kernel.c kernel.h svm_common.h $(CPPC) -c $(CFLAGS) kernel.c -o kernel.o # change sbl end # change sbl start #svm_learn_hideo: svm_learn_main.o svm_learn.o svm_common.o svm_hideo.o # $(LD) $(LFLAGS) svm_learn_main.o svm_learn.o svm_common.o svm_hideo.o -o svm_learn $(LIBS) #added kernel.o svm_learn_hideo: svm_learn_main.o svm_learn.o svm_common.o svm_hideo.o kernel.o $(CPPLD) $(LFLAGS) svm_learn_main.o svm_learn.o svm_common.o svm_hideo.o kernel.o -o svm_learn $(LIBS) # change sbl end svm_learn_loqo_noexe: svm_learn_main.o svm_learn.o svm_common.o svm_loqo.o loqo svm_learn_loqo: svm_learn_main.o svm_learn.o svm_common.o svm_loqo.o loqo $(LD) $(LFLAGS) svm_learn_main.o svm_learn.o svm_common.o svm_loqo.o pr_loqo/pr_loqo.o -o svm_learn $(LIBS) svm_hideo.o: svm_hideo.c $(CC) -c $(CFLAGS) svm_hideo.c -o svm_hideo.o svm_loqo.o: svm_loqo.c $(CC) -c $(CFLAGS) svm_loqo.c -o svm_loqo.o svm_common.o: svm_common.c svm_common.h kernel.h $(CC) -c $(CFLAGS) svm_common.c -o svm_common.o svm_learn.o: svm_learn.c svm_common.h $(CC) -c $(CFLAGS) svm_learn.c -o svm_learn.o # change sbl start #svm_learn_main.o: svm_learn_main.c svm_learn.h svm_common.h # $(CC) -c $(CFLAGS) svm_learn_main.c -o svm_learn_main.o svm_learn_main.o: svm_learn_main.c svm_learn.h svm_common.h $(CPPC) -c $(CFLAGS) svm_learn_main.c -o svm_learn_main.o # change sbl end # change sbl start #svm_classify: svm_classify.o svm_common.o # $(LD) $(LFLAGS) svm_classify.o svm_common.o -o svm_classify $(LIBS) #svm_classify.o: svm_classify.c svm_common.h kernel.h # $(CC) -c $(CFLAGS) svm_classify.c -o svm_classify.o #added kernel.o here svm_classify: svm_classify.o svm_common.o kernel.o $(CPPLD) $(LFLAGS) svm_classify.o svm_common.o kernel.o -o svm_classify $(LIBS) svm_classify.o: svm_classify.c svm_common.h #kernel.h $(CPPC) -c $(CFLAGS) svm_classify.c -o svm_classify.o # change sbl end loqo: pr_loqo/pr_loqo.o pr_loqo/pr_loqo.o: pr_loqo/pr_loqo.c $(CC) -c $(CFLAGS) pr_loqo/pr_loqo.c -o pr_loqo/pr_loqo.o