2023-07-18 01:26:17 +01:00
|
|
|
--- a/makefile
|
|
|
|
+++ b/makefile
|
2024-11-29 12:04:09 +00:00
|
|
|
@@ -18,9 +18,12 @@
|
2024-11-29 01:35:56 +00:00
|
|
|
# Configuration:
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
-
|
|
|
|
-all: CFLAGS = -DLINBPQ -MMD -g -fcommon
|
|
|
|
-all: LDFLAGS = -l:libpaho-mqtt3a.a -l:libjansson.a
|
|
|
|
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
|
|
|
|
+CFLAGS+=$(shell dpkg-buildflags --get CPPFLAGS)
|
2024-11-29 12:04:09 +00:00
|
|
|
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
|
2024-11-29 01:35:56 +00:00
|
|
|
+
|
2024-11-29 12:04:09 +00:00
|
|
|
+all: CFLAGS += -DLINBPQ -MMD -g -fcommon
|
|
|
|
+all: LIBS = -lpaho-mqtt3a -ljansson -lminiupnpc -lrt -lm -lz -lpthread -lconfig -lpcap
|
|
|
|
all: linbpq
|
2024-11-29 01:35:56 +00:00
|
|
|
|
|
|
|
|
2024-11-29 12:04:09 +00:00
|
|
|
@@ -32,12 +35,15 @@
|
2024-11-29 01:35:56 +00:00
|
|
|
|
|
|
|
|
2024-11-29 12:04:09 +00:00
|
|
|
linbpq: $(OBJS)
|
2024-11-29 01:35:56 +00:00
|
|
|
- gcc $(OBJS) -Xlinker -Map=output.map -l:libminiupnpc.a -lrt -lm -lz $(LDFLAGS) -lpthread -lconfig -lpcap -o linbpq
|
2023-07-18 01:26:17 +01:00
|
|
|
- sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq
|
2024-11-29 12:04:09 +00:00
|
|
|
+ gcc $(OBJS) $(LDFLAGS) $(LIBS) -o linbpq
|
|
|
|
+ # sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq
|
2023-07-18 01:26:17 +01:00
|
|
|
|
2024-11-29 11:37:37 +00:00
|
|
|
-include *.d
|
2023-07-18 01:26:17 +01:00
|
|
|
|
2024-11-05 21:46:27 +00:00
|
|
|
-clean :
|
2023-07-18 01:26:17 +01:00
|
|
|
- rm *.d
|
|
|
|
- rm linbpq $(OBJS)
|
2024-11-29 11:37:37 +00:00
|
|
|
-
|
2024-11-05 21:46:27 +00:00
|
|
|
+install:
|
|
|
|
+ install -b -m 755 -D -d debian/linbpq/usr/sbin
|
2024-11-29 12:04:09 +00:00
|
|
|
+ install -b -m 755 -s -p linbpq debian/linbpq/usr/sbin
|
2024-11-29 01:35:56 +00:00
|
|
|
+
|
2024-11-05 21:46:27 +00:00
|
|
|
+clean:
|
2024-03-26 20:24:27 +00:00
|
|
|
+ $(RM) *.d
|
|
|
|
+ $(RM) linbpq $(OBJS)
|