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