annotate extra/NaN/src/Makefile @ 6556:d736430aaa42 octave-forge

PSVM improved/fixed; compilation of libsvm for matlab improved; silence libsvm
author schloegl
date Mon, 11 Jan 2010 10:17:20 +0000
parents 9bd1a8fcffd7
children 1170c9d6d1c4
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)
schloegl
parents: 5579
diff changeset
12 MEX_EXT = $(shell $(MATLABDIR)/bin/mexext)
schloegl
parents: 5579
diff changeset
13
6552
37ebea0d2428 build for octave must be the default, matlab build is optional
schloegl
parents: 6549
diff changeset
14 PROGS = $(patsubst %_mex.cpp,%_mex.mex,$(wildcard *.cpp))
37ebea0d2428 build for octave must be the default, matlab build is optional
schloegl
parents: 6549
diff changeset
15 all: $(PROGS) matlab
3901
0c83673d2cbe Fix broken Makefile
adb014
parents: 2968
diff changeset
16
0c83673d2cbe Fix broken Makefile
adb014
parents: 2968
diff changeset
17 $(PROGS): Makefile
2414
19251cd2753b Latest package manager mega patch, but not the last
adb014
parents:
diff changeset
18
6555
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
19 matlab: $(patsubst %_mex.cpp,%_mex.$(MEX_EXT),$(wildcard *.cpp))
6552
37ebea0d2428 build for octave must be the default, matlab build is optional
schloegl
parents: 6549
diff changeset
20
2414
19251cd2753b Latest package manager mega patch, but not the last
adb014
parents:
diff changeset
21 %.oct: %.cc
19251cd2753b Latest package manager mega patch, but not the last
adb014
parents:
diff changeset
22 mkoctfile $<
2968
e49fc39e8ee0 Add "clean" rules to makefiles and discard exit status
goffioul
parents: 2414
diff changeset
23
6549
41e9854fe26d use *.cpp instead of *.c
schloegl
parents: 6547
diff changeset
24 %.mex: %.cpp
6547
schloegl
parents: 5579
diff changeset
25 $(OCTMEX) $< ## Octave
6549
41e9854fe26d use *.cpp instead of *.c
schloegl
parents: 6547
diff changeset
26 %.$(MEX_EXT): %.cpp
6547
schloegl
parents: 5579
diff changeset
27 $(MATMEX) $< ## Matlab
schloegl
parents: 5579
diff changeset
28
6555
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
29 svmtrain_mex.mex svmpredict_mex.mex: svmtrain_mex.cpp svm.h
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
30 $(CXX) $(CFLAGS) -I /usr/include/octave -c svm.cpp
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
31 $(CC) $(CFLAGS) -I /usr/include/octave -c svm_model_matlab.c
6549
41e9854fe26d use *.cpp instead of *.c
schloegl
parents: 6547
diff changeset
32 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
33 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
34
6555
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
35 svmtrain_mex.$(MEX_EXT) svmpredict_mex.$(MEX_EXT): svmtrain_mex.cpp svm.h
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
36 $(CXX) $(CFLAGS) -I $(MATLABDIR)/extern/include -c svm.cpp
9bd1a8fcffd7 libSVM: fix for Matlab
schloegl
parents: 6554
diff changeset
37 $(CC) $(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
38 $(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
39 $(MATMEX) svmpredict_mex.cpp svm.o svm_model_matlab.o
6547
schloegl
parents: 5579
diff changeset
40
schloegl
parents: 5579
diff changeset
41 clean: ; -$(RM) *.o core octave-core *.oct *~ *.mex*