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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
--- a/lib/lib.Makefile
+++ b/lib/lib.Makefile
@@ -62,3 +62,6 @@ ifneq ($(DBG),yes)
LDLIBS+= $(shell dpkg-buildflags --get LDLIBS)
endif
endif
+
+CFLAGS+=$(OpenWrt_CFLAGS)
+LDFLAGS+=$(OpenWrt_LDFLAGS)
--- a/daemon/Makefile
+++ b/daemon/Makefile
@@ -1,3 +1,6 @@
+OpenWrt_CFLAGS:=$(CFLAGS)
+OpenWrt_LDFLAGS:=$(LDFLAGS)
+
TARGET= rtpengine
with_iptables_option ?= yes
--- a/recording-daemon/Makefile
+++ b/recording-daemon/Makefile
@@ -1,3 +1,6 @@
+OpenWrt_CFLAGS:=$(CFLAGS)
+OpenWrt_LDFLAGS:=$(LDFLAGS)
+
TARGET= rtpengine-recording
CFLAGS= -g -Wall -Wstrict-prototypes -pthread -I. -I../lib/ -I../kernel-module/
--- a/iptables-extension/Makefile
+++ b/iptables-extension/Makefile
@@ -1,3 +1,6 @@
+OpenWrt_CFLAGS:=$(CFLAGS)
+OpenWrt_LDFLAGS:=$(LDFLAGS)
+
CC?=gcc
CFLAGS = -O2 -Wall -Wstrict-prototypes -shared -fPIC
ifneq ($(RTPENGINE_VERSION),)
@@ -22,6 +25,9 @@ else
XTABLES = $(shell test -e /usr/include/xtables.h && echo 1)
endif
+CFLAGS+=$(OpenWrt_CFLAGS)
+LDFLAGS+=$(OpenWrt_LDFLAGS)
+
IPTABLES = $(shell test -e /usr/include/iptables.h && echo 1)
IP6TABLES = $(shell test -e /usr/include/ip6tables.h && echo 1)
@@ -37,7 +43,7 @@ WORK=1
module: libxt_RTPENGINE.so
libxt_RTPENGINE.so: libxt_RTPENGINE.c
- $(CC) $(CFLAGS) -o libxt_RTPENGINE.so libxt_RTPENGINE.c
+ $(CC) $(LDFLAGS) $(CFLAGS) -o libxt_RTPENGINE.so libxt_RTPENGINE.c
else
|