Ticket #46052: patch-src_Makefile.diff

File patch-src_Makefile.diff, 1.1 KB (added by Schamschula (Marius Schamschula), 10 years ago)
  • src/Makefile

    old new  
    4141
    4242
    4343
    44 CC      = gcc
    45 CXX     = g++
     44#CC     = gcc
     45#CXX    = g++
    4646CFLAGS  = -fopenmp -Wall -Wextra -Wconversion -O2 -fPIC
    4747OCTMEX  = mkoctfile$(OCTAVE_VERSION) --mex
    4848RM      = rm
    4949
    5050MEX_OPTION  += -lgomp CC\#$(CXX) CXX\#$(CXX) CFLAGS\#"$(CFLAGS)" CXXFLAGS\#"$(CFLAGS)"
    51 MATMEX      = $(MATLABDIR)/bin/mex $(MEX_OPTION)
     51MKOCTFILE = mkoctfile$(OCTAVE_VERSION)
     52OCTMEX  = $(MKOCTFILE) --mex
     53
     54FLIBS = ${shell $(MKOCTFILE) -p FLIBS}
     55INCFLAGS = ${shell $(MKOCTFILE) -p INCFLAGS}
     56INC_CSTDLIB = -include cstdlib
    5257
    5358PROGS = covm_mex.mex sumskipnan_mex.mex #
    5459
     
    8893#       Octave, MATLAB on Linux
    8994#########################################################
    9095%.oct: %.cc
    91         mkoctfile$(OCTAVE_VERSION) "$<"
     96        $(MKOCTFILE) $<
    9297
    9398%.mex: %.cpp
    94         $(OCTMEX) "$<"  -lgomp -llapack -lblas     ## Octave
     99        INCFLAGS="$(INCFLAGS) $(INC_CSTDLIB)" $(OCTMEX) $< $(FLIBS) -lgomp     ## Octave
    95100%.$(MEX_EXT): %.cpp
    96101        $(MATMEX) "$<"  -lgomp -llapack -lblas     ## Matlab
    97102