Description: Pass hardening CFLAGS, CPPFLAGS and LDFLAGS
Author: Graham Inggs <graham@nerve.org.za>
Forwarded: Yes
Last-Update: 2014-03-19
--- a/odpdom/Makefile
+++ b/odpdom/Makefile
@@ -1,7 +1,7 @@
 CPP     = g++
 LD      = g++
 LIBS    =
-LDFLAGS = -shared -L.
+LDFLAGS += -shared -L.
 FLAGS   = -DPY_DOMEXC_MODULE="\"xml.dom.\""
           -DCHECK=5 \
           -DVERBOSE=5 \
@@ -10,7 +10,7 @@
 #	  -DNO_THROW
 
 PYINCLUDE=`python -c "import sys;import os.path;print os.path.join(sys.prefix,\"include\",\"python\"+sys.version[:3])"`
-CFLAGS  = -fpic -g $(FLAGS) -I$(PYINCLUDE)  -Iinclude
+CFLAGS  += -fpic -g $(CPPFLAGS) $(FLAGS) -I$(PYINCLUDE)  -Iinclude
 
 SWIGFLAGS = -python -c++ $(FLAGS)
 
--- a/src/Configuration.mk
+++ b/src/Configuration.mk
@@ -1,5 +1,6 @@
 LIBS=  -L../odpdom -lODP $(shell fltk-config --use-gl --ldflags) -lGLU -lGL -lm -lpthread
-CFLAGS= -g -O0 -fpic  -Wall $(FLAGS) $(shell fltk-config --cxxflags) -I$(PYINCLUDE) \
+CFLAGS?= -g -00 -Wall
+CFLAGS+= -fpic $(CPPFLAGS) $(FLAGS) $(shell fltk-config --cxxflags) -I$(PYINCLUDE) \
         -Iinclude -I../odpdom/include
 PYINCLUDE=`python -c "import sys;import os.path;print os.path.join(sys.prefix,\"include\",\"python\"+sys.version[:3])"`
-LDFLAGS= -shared -L.
+LDFLAGS+= -shared -L.
