Mercurial > mxe-octave
view src/of-nan-1-cross-fixes.patch @ 4140:d38d0e08ef4c
tiff: update to 4.0.6
* src/tiff.mk: update version and checksum
author | John Donoghue |
---|---|
date | Wed, 04 May 2016 08:42:44 -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))