Algorithm-SVMLight

 view release on metacpan or  search on metacpan

SVMLight.patch  view on Meta::CPAN

diff -urb svm_light/Makefile svm_light-new/Makefile
--- svm_light/Makefile	2008-10-08 14:38:53.000000000 -0500
+++ svm_light-new/Makefile	2008-11-18 14:06:33.000000000 -0600
@@ -16,17 +16,25 @@
 #CFLAGS= $(SFLAGS) -pg -Wall -pedantic      # debugging C-Compiler flags
 #LFLAGS= $(SFLAGS) -pg                      # debugging linker flags
 LIBS=-L. -lm                               # used libraries
+RANLIB=ranlib
 
-all: svm_learn_hideo svm_classify
+OPTIM=hideo
+
+all: svm_learn svm_classify libsvmlight.a libsvmlight.so
+
+libsvmlight.a: svm_learn.o svm_common.o svm_$(OPTIM).o
+	$(AR) r $@ $^
+	$(RANLIB) $@
 
 tidy: 
-	rm -f *.o 
-	rm -f pr_loqo/*.o
+	$(RM) *.o 
+	$(RM) pr_loqo/*.o
 
 clean:	tidy
-	rm -f svm_learn
-	rm -f svm_classify
-	rm -f libsvmlight.so
+	$(RM) svm_learn
+	$(RM) svm_classify
+	$(RM) libsvmlight.so
+	$(RM) libsvmlight.a
 
 help:   info
 
@@ -34,72 +42,63 @@
 	@echo
 	@echo "make for SVM-light               Thorsten Joachims, 1998"
 	@echo
-	@echo "Thanks to Ralf Herbrich for the initial version."
+	@echo "Thanks to Ralf Herbrich for the initial version of the Makefile."
 	@echo 
-	@echo "USAGE: make [svm_learn | svm_learn_loqo | svm_learn_hideo | "
-	@echo "             libsvmlight_hideo | libsvmlight_loqo | "
-	@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 optimizer"
-	@echo "    svm_learn_loqo      builds the learning module using PR_LOQO optimizer"
+	@echo "USAGE: make [svm_learn | svm_classify | libsvmlight.so | libsvmlight.a "
+	@echo "             all | clean | tidy] [OPTIM=loqo]"
+	@echo 
+	@echo "    svm_learn           builds the learning module"
 	@echo "    svm_classify        builds the classfication module"
-	@echo "    libsvmlight_hideo   builds shared object library that can be linked into"
-	@echo "                        other code using HIDEO"
-	@echo "    libsvmlight_loqo    builds shared object library that can be linked into"
-	@echo "                        other code using PR_LOQO"
+	@echo "    libsvmlight.so      builds shared object library that can be linked into"
+	@echo "                        other code"
+	@echo "    libsvmlight.a       builds object library that can be linked into"
+	@echo "                        other code"
 	@echo "    all (default)       builds svm_learn + svm_classify"
 	@echo "    clean               removes .o and target files"
 	@echo "    tidy                removes .o files"
 	@echo



( run in 1.473 second using v1.01-cache-2.11-cpan-0bd6704ced7 )