diff --git a/src/Makefile b/src/Makefile index bb020df..feae4bc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -156,8 +156,10 @@ mex oct: CUCCOPT+=$(DLLFLAG) -DMCX_CONTAINER -DMATLAB_MEX_FILE mex oct: CCOPT+=$(DLLFLAG) -DMCX_CONTAINER -DMATLAB_MEX_FILE mex: LINKOPT+=mcxlabcl.cpp -outdir $(OUTPUT_DIR) $(INCLUDEDIRS) +OCT_LDFLAGS := $(shell mkoctfile -p LDFLAGS) + oct: BINARY=mcxcl.mex -oct: AR=XTRA_CFLAGS=' ' XTRA_CXXFLAGS=' ' CXXFLAGS='-std=c++11 $(CPPOPT) $(MEXCCOPT) $(USERCCOPT)' LFLAGS='$(LDFLAGS) -g -L$(LIBOPENCLDIR) $(LIBOPENCL)' DL_LDFLAGS='-shared $(LDFLAGS) -g -L$(LIBOPENCLDIR) $(LIBOPENCL) $(MEXLINKOPT)' mkoctfile -v +oct: AR=XTRA_CFLAGS=' ' XTRA_CXXFLAGS=' ' CXXFLAGS='-std=c++11 $(CPPOPT) $(MEXCCOPT) $(USERCCOPT)' LDFLAGS='$(OCT_LDFLAGS) -g -L$(LIBOPENCLDIR) $(LIBOPENCL)' DL_LDFLAGS='-shared $(LDFLAGS) -g -L$(LIBOPENCLDIR) $(LIBOPENCL) $(MEXLINKOPT)' mkoctfile -v oct: LINKOPT=--mex -DMATLAB_MEX_FILE mcxlabcl.cpp $(INCLUDEDIRS) $(EXTRALIB) OBJS := $(addsuffix $(OBJSUFFIX), $(FILES))