Commit d03f827a authored by Omar Kallel's avatar Omar Kallel
Browse files

Generate two icwmp binaries: icwmpd & icwmp_tr098d

parent 6b4c42f9
CWMP_VERSION = 3.0.0
bin_PROGRAMS = icwmpd
if TR181
icwmpd_SOURCES = \
../backupSession.c \
../config.c \
......@@ -53,14 +54,6 @@ icwmpd_LDADD = \
$(LBLOBMSG_LIBS) \
$(LIBZ_LIBS) \
$(LIBM_LIBS)
if TR098
icwmpd_LDADD += \
-ltr098
else
icwmpd_LDADD += \
-lbbfdm
endif
icwmpd_CFLAGS+=-DCWMP_VERSION=\"$(CWMP_VERSION)\"
icwmpd_LDFLAGS+=-DCWMP_VERSION=\"$(CWMP_VERSION)\"
......@@ -69,6 +62,76 @@ CWMP_BKP_FILE=/etc/icwmpd/.icwmpd_backup_session.xml
icwmpd_CFLAGS+=-DCWMP_BKP_FILE=\"$(CWMP_BKP_FILE)\"
icwmpd_CFLAGS+=-I../inc
icwmpd_LDADD += \
-lbbfdm
endif
if TR098
bin_PROGRAMS += icwmp_tr098d
icwmp_tr098d_SOURCES = \
../backupSession.c \
../config.c \
../cwmp.c \
../digestauth.c \
../event.c \
../external.c \
../http.c \
../jshn.c \
../log.c \
../md5.c \
../netlink.c \
../time.c \
../ubus.c \
../xml.c \
../diagnostic.c \
../zlib.c
icwmp_tr098d_CFLAGS = \
$(AM_CFLAGS) \
$(LIBUCI_CFLAGS) \
$(LIBUBOX_CFLAGS) \
$(LIBUBUS_CFLAGS) \
$(MICROXML_CFLAGS) \
$(LIBCURL_CFLAGS) \
$(LIBZSTREAM_CFLAGS)
icwmp_tr098d_LDFLAGS = \
$(AM_LDFLAGS) \
$(LIBUCI_LDFLAGS) \
$(LIBUBOX_LDFLAGS) \
$(LIBUBUS_LDFLAGS) \
$(MICROXML_LDFLAGS) \
$(LIBCURL_LDFLAGS) \
$(LIBZSTREAM_LDFLAGS)
icwmp_tr098d_LDADD = \
$(AM_LIBS) \
$(LIBUCI_LIBS) \
$(LIBUBOX_LIBS) \
$(LIBUBUS_LIBS) \
$(MICROXML_LIBS) \
$(LIBCURL_LIBS) \
$(LIBZSTREAM_LIBS) \
$(LIBPTHREAD_LIBS) \
$(LCRYPTO_LIBS) \
$(LSSL_LIBS) \
$(LIBJSON_LIBS) \
$(LBLOBMSG_LIBS) \
$(LIBZ_LIBS) \
$(LIBM_LIBS) \
-ltr098
icwmp_tr098d_CFLAGS+=-DCWMP_VERSION=\"$(CWMP_VERSION)\"
icwmp_tr098d_CFLAGS+=-DTR098
icwmp_tr098d_LDFLAGS+=-DCWMP_VERSION=\"$(CWMP_VERSION)\"
CWMP_BKP_FILE=/etc/icwmpd/.icwmpd_backup_session.xml
icwmp_tr098d_CFLAGS+=-DCWMP_BKP_FILE=\"$(CWMP_BKP_FILE)\"
icwmp_tr098d_CFLAGS+=-I../inc
endif
bin_PROGRAMS += icwmp_stund
icwmp_stund_SOURCES = \
......@@ -222,5 +285,4 @@ icwmp_bulkdatad_LDADD = \
$(LIBUBUS_LIBS) \
$(LCRYPTO_LIBS) \
$(LIBCURL_LIBS) \
-lbbfdm
-lbbfdm
\ No newline at end of file
......@@ -39,9 +39,9 @@ config cwmp 'cpe'
option notification '1'
#vlan_method: 1: only tagged vlantermination 2: all vlanterminations (tagged and untagged)
option vlan_method '1'
option datamodel 'tr181'
config cwmp 'lwn'
option enable '1'
option hostname ''
option port ''
option port ''
\ No newline at end of file
......@@ -29,6 +29,9 @@ AC_ARG_ENABLE(dummy_mode, [AS_HELP_STRING([--enable-dummy-mode], [enable dummy m
AC_ARG_ENABLE(tr098, [AS_HELP_STRING([--enable-tr098], [enable tr098])], AC_DEFINE(TR098),)
AM_CONDITIONAL([TR098],[test "x$enable_tr098" = "xyes"])
AC_ARG_ENABLE(tr181, [AS_HELP_STRING([--enable-tr181], [enable tr181])], AC_DEFINE(TR181),)
AM_CONDITIONAL([TR181],[test "x$enable_tr181" = "xyes"])
# checks for programs
AC_PROG_CC
AM_PROG_CC_C_O
......
......@@ -10,6 +10,7 @@ STOP=10
USE_PROCD=1
PROG="/usr/sbin/icwmpd"
PROG098="/usr/sbin/icwmp_tr098d"
EXTRA_COMMANDS="notify"
EXTRA_HELP=" start [GetRPCMethods] Start icwmpd service and send GetRPCMethods"
......@@ -195,7 +196,11 @@ start_service() {
get_acs_url
procd_open_instance
procd_set_param command "$PROG"
if [ "$(uci -q get cwmp.cpe.datamodel)" == "tr181" ]; then
procd_set_param command "$PROG"
else
procd_set_param command "$PROG098"
fi
if [ "$1" = "GetRPCMethods" ];then
procd_append_param command -g
elif [ -f /etc/icwmpd/.icwmpd_boot ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment