Mercurial > mxe-octave
view src/of-nan-1-cross-fixes.patch @ 4109:07a298959dc3
of-database: update to 2.4.1
* of-database-1-cross-fixes.patch: update cross compile patch
* src/of-database.mk: update version, checksum
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 20 Mar 2016 07:28:02 -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))