Ticket #46035: patch-src_Makefile.diff
File patch-src_Makefile.diff, 2.9 KB (added by Schamschula (Marius Schamschula), 10 years ago) |
---|
-
src/Makefile
old new 31 31 # Instead of building "mex shortpath.c" and "mex uigetpath.c", I used empty m-functions within argout=argin; 32 32 #################################################### 33 33 34 CC = gcc35 CXX = g++34 #CC = gcc 35 #CXX = g++ 36 36 CFLAGS = -fopenmp -Wall -Wextra -Wconversion -O2 -fPIC 37 OCTMEX = mkoctfile$(OCTAVE_VERSION) --mex 37 #OCTMEX = mkoctfile$(OCTAVE_VERSION) --mex 38 MKOCTFILE = mkoctfile$(OCTAVE_VERSION) 39 OCTMEX = $(MKOCTFILE) --mex 38 40 RM = rm 39 41 40 42 MEX_OPTION += -lgomp CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS) " CXXFLAGS\#"$(CFLAGS) " 41 43 MATMEX = $(MATLABDIR)/bin/mex $(MEX_OPTION) 42 44 45 FLIBS = ${shell $(MKOCTFILE) -p FLIBS} 46 INCFLAGS = ${shell $(MKOCTFILE) -p INCFLAGS} 47 INC_CSTDLIB = -include cstdlib 48 43 49 PROGS = histo_mex.mex covm_mex.mex kth_element.mex sumskipnan_mex.mex str2array.mex train.mex svmtrain_mex.mex svmpredict_mex.mex xptopen.mex 44 50 45 51 ### per default only the mex-files for octave are built … … 78 84 # Octave, MATLAB on Linux 79 85 ######################################################### 80 86 %.oct: %.cc 81 mkoctfile$(OCTAVE_VERSION) $<87 INCFLAGS="$(INCFLAGS) $(INC_CSTDLIB)" $(MKOCTFILE) $< 82 88 83 89 %.mex: %.cpp 84 $(OCTMEX) $< -lgomp ## Octave 85 %.$(MEX_EXT): %.cpp 86 $(MATMEX) $< -lgomp ## Matlab 90 INCFLAGS="$(INCFLAGS) $(INC_CSTDLIB)" $(OCTMEX) $< $(FLIBS) -lgomp 87 91 88 92 svmtrain_mex.mex svmpredict_mex.mex: svmtrain_mex.cpp svm.h svm.cpp svm_model_matlab.c svmpredict_mex.cpp 89 93 $(CXX) $(CFLAGS) -c svm.cpp 90 #$(CC) $(CFLAGS) $(INCOCTAVE) -c svm_model_matlab.c91 env CC=$(CXX) $(OCTMEX) svmtrain_mex.cpp svm.o svm_model_matlab.c92 env CC=$(CXX) $(OCTMEX) svmpredict_mex.cpp svm.o svm_model_matlab.c94 $(CC) $(CFLAGS) $(INCFLAGS) -c svm_model_matlab.c 95 INCFLAGS="$(INCFLAGS) $(INC_CSTDLIB)" $(OCTMEX) svmtrain_mex.cpp svm.o svm_model_matlab.o 96 INCFLAGS="$(INCFLAGS) $(INC_CSTDLIB)" $(OCTMEX) svmpredict_mex.cpp svm.o svm_model_matlab.o 93 97 94 98 svmtrain_mex.$(MEX_EXT) svmpredict_mex.$(MEX_EXT): svmtrain_mex.cpp svm.h svm.cpp svm_model_matlab.c svmpredict_mex.cpp 95 99 $(CXX) $(CFLAGS) -I $(MATLABDIR)/extern/include -c svm.cpp … … 98 102 $(MATMEX) svmpredict_mex.cpp svm.o svm_model_matlab.o 99 103 100 104 train.$(MEX_EXT) predict.$(MEX_EXT): train.c linear.h tron.o linear.o linear_model_matlab.c 101 $(CC) $(CFLAGS) -I $(MATLABDIR)/extern/include -c linear_model_matlab.c105 # $(CC) $(CFLAGS) -I $(MATLABDIR)/extern/include -c linear_model_matlab.c 102 106 $(MATMEX) -lblas train.c tron.o linear.o linear_model_matlab.o 103 107 #$(MATMEX) -lblas predict.c tron.o linear.o linear_model_matlab.o 104 108 105 109 train.mex predict.mex: train.c linear.h tron.o linear.o linear_model_matlab.c 106 env CC=$(CXX)$(OCTMEX) -lblas train.c tron.o linear.o linear_model_matlab.c110 $(OCTMEX) -lblas train.c tron.o linear.o linear_model_matlab.c 107 111 #env CC=$(CXX) $(OCTMEX) -lblas predict.c tron.o linear.o linear_model_matlab.o 108 112 109 113 linear.o: linear.cpp linear.h