annotate extra/NaN/src/Makefile @ 6562:57fddcbc3d15 octave-forge

weighted libLinear supported
author schloegl
date Mon, 11 Jan 2010 20:47:51 +0000
parents 02114fdad02a
children 4b3ccb63b4cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6547
schloegl
parents: 5579
diff changeset
1
schloegl
parents: 5579
diff changeset
2 CC = gcc
schloegl
parents: 5579
diff changeset
3 CXX = g++
6555
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
4 CFLAGS = -Wall -Wconversion -O3 -fPIC
6547
schloegl
parents: 5579
diff changeset
5 OCTMEX = mkoctfile --mex
3901
0c83673d2cbe Fix broken Makefile
adb014
parents: 2968
diff changeset
6
6555
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
7 MATLABDIR = /usr/local/matlab
6556
d736430aaa42 PSVM improved/fixed; compilation of libsvm for matlab improved; silence libsvm
schloegl
parents: 6555
diff changeset
8 MEX_OPTION = CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS)" CXXFLAGS\#"$(CFLAGS)"
6547
schloegl
parents: 5579
diff changeset
9 # comment the following line if you use MATLAB on 32-bit computer
schloegl
parents: 5579
diff changeset
10 MEX_OPTION += -largeArrayDims
schloegl
parents: 5579
diff changeset
11 MATMEX = $(MATLABDIR)/bin/mex $(MEX_OPTION)
6560
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
12
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
13
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
14
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
15 PROGS = histo_mex.mex covm_mex.mex sumskipnan_mex.mex train.mex svmtrain_mex.mex svmpredict_mex.mex
6547
schloegl
parents: 5579
diff changeset
16
6561
02114fdad02a fix for M*
schloegl
parents: 6560
diff changeset
17 octave: $(PROGS)
6560
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
18
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
19 MEX_EXT = $(shell $(MATLABDIR)/bin/mexext)
6561
02114fdad02a fix for M*
schloegl
parents: 6560
diff changeset
20 matlab: $(patsubst $(PROGS), %_mex.$(MEX_EXT), $(wildcard *.mex))
3901
0c83673d2cbe Fix broken Makefile
adb014
parents: 2968
diff changeset
21
0c83673d2cbe Fix broken Makefile
adb014
parents: 2968
diff changeset
22 $(PROGS): Makefile
2414
19251cd2753b Latest package manager mega patch, but not the last
adb014
parents:
diff changeset
23
19251cd2753b Latest package manager mega patch, but not the last
adb014
parents:
diff changeset
24 %.oct: %.cc
19251cd2753b Latest package manager mega patch, but not the last
adb014
parents:
diff changeset
25 mkoctfile $<
2968
e49fc39e8ee0 Add "clean" rules to makefiles and discard exit status
goffioul
parents: 2414
diff changeset
26
6549
41e9854fe26d use *.cpp instead of *.c
schloegl
parents: 6547
diff changeset
27 %.mex: %.cpp
6547
schloegl
parents: 5579
diff changeset
28 $(OCTMEX) $< ## Octave
6549
41e9854fe26d use *.cpp instead of *.c
schloegl
parents: 6547
diff changeset
29 %.$(MEX_EXT): %.cpp
6547
schloegl
parents: 5579
diff changeset
30 $(MATMEX) $< ## Matlab
schloegl
parents: 5579
diff changeset
31
6562
57fddcbc3d15 weighted libLinear supported
schloegl
parents: 6561
diff changeset
32 svmtrain_mex.mex svmpredict_mex.mex: svmtrain_mex.cpp svm.h svm.cpp svm_model_matlab.c
6555
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
33 $(CXX) $(CFLAGS) -I /usr/include/octave -c svm.cpp
6562
57fddcbc3d15 weighted libLinear supported
schloegl
parents: 6561
diff changeset
34 $(CXX) $(CFLAGS) -I /usr/include/octave -c svm_model_matlab.c
6549
41e9854fe26d use *.cpp instead of *.c
schloegl
parents: 6547
diff changeset
35 env CC=$(CXX) $(OCTMEX) svmtrain_mex.cpp svm.o svm_model_matlab.o
6554
7fa067e9944d add support for non-linear SVM and 1-1 scheme
schloegl
parents: 6552
diff changeset
36 env CC=$(CXX) $(OCTMEX) svmpredict_mex.cpp svm.o svm_model_matlab.o
6549
41e9854fe26d use *.cpp instead of *.c
schloegl
parents: 6547
diff changeset
37
6562
57fddcbc3d15 weighted libLinear supported
schloegl
parents: 6561
diff changeset
38 svmtrain_mex.$(MEX_EXT) svmpredict_mex.$(MEX_EXT): svmtrain_mex.cpp svm.h svm.cpp svm_model_matlab.c
6555
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
39 $(CXX) $(CFLAGS) -I $(MATLABDIR)/extern/include -c svm.cpp
6562
57fddcbc3d15 weighted libLinear supported
schloegl
parents: 6561
diff changeset
40 $(CXX) $(CFLAGS) -I $(MATLABDIR)/extern/include -c svm_model_matlab.c
6552
37ebea0d2428 build for octave must be the default, matlab build is optional
schloegl
parents: 6549
diff changeset
41 $(MATMEX) svmtrain_mex.cpp svm.o svm_model_matlab.o
6554
7fa067e9944d add support for non-linear SVM and 1-1 scheme
schloegl
parents: 6552
diff changeset
42 $(MATMEX) svmpredict_mex.cpp svm.o svm_model_matlab.o
6547
schloegl
parents: 5579
diff changeset
43
6560
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
44 train.$(MEX_EXT) predict.$(MEX_EXT): train.c linear.h tron.o linear.o linear_model_matlab.c
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
45 $(CXX) $(CFLAGS) -I $(MATLABDIR)/extern/include -c linear_model_matlab.c
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
46 $(MATMEX) $(MEX_OPTION) -lblas train.c tron.o linear.o linear_model_matlab.o
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
47 #$(MATMEX) $(MEX_OPTION) -lblas predict.c tron.o linear.o linear_model_matlab.o
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
48
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
49 train.mex predict.mex: train.c linear.h tron.o linear.o linear_model_matlab.c
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
50 $(CXX) $(CFLAGS) -I /usr/include/octave -c linear_model_matlab.c
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
51 env CC=$(CXX) $(OCTMEX) -lblas train.c tron.o linear.o linear_model_matlab.o
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
52 #env CC=$(CXX) $(OCTMEX) -lblas predict.c tron.o linear.o linear_model_matlab.o
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
53
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
54 linear.o: linear.cpp linear.h
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
55 $(CXX) $(CFLAGS) -c linear.cpp
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
56
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
57 tron.o: tron.cpp tron.h
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
58 $(CXX) $(CFLAGS) -c tron.cpp
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
59
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
60
1170c9d6d1c4 method LibLinear is included
schloegl
parents: 6556
diff changeset
61
6547
schloegl
parents: 5579
diff changeset
62 clean: ; -$(RM) *.o core octave-core *.oct *~ *.mex*