File: use-flags.patch

package info (click to toggle)
plotnetcfg 0.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 312 kB
  • ctags: 355
  • sloc: ansic: 2,952; makefile: 55
file content (23 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Use externally-provided flags
Author: Stephen Kitt <skitt@debian.org>

--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 libs=$(jansson)/src/.libs/libjansson.a
 INCLUDE=-I$(jansson)/src
 endif
-CFLAGS=-W -Wall $(INCLUDE)
+CFLAGS+=-W -Wall $(INCLUDE)
 
 all: check-libs plotnetcfg
 
@@ -13,7 +13,7 @@
 	    handlers/bridge.o handlers/master.o handlers/openvswitch.o handlers/veth.o \
 	    handlers/vlan.o \
 	    frontends/dot.o frontends/json.o
-	gcc -o $@ $+ $(libs)
+	gcc $(LDFLAGS) -o $@ $+ $(libs)
 
 args.o: args.c args.h
 ethtool.o: ethtool.c ethtool.h