Description: Make sure CPPFLAGS are used for hardening.
 The build should use the CPPFLAGS content to ensure hardening
 build flags are included in the compiler command line.
Author: Petter Reinholdtsen <pere@debian.org>
Forwarded: no
Last-Update: 2024-12-05
---
--- blobandconquer-1.11-dfsg+20.orig/makefile
+++ blobandconquer-1.11-dfsg+20/makefile
@@ -18,6 +18,7 @@ ICONDIR ?= $(PREFIX)/share/icons/
 MENUDIR ?= $(PREFIX)/share/applications/
 LOCALEDIR ?= $(PREFIX)/share/locale/
 
+CPPFLAGS +=
 CXXFLAGS += -Wformat=2 -Wformat-security -Wstrict-aliasing=2
 CXXFLAGS += -Wmissing-format-attribute -Wmissing-noreturn
 CXXFLAGS += -Wdisabled-optimization
@@ -97,7 +98,7 @@ endif
 all: $(ALL)
 
 %.o: %.cpp %.h data/gameDefs/defines.h defs.h headers.h
-	$(CXX) $(CXXFLAGS) -c $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
 
 # linking the program.
 $(PROG): $(GAMEOBJS)
