1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Description: enable hardening
enable hardening with the -g flag and LDFLAGS (CPPFLAGS?)
Author: Christian T. Steigies <cts@debian.org>
Last-Update: 2025-03-02
Index: vectoroids/Makefile
===================================================================
--- vectoroids.orig/Makefile
+++ vectoroids/Makefile
@@ -20,10 +20,13 @@ SDL_LIB=$(shell sdl2-config --libs) $(MI
NOSOUNDFLAG=__SOUND
MIXER=-lSDL2_mixer
+# Debian hardening
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS=-Wall -Wno-long-long -pedantic -std=c99 -O2 \
$(shell sdl2-config --cflags) -D$(NOSOUNDFLAG) \
+ $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) \
-DDATA_PREFIX=\"$(DATA_PREFIX)\" -DJOY_$(JOY) -D$(TARGET_DEF)
-
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
all: vectoroids
@@ -58,7 +61,7 @@ clean:
vectoroids: vectoroids.o
- $(CC) $(CFLAGS) vectoroids.o -o vectoroids $(SDL_LIB)
+ $(CC) $(CFLAGS) vectoroids.o -o vectoroids $(SDL_LIB) $(LDFLAGS)
vectoroids.o: vectoroids.c
|