view src/of-nan-1-cross-fixes.patch @ 4037:85abb6c3ec8b

of-netcdf: patch for --enable-64 (Bug #46060) * src/of-netcdf-1-fixes.patch: new file * dist-files.mk: add of-netcdf-1-fixes.patch
author John Donoghue <john.donoghue@ieee.org>
date Tue, 29 Sep 2015 19:43:19 -0400
parents 9f7e9b053041
children 6c7d570cd9ff
line wrap: on
line source

diff -ur NaN.orig/src/Makefile NaN/src/Makefile
--- NaN.orig/src/Makefile	2015-06-30 13:30:25.348544831 -0400
+++ NaN/src/Makefile	2015-06-30 13:35:18.600346663 -0400
@@ -31,13 +31,15 @@
 # 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
 RM      = rm
 
-ifneq ($(OS),Windows_NT)
+HOST_TYPE := $(shell $(OCTAVE_CONFIG) -p CANONICAL_HOST_TYPE))
+ifeq (,$(findstring mingw,$(HOST_TYPE)))
 CFLAGS      += -fPIC
 endif