Mercurial > forge
changeset 12652:1bd0f6f40c56 octave-forge
- fix Makefile for Octave4 on windows
(fixes #45363 and #44859)
author | schloegl |
---|---|
date | Wed, 24 Jun 2015 11:00:51 +0000 |
parents | b3fcb76b0b96 |
children | 215c046e6504 |
files | extra/NaN/src/Makefile |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/extra/NaN/src/Makefile Mon Jun 22 20:33:12 2015 +0000 +++ b/extra/NaN/src/Makefile Wed Jun 24 11:00:51 2015 +0000 @@ -30,13 +30,17 @@ # http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinZvxgC9ezp2P3UCX_a7TAUYuVsp2U40MQUV6qr%40mail.gmail.com&forum_name=gnumex-users # 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++ -CFLAGS = -fopenmp -Wall -Wextra -Wconversion -O2 -fPIC -OCTMEX = mkoctfile$(OCTAVE_VERSION) --mex +CFLAGS = -fopenmp -Wall -Wextra -Wconversion -O2 +OCTMEX = $(MKOCTFILE) --mex RM = rm +ifneq ($(OS),Windows_NT) +CFLAGS += -fPIC +endif + ifneq (Darwin,$(shell uname)) CFLAGS += -fopenmp MEX_OPTION += -lgomp @@ -89,7 +93,7 @@ $(MATMEX) "$<" svm_model_octave.o: svm_model_matlab.c - $(CC) $(CFLAGS) $(shell $(OCTMEX) -p INCFLAGS) -o "$@" -c "$<" + env CC=$(CC) $(MKOCTFILE) -o "$@" -c "$<" svm_model_matlab.o: svm_model_matlab.c $(CC) $(CFLAGS) -I $(MATLABDIR)/extern/include -o "$@" -c "$<" svm.o: svm.cpp