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
|
Description: allow overriding LDFLAGS, CFLAGS, CPPFLAGS
This patch adds the possibility to provide custom CFLAGS, CPPFLAGS and
LDFLAGS at build time. This is required to apply hardening and debug
flags.
Author: Jan Dittberner <jandd@debian.org>
From: Logan Rosen <logan@ubuntu.com>
Date: Fri, 16 Oct 2015 19:53:06 +0200
Bug-Debian: https://bugs.debian.org/772430
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
-CFLAGS = -O2 -Wall
+CFLAGS += -O2 -Wall
HIDAPI = hidraw
-LDFLAGS = -lhidapi-$(HIDAPI)
+LDFLAGS += -lhidapi-$(HIDAPI)
all: usbrelay
usbrelay: usbrelay.c
- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $<
clean:
rm -f usbrelay
|