Mercurial > forge
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 |
rev | line source |
---|---|
6547 | 1 |
2 CC = gcc | |
3 CXX = g++ | |
6555 | 4 CFLAGS = -Wall -Wconversion -O3 -fPIC |
6547 | 5 OCTMEX = mkoctfile --mex |
3901 | 6 |
6555 | 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 | 9 # comment the following line if you use MATLAB on 32-bit computer |
10 MEX_OPTION += -largeArrayDims | |
11 MATMEX = $(MATLABDIR)/bin/mex $(MEX_OPTION) | |
12 MEX_EXT = $(shell $(MATLABDIR)/bin/mexext) | |
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 | 16 |
17 $(PROGS): Makefile | |
2414 | 18 |
6555 | 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 | 21 %.oct: %.cc |
22 mkoctfile $< | |
2968
e49fc39e8ee0
Add "clean" rules to makefiles and discard exit status
goffioul
parents:
2414
diff
changeset
|
23 |
6549 | 24 %.mex: %.cpp |
6547 | 25 $(OCTMEX) $< ## Octave |
6549 | 26 %.$(MEX_EXT): %.cpp |
6547 | 27 $(MATMEX) $< ## Matlab |
28 | |
6555 | 29 svmtrain_mex.mex svmpredict_mex.mex: svmtrain_mex.cpp svm.h |
30 $(CXX) $(CFLAGS) -I /usr/include/octave -c svm.cpp | |
31 $(CC) $(CFLAGS) -I /usr/include/octave -c svm_model_matlab.c | |
6549 | 32 env CC=$(CXX) $(OCTMEX) svmtrain_mex.cpp svm.o svm_model_matlab.o |
6554 | 33 env CC=$(CXX) $(OCTMEX) svmpredict_mex.cpp svm.o svm_model_matlab.o |
6549 | 34 |
6555 | 35 svmtrain_mex.$(MEX_EXT) svmpredict_mex.$(MEX_EXT): svmtrain_mex.cpp svm.h |
36 $(CXX) $(CFLAGS) -I $(MATLABDIR)/extern/include -c svm.cpp | |
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 | 39 $(MATMEX) svmpredict_mex.cpp svm.o svm_model_matlab.o |
6547 | 40 |
41 clean: ; -$(RM) *.o core octave-core *.oct *~ *.mex* |