File: add-cppflags-support.patch

package info (click to toggle)
tzsp2pcap 0.0~git20191215.4fb8147-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 152 kB
  • sloc: ansic: 557; makefile: 22
file content (22 lines) | stat: -rw-r--r-- 632 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Add CPPFLAGS support for hardening
 Add support for CPPFLAGS variable to enable hardening flags like
 -D_FORTIFY_SOURCE=2 to be properly applied during compilation.
Author: Sascha Steinbiss <satta@debian.org>
Last-Update: 2026-02-25

--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,12 @@
 # Configurable variables
 TARGET = tzsp2pcap
 CFLAGS += -std=c99 -D_DEFAULT_SOURCE -Wall -Wextra -pedantic -O2 -g
+CPPFLAGS ?=
 LIBS = -lpcap
 DESTDIR ?= /usr/local
 
 tzsp2pcap: tzsp2pcap.c
-	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+	$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $< $(LIBS)
 
 .PHONY: clean all install uninstall