1From 5c5e6d0f469c8b4384bbe5d6c8f78069c182daf0 Mon Sep 17 00:00:00 2001 2From: Romain Naour <romain.naour@gmail.com> 3Date: Sun, 9 Apr 2017 19:56:55 +0200 4Subject: [PATCH] override CPPFLAGS, CXXFLAGS and CFLAGS in Makefile 5 6When CPPFLAGS is passed on the command line, include paths for the 7bundled libraries are lost. Since the hand written Makefile want 8to use them unconditionally, we need to use the key word "override" 9before CPPFLAGS. 10 11Do the same for CXXFLAGS and CFLAGS otherwise -fPIC is lost. 12 13Signed-off-by: Romain Naour <romain.naour@gmail.com> 14--- 15 source/Irrlicht/Makefile | 6 +++--- 16 1 file changed, 3 insertions(+), 3 deletions(-) 17 18diff --git a/source/Irrlicht/Makefile b/source/Irrlicht/Makefile 19index 0712b07..b334e9c 100644 20--- a/source/Irrlicht/Makefile 21+++ b/source/Irrlicht/Makefile 22@@ -62,7 +62,7 @@ LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \ 23 ############### 24 #Compiler flags 25 CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng 26-CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 27+override CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1 28 CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing 29 ifndef NDEBUG 30 CXXFLAGS += -g -D_DEBUG 31@@ -74,8 +74,8 @@ CXXFLAGS += -pg 32 endif 33 CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES 34 35-sharedlib sharedlib_osx: CXXFLAGS += -fPIC 36-sharedlib sharedlib_osx: CFLAGS += -fPIC 37+sharedlib sharedlib_osx: override CXXFLAGS += -fPIC 38+sharedlib sharedlib_osx: override CFLAGS += -fPIC 39 40 #multilib handling 41 ifeq ($(HOSTTYPE), x86_64) 42-- 432.9.3 44 45