Mercurial > mxe-octave
view src/of-nan-1-cross-fixes.patch @ 4107:4970d27d3e12
of-netcdf: update to 1.0.9
* build_packages.m: update netcdf version
* src/of-netcdf.mk: update version, checksum
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sat, 19 Mar 2016 10:00:08 -0400 |
parents | 6c7d570cd9ff |
children | be6b10b6faf5 |
line wrap: on
line source
diff -ur NaN.orig/src/Makefile NaN/src/Makefile --- NaN.orig/src/Makefile 2016-03-07 08:15:08.086338754 -0500 +++ NaN/src/Makefile 2016-03-07 10:23:34.609405159 -0500 @@ -31,8 +31,9 @@ # 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++ +OCTAVE_CONFIG ?= octave-config +CC ?= $(shell $(MKOCTFILE) -p CC) +CXX ?= $(shell $(MKOCTFILE) -p CXX) CFLAGS += -fopenmp -Wall -Wextra -Wconversion -O2 OCTMEX = $(MKOCTFILE) --mex -lgomp RM = rm @@ -41,8 +42,11 @@ # https://wiki.debian.org/HardeningWalkthrough#Handling_dpkg-buildflags_in_your_upstream_build_system CFLAGS += $(CPPFLAGS) -ifneq ($(OS),Windows_NT) +HOSTTYPE := $(shell $(OCTAVE_CONFIG) -p CANONICAL_HOST_TYPE) +ifeq (,$(findstring mingw,$(HOSTTYPE))) CFLAGS += -fPIC +else +OCTMEX = $(MKOCTFILE) --mex endif ifneq (Darwin,$(shell uname))