changeset 12690:16bc2657b1f1 octave-forge

[nan][tsa] honor CC and CXX environment variables; fix build error with gcc-5 for mex4m target
author schloegl
date Sat, 12 Sep 2015 13:04:40 +0000
parents e2c27fba9dd6
children 6d6285a2a633
files extra/NaN/src/Makefile extra/tsa/src/Makefile
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/extra/NaN/src/Makefile	Sat Sep 12 09:30:19 2015 +0000
+++ b/extra/NaN/src/Makefile	Sat Sep 12 13:04:40 2015 +0000
@@ -31,8 +31,8 @@
 # Instead of building "mex shortpath.c" and "mex uigetpath.c", I used empty m-functions within argout=argin; 
 ####################################################
 MKOCTFILE ?= mkoctfile$(OCTAVE_VERSION)
-CC      = gcc
-CXX     = g++
+CC      ?= gcc
+CXX     ?= g++
 CFLAGS += -fopenmp -Wall -Wextra -Wconversion -O2
 OCTMEX	= $(MKOCTFILE) --mex -lgomp
 RM      = rm
@@ -99,12 +99,12 @@
 svm_model_octave.o: svm_model_matlab.c 
 	env CC=$(CC) $(MKOCTFILE) -o "$@" -c "$<"
 svm_model_matlab.o: svm_model_matlab.c 
-	$(CC) $(CFLAGS) -I $(MATLABDIR)/extern/include -o "$@" -c "$<"  
+	$(CXX) $(CFLAGS) -I $(MATLABDIR)/extern/include -o "$@" -c "$<"  
 svm.o: svm.cpp
 	$(CC) $(CFLAGS) -c svm.cpp
 
 train.$(MEX_EXT) predict.$(MEX_EXT): train.c tron.o linear.o linear_model_matlab.c
-	$(CC) $(CFLAGS) -I $(MATLABDIR)/extern/include -c linear_model_matlab.c
+	$(CXX) $(CFLAGS) -I $(MATLABDIR)/extern/include -c linear_model_matlab.c
 	$(MATMEX)  -lblas train.c tron.o linear.o linear_model_matlab.o 
 	#$(MATMEX) -lblas predict.c tron.o linear.o linear_model_matlab.o
 train.mex predict.mex: train.c tron.o linear.o linear_model_matlab.c
--- a/extra/tsa/src/Makefile	Sat Sep 12 09:30:19 2015 +0000
+++ b/extra/tsa/src/Makefile	Sat Sep 12 13:04:40 2015 +0000
@@ -39,8 +39,8 @@
 W32_LIBS += $(LDLIBS_W32)libblas.a
 W64_LIBS += $(LDLIBS_W64)libblas.a
 
-CC  	= gcc
-CXX 	= g++
+CC  	?= gcc
+CXX 	?= g++
 CFLAGS 	= -Wall -Wextra -Wconversion -O2 -fPIC 
 OCTMEX	= mkoctfile$(OCTAVE_VERSION) --mex -lgomp
 RM      = rm