0001-override-CPPFLAGS-CXXFLAGS-and-CFLAGS-in-Makefile.patch 1.6 KB

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