temp:1
Change-Id: I596535a352526ed1a7345e54996a7f34aeb8953a
diff --git a/mbtk/Make.defines b/mbtk/Make.defines
index 06807c9..8f82632 100755
--- a/mbtk/Make.defines
+++ b/mbtk/Make.defines
@@ -44,6 +44,7 @@
#CFLAGS += -Wno-error=format-truncation -Wno-error=format-overflow= -Wno-error=stringop-overread -Wno-error=deprecated-declarations
INC_DIR = \
+ -I$(LOCAL_PATH)/ \
-I$(LOCAL_PATH)/inc \
-I$(BUILD_ROOT)/include \
-I$(BUILD_ROOT)/include/mbtk \
diff --git a/mbtk/Makefile b/mbtk/Makefile
index 3245e82..b3418db 100755
--- a/mbtk/Makefile
+++ b/mbtk/Makefile
@@ -1,17 +1,15 @@
ROOT = $(shell pwd)/..
include Make.defines
-DIRS = mbtk_lib mbtk_mqtt
+# Build so file.
+DIRS = libmbtk_lib libmbtk_net libmbtk_coap libmbtk_tcpip libmbtk_http libmbtk_ftp libmbtk_mqtt \
+ libmbtk_ril libmbtk_audio libmbtk_fota libmbtk_factory
-ifeq ($(BUILD_PLATFORM), asr1806)
-DIRS += mbtk_audio_lib
-endif
+# Build libql_lib and liblynq_lib.
+DIRS += libql_lib liblynq_lib
-DIRS += lynq_lib ql_lib mbtk_adbd mbtk_logd mbtk_ril
-
-DIRS += test
-
-DIRS += mbtk_device_info
+# Build bin file.
+DIRS += device_info_generate mbtk_adbd mbtk_rild mbtk_logd
all:
@echo $(ROOT)
diff --git a/mbtk/mbtk_device_info/Makefile b/mbtk/device_info_generate/Makefile
similarity index 91%
rename from mbtk/mbtk_device_info/Makefile
rename to mbtk/device_info_generate/Makefile
index 3d44e2e..e7b18be 100755
--- a/mbtk/mbtk_device_info/Makefile
+++ b/mbtk/device_info_generate/Makefile
@@ -1,7 +1,7 @@
ROOT = $(shell pwd)/../..
include ../Make.defines
-LOCAL_PATH=$(BUILD_ROOT)/mbtk_device_info
+LOCAL_PATH=$(BUILD_ROOT)/device_info_generate
INC_DIR += \
-I$(LOCAL_PATH)
diff --git a/mbtk/mbtk_device_info/main.c b/mbtk/device_info_generate/main.c
similarity index 100%
rename from mbtk/mbtk_device_info/main.c
rename to mbtk/device_info_generate/main.c
diff --git a/mbtk/mbtk_lib/inc/ds_ASBuffer.h b/mbtk/include/mbtk/ds_ASBuffer.h
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_lib/inc/ds_ASBuffer.h
rename to mbtk/include/mbtk/ds_ASBuffer.h
diff --git a/mbtk/mbtk_lib/inc/ds_ASString.h b/mbtk/include/mbtk/ds_ASString.h
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_lib/inc/ds_ASString.h
rename to mbtk/include/mbtk/ds_ASString.h
diff --git a/mbtk/mbtk_lib/inc/ringbuffer.h b/mbtk/include/mbtk/ringbuffer.h
similarity index 100%
rename from mbtk/mbtk_lib/inc/ringbuffer.h
rename to mbtk/include/mbtk/ringbuffer.h
diff --git a/mbtk/lynq_lib/Makefile b/mbtk/liblynq_lib/Makefile
similarity index 100%
rename from mbtk/lynq_lib/Makefile
rename to mbtk/liblynq_lib/Makefile
diff --git a/mbtk/lynq_lib/src/lynq_adc.c b/mbtk/liblynq_lib/src/lynq_adc.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_adc.c
rename to mbtk/liblynq_lib/src/lynq_adc.c
diff --git a/mbtk/lynq_lib/src/lynq_alarm.c b/mbtk/liblynq_lib/src/lynq_alarm.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_alarm.c
rename to mbtk/liblynq_lib/src/lynq_alarm.c
diff --git a/mbtk/lynq_lib/src/lynq_audio.c b/mbtk/liblynq_lib/src/lynq_audio.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_audio.c
rename to mbtk/liblynq_lib/src/lynq_audio.c
diff --git a/mbtk/lynq_lib/src/lynq_chip_id.c b/mbtk/liblynq_lib/src/lynq_chip_id.c
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_chip_id.c
rename to mbtk/liblynq_lib/src/lynq_chip_id.c
diff --git a/mbtk/lynq_lib/src/lynq_data_call.c b/mbtk/liblynq_lib/src/lynq_data_call.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_data_call.c
rename to mbtk/liblynq_lib/src/lynq_data_call.c
diff --git a/mbtk/lynq_lib/src/lynq_fota.c b/mbtk/liblynq_lib/src/lynq_fota.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_fota.c
rename to mbtk/liblynq_lib/src/lynq_fota.c
diff --git a/mbtk/lynq_lib/src/lynq_gnss.c b/mbtk/liblynq_lib/src/lynq_gnss.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_gnss.c
rename to mbtk/liblynq_lib/src/lynq_gnss.c
diff --git a/mbtk/lynq_lib/src/lynq_gpio.c b/mbtk/liblynq_lib/src/lynq_gpio.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_gpio.c
rename to mbtk/liblynq_lib/src/lynq_gpio.c
diff --git a/mbtk/lynq_lib/src/lynq_irq.c b/mbtk/liblynq_lib/src/lynq_irq.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_irq.c
rename to mbtk/liblynq_lib/src/lynq_irq.c
diff --git a/mbtk/lynq_lib/src/lynq_log.c b/mbtk/liblynq_lib/src/lynq_log.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_log.c
rename to mbtk/liblynq_lib/src/lynq_log.c
diff --git a/mbtk/lynq_lib/src/lynq_net_light.c b/mbtk/liblynq_lib/src/lynq_net_light.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_net_light.c
rename to mbtk/liblynq_lib/src/lynq_net_light.c
diff --git a/mbtk/lynq_lib/src/lynq_network.c b/mbtk/liblynq_lib/src/lynq_network.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_network.c
rename to mbtk/liblynq_lib/src/lynq_network.c
diff --git a/mbtk/lynq_lib/src/lynq_sim.c b/mbtk/liblynq_lib/src/lynq_sim.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_sim.c
rename to mbtk/liblynq_lib/src/lynq_sim.c
diff --git a/mbtk/lynq_lib/src/lynq_sleep.c b/mbtk/liblynq_lib/src/lynq_sleep.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_sleep.c
rename to mbtk/liblynq_lib/src/lynq_sleep.c
diff --git a/mbtk/lynq_lib/src/lynq_sms.c b/mbtk/liblynq_lib/src/lynq_sms.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_sms.c
rename to mbtk/liblynq_lib/src/lynq_sms.c
diff --git a/mbtk/lynq_lib/src/lynq_thermal.c b/mbtk/liblynq_lib/src/lynq_thermal.c
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_thermal.c
rename to mbtk/liblynq_lib/src/lynq_thermal.c
diff --git a/mbtk/lynq_lib/src/lynq_time.c b/mbtk/liblynq_lib/src/lynq_time.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_time.c
rename to mbtk/liblynq_lib/src/lynq_time.c
diff --git a/mbtk/lynq_lib/src/lynq_voice_call.c b/mbtk/liblynq_lib/src/lynq_voice_call.c
similarity index 100%
rename from mbtk/lynq_lib/src/lynq_voice_call.c
rename to mbtk/liblynq_lib/src/lynq_voice_call.c
Binary files differ
diff --git a/mbtk/mbtk_audio_lib/Makefile b/mbtk/libmbtk_audio/Makefile
similarity index 69%
copy from mbtk/mbtk_audio_lib/Makefile
copy to mbtk/libmbtk_audio/Makefile
index 01d734d..de3f3ef 100755
--- a/mbtk/mbtk_audio_lib/Makefile
+++ b/mbtk/libmbtk_audio/Makefile
@@ -1,13 +1,13 @@
ROOT = $(shell pwd)/../..
include ../Make.defines
-LOCAL_PATH=$(BUILD_ROOT)/mbtk_audio_lib
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_audio
-INC_DIR += -I$(BUILD_ROOT)/mbtk_lib/inc
+INC_DIR +=
LIB_DIR +=
-LIBS += -llog -lubus -lubox -lblobmsg_json -lrilutil -lmbtk_lib -lcutils -laudio-apu
+LIBS += -llog -lubus -lubox -lblobmsg_json -lmbtk_lib -lcutils -laudio-apu -lprop2uci
CFLAGS += -shared -Wl,-shared,-Bsymbolic
@@ -27,13 +27,18 @@
#MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
#MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
-LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp)
-$(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES))
+#LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp)
+#$(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES))
+
+LOCAL_SRC_FILES = src/mbtk_audio.c \
+ src/mbtk_audio_gain.c \
+ src/mbtk_pcm_stream.c \
+ src/mbtk_wav.c
OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
$(info OBJS = $(OBJS))
-dtarget := $(OUT_DIR)/lib/libmbtk_audio_lib.so
+dtarget := $(OUT_DIR)/lib/libmbtk_audio.so
all: $(dtarget)
diff --git a/mbtk/mbtk_lib/inc/g711_pcm_convert.h b/mbtk/libmbtk_audio/inc/g711_pcm_convert.h
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_lib/inc/g711_pcm_convert.h
rename to mbtk/libmbtk_audio/inc/g711_pcm_convert.h
diff --git a/mbtk/mbtk_audio_lib/inc/mbtk_audio_internal.h b/mbtk/libmbtk_audio/inc/mbtk_audio_internal.h
similarity index 100%
rename from mbtk/mbtk_audio_lib/inc/mbtk_audio_internal.h
rename to mbtk/libmbtk_audio/inc/mbtk_audio_internal.h
diff --git a/mbtk/mbtk_lib/src/g711_pcm_convert.c b/mbtk/libmbtk_audio/src/g711_pcm_convert.c
similarity index 100%
rename from mbtk/mbtk_lib/src/g711_pcm_convert.c
rename to mbtk/libmbtk_audio/src/g711_pcm_convert.c
diff --git a/mbtk/mbtk_lib/src/mbtk_audio.c "b/mbtk/libmbtk_audio/src/mbtk_audio \0502\051.c"
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_audio.c
rename to "mbtk/libmbtk_audio/src/mbtk_audio \0502\051.c"
diff --git a/mbtk/mbtk_audio_lib/src/mbtk_audio.c b/mbtk/libmbtk_audio/src/mbtk_audio.c
similarity index 100%
rename from mbtk/mbtk_audio_lib/src/mbtk_audio.c
rename to mbtk/libmbtk_audio/src/mbtk_audio.c
diff --git a/mbtk/mbtk_lib/src/mbtk_audio_alsa.c b/mbtk/libmbtk_audio/src/mbtk_audio_alsa.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_audio_alsa.c
rename to mbtk/libmbtk_audio/src/mbtk_audio_alsa.c
diff --git a/mbtk/mbtk_lib/src/mbtk_audio_gain.c b/mbtk/libmbtk_audio/src/mbtk_audio_gain.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_audio_gain.c
rename to mbtk/libmbtk_audio/src/mbtk_audio_gain.c
diff --git a/mbtk/mbtk_audio_lib/src/mbtk_mp3.c b/mbtk/libmbtk_audio/src/mbtk_mp3.c
similarity index 100%
rename from mbtk/mbtk_audio_lib/src/mbtk_mp3.c
rename to mbtk/libmbtk_audio/src/mbtk_mp3.c
diff --git a/mbtk/mbtk_lib/src/mbtk_mp3_to_wav.c b/mbtk/libmbtk_audio/src/mbtk_mp3_to_wav.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_mp3_to_wav.c
rename to mbtk/libmbtk_audio/src/mbtk_mp3_to_wav.c
diff --git a/mbtk/mbtk_audio_lib/src/mbtk_pcm_stream.c b/mbtk/libmbtk_audio/src/mbtk_pcm_stream.c
similarity index 100%
rename from mbtk/mbtk_audio_lib/src/mbtk_pcm_stream.c
rename to mbtk/libmbtk_audio/src/mbtk_pcm_stream.c
diff --git a/mbtk/mbtk_audio_lib/src/mbtk_wav.c b/mbtk/libmbtk_audio/src/mbtk_wav.c
similarity index 100%
rename from mbtk/mbtk_audio_lib/src/mbtk_wav.c
rename to mbtk/libmbtk_audio/src/mbtk_wav.c
diff --git a/mbtk/libmbtk_coap/Makefile b/mbtk/libmbtk_coap/Makefile
new file mode 100755
index 0000000..1595ec0
--- /dev/null
+++ b/mbtk/libmbtk_coap/Makefile
@@ -0,0 +1,47 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_coap
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib -lmbtk_net
+
+# -lubus -lubox -luci -lprop2uci -lrilutil -lblobmsg_json
+
+ifeq ($(BUILD_PLATFORM), asr1803)
+#LIBS += -lcutils -laudio-apu
+endif
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+#DEFINE += -DMBTK_NET_MONITOR_SUPPORT
+
+MY_FILES_PATH:=$(LOCAL_PATH)
+MY_FILES_SUFFIX:=%.c %.cpp
+My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_coap.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/src/mbtk_coap.c b/mbtk/libmbtk_coap/mbtk_coap.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_coap.c
rename to mbtk/libmbtk_coap/mbtk_coap.c
diff --git a/mbtk/mbtk_lib/src/mbtk_coap_api.cpp b/mbtk/libmbtk_coap/mbtk_coap_api.cpp
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_coap_api.cpp
rename to mbtk/libmbtk_coap/mbtk_coap_api.cpp
diff --git a/mbtk/mbtk_lib/src/mbtk_coap_pdu.cpp b/mbtk/libmbtk_coap/mbtk_coap_pdu.cpp
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_coap_pdu.cpp
rename to mbtk/libmbtk_coap/mbtk_coap_pdu.cpp
diff --git a/mbtk/mbtk_lib/inc/mbtk_coap_pdu.h b/mbtk/libmbtk_coap/mbtk_coap_pdu.h
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_lib/inc/mbtk_coap_pdu.h
rename to mbtk/libmbtk_coap/mbtk_coap_pdu.h
diff --git a/mbtk/libmbtk_ecall/Makefile b/mbtk/libmbtk_ecall/Makefile
new file mode 100755
index 0000000..71eeae3
--- /dev/null
+++ b/mbtk/libmbtk_ecall/Makefile
@@ -0,0 +1,39 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_ftp
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib -lmbtk_net
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+MY_FILES_PATH:=$(LOCAL_PATH)
+MY_FILES_SUFFIX:=%.c %.cpp
+My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_ftp.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/libmbtk_factory/Makefile b/mbtk/libmbtk_factory/Makefile
new file mode 100755
index 0000000..0da7069
--- /dev/null
+++ b/mbtk/libmbtk_factory/Makefile
@@ -0,0 +1,39 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_factory
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+MY_FILES_PATH:=$(LOCAL_PATH)
+MY_FILES_SUFFIX:=%.c %.cpp
+My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_factory.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/inc/gpio-define.h b/mbtk/libmbtk_factory/gpio-define.h
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_lib/inc/gpio-define.h
rename to mbtk/libmbtk_factory/gpio-define.h
diff --git a/mbtk/mbtk_lib/src/mbtk_adc.c b/mbtk/libmbtk_factory/mbtk_adc.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_adc.c
rename to mbtk/libmbtk_factory/mbtk_adc.c
diff --git a/mbtk/mbtk_lib/src/mbtk_basic_at_wrapper.c b/mbtk/libmbtk_factory/mbtk_basic_at_wrapper.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_basic_at_wrapper.c
rename to mbtk/libmbtk_factory/mbtk_basic_at_wrapper.c
diff --git a/mbtk/mbtk_lib/src/mbtk_gpio.c b/mbtk/libmbtk_factory/mbtk_gpio.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_gpio.c
rename to mbtk/libmbtk_factory/mbtk_gpio.c
diff --git a/mbtk/mbtk_lib/inc/mbtk_gpio_def.h b/mbtk/libmbtk_factory/mbtk_gpio_def.h
similarity index 100%
rename from mbtk/mbtk_lib/inc/mbtk_gpio_def.h
rename to mbtk/libmbtk_factory/mbtk_gpio_def.h
diff --git a/mbtk/libmbtk_fota/Makefile b/mbtk/libmbtk_fota/Makefile
new file mode 100755
index 0000000..e1c1b09
--- /dev/null
+++ b/mbtk/libmbtk_fota/Makefile
@@ -0,0 +1,39 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_fota
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib -lubus -lubox -lblobmsg_json
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+MY_FILES_PATH:=$(LOCAL_PATH)
+MY_FILES_SUFFIX:=%.c %.cpp
+My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_fota.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/src/mbtk_fota.c b/mbtk/libmbtk_fota/mbtk_fota.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_fota.c
rename to mbtk/libmbtk_fota/mbtk_fota.c
diff --git a/mbtk/libmbtk_ftp/Makefile b/mbtk/libmbtk_ftp/Makefile
new file mode 100755
index 0000000..71eeae3
--- /dev/null
+++ b/mbtk/libmbtk_ftp/Makefile
@@ -0,0 +1,39 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_ftp
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib -lmbtk_net
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+MY_FILES_PATH:=$(LOCAL_PATH)
+MY_FILES_SUFFIX:=%.c %.cpp
+My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_ftp.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/src/mbtk_ftp.c b/mbtk/libmbtk_ftp/mbtk_ftp.c
similarity index 98%
rename from mbtk/mbtk_lib/src/mbtk_ftp.c
rename to mbtk/libmbtk_ftp/mbtk_ftp.c
index 328c064..2821087 100755
--- a/mbtk/mbtk_lib/src/mbtk_ftp.c
+++ b/mbtk/libmbtk_ftp/mbtk_ftp.c
@@ -11,7 +11,6 @@
#include "mbtk_sock.h"
#include "mbtk_str.h"
#include "mbtk_sock2.h"
-#include "mbtk_info.h"
#include<linux/msg.h>
/*************************************************************
@@ -1041,7 +1040,7 @@
result = FTP_ERR_UNKNOWN;
goto end;
}
-
+
int mbtk_errno;
if(info->auth_type != 0)
{
@@ -1051,7 +1050,7 @@
printf("\nmbtk_ssl_init_func error = %d",mbtk_errno);
goto end;
}
-
+
}
result = ftp_download_process(info);
if(info->auth_type != 0)
@@ -1086,7 +1085,7 @@
result = FTP_ERR_UNKNOWN;
goto end;
}
-
+
mbtk_errno = mbtk_ssl_init_func(info->ftp_ssl_handle,info->ftp_sock_ssl_info_data->ingnore_cert,info->session_data);
if(mbtk_errno != 0)
{
@@ -1098,7 +1097,7 @@
result = ftp_update_process(info);
goto read_end;
}
- else
+ else
{
//printf("FTP_SOCK_DATA,fd:%d\n",info->file_trans.size_count);
return FTP_ERR_SUCCESS;
@@ -1119,13 +1118,13 @@
result = FTP_ERR_UNKNOWN;
goto end;
}
-
+
if(info->file_trans.size_count == 0)
{
result = ftp_update_process(info);
goto read_end;
}
- else
+ else
{
LOGE("FTP_SOCK_DATA,fd:%d", info->sock_info[FTP_SOCK_DATA].fd);
return FTP_ERR_SUCCESS;
@@ -1793,7 +1792,7 @@
{
printf("No such FTP handle:%d\n", handle);
}
-
+
char buff[1024]={0};
int err=0;
int len=0;
@@ -1827,7 +1826,7 @@
info->is_data_sock_busy = false;
info->file_trans.size_count = 0;
info->file_trans.size_send = 0;
-
+
char line_buf[1024];
if(info->auth_type != 0)
len = mbtk_sock_read(info->ftp_ssl_handle,info->session,buff,sizeof(buff),FTP_TIMEOUT,&err);
@@ -1963,7 +1962,7 @@
{
printf("mbtk_sock_init error\n");
}
-
+
info->ftp_sock_ssl_info = (mbtk_sock_info*) malloc(sizeof(mbtk_sock_info));
memset(info->ftp_sock_ssl_info, 0x0, sizeof(mbtk_sock_info));
info->ftp_sock_ssl_info->is_support_ssl = (auth_type != FTP_AUTH_TYPE_NON);
@@ -2199,7 +2198,7 @@
}
LOGI("FTP login#user:%s,pass:%s",user.name,user.pass);
-
+
if(info->auth_type != 0)
{
int mbtk_errno=-1;
@@ -2214,7 +2213,7 @@
char cmd[50];
memset(cmd,0,50);
int len_ssl;
-
+
memset(cmd,0,50);
snprintf(cmd, 50, "PBSZ 0\r\n");
@@ -2301,7 +2300,7 @@
printf("FTP login denied[code = %d].\n", code);
return FTP_ERR_UNKNOWN;
}
-
+
memset(cmd,0,50);
snprintf(cmd, 50, "PWD\r\n");
mbtk_sock_write(info->ftp_ssl_handle,info->session,
@@ -2319,7 +2318,7 @@
}
return mbtk_errno;
}
-
+
return ftp_login(info,&user);
}
else
@@ -2384,45 +2383,45 @@
char ipBuf[32] = "";
FILE *fstream=NULL;
- char buff[1024];
+ char buff[1024];
char iptype_str[8];
- memset(buff,0,sizeof(buff));
+ memset(buff,0,sizeof(buff));
/*eth0可以换成eth1、docker0、em1、lo等*/
if(iptype == MBTK_ADDR_IPV6)
{
-
- if(NULL==(fstream=popen("ifconfig ccinet0 | grep \"inet6 addr: 2\" | awk '{print $3}'","r")))
- {
- snprintf(ipBuf, 39, "%s","0:0:0:0:0:0:0:0");
- }
- if(NULL!=fgets(buff, sizeof(buff), fstream))
- {
- snprintf(ipBuf, 39, "%s",buff);
- }
- else
- {
- snprintf(ipBuf, 39, "%s","0:0:0:0:0:0:0:0");
- pclose(fstream);
+
+ if(NULL==(fstream=popen("ifconfig ccinet0 | grep \"inet6 addr: 2\" | awk '{print $3}'","r")))
+ {
+ snprintf(ipBuf, 39, "%s","0:0:0:0:0:0:0:0");
+ }
+ if(NULL!=fgets(buff, sizeof(buff), fstream))
+ {
+ snprintf(ipBuf, 39, "%s",buff);
+ }
+ else
+ {
+ snprintf(ipBuf, 39, "%s","0:0:0:0:0:0:0:0");
+ pclose(fstream);
}
}
else
{
- if(NULL==(fstream=popen("ifconfig ccinet0 | grep \"inet addr:\" | awk \'{print $2}\' | cut -c 6-","r")))
- {
- snprintf(ipBuf, 18, "%s","0.0.0.0");
- }
- if(NULL!=fgets(buff, sizeof(buff), fstream))
- {
- snprintf(ipBuf, 18, "%s",buff);
- }
- else
- {
- snprintf(ipBuf, 18, "%s","0.0.0.0");
- pclose(fstream);
- }
+ if(NULL==(fstream=popen("ifconfig ccinet0 | grep \"inet addr:\" | awk \'{print $2}\' | cut -c 6-","r")))
+ {
+ snprintf(ipBuf, 18, "%s","0.0.0.0");
+ }
+ if(NULL!=fgets(buff, sizeof(buff), fstream))
+ {
+ snprintf(ipBuf, 18, "%s",buff);
+ }
+ else
+ {
+ snprintf(ipBuf, 18, "%s","0.0.0.0");
+ pclose(fstream);
+ }
}
- pclose(fstream);
-
+ pclose(fstream);
+
printf("ip:%s\n", ipBuf);
memcpy(ipBuf_out, ipBuf, 32);
return 0;
@@ -2882,7 +2881,7 @@
LOGE("Set data type to I fail.");
return -1;
}
-
+
memset(&info->file_trans, 0x0, sizeof(mbtk_ftp_file_trans_info_s));
info->file_trans.is_download = false;
@@ -2900,7 +2899,7 @@
LOGE("Can not open EFS file[%s].", info->file_trans.local_name);
return -1;
}
-
+
}
info->file_trans.size_count = size_byte;
info->file_trans.size_send = 0;
@@ -2919,7 +2918,7 @@
{
mbtk_at_ftp_par.rest_size = info->file_trans.size_send;
result = FTP_ERR_UNKNOWN;
- }
+ }
}
if (info->file_trans.fd > 0 ) // Save to efs
@@ -2990,7 +2989,7 @@
info->file_trans.size_send += len;
mbtk_at_ftp_par.rest_size = info->file_trans.size_send;
-
+
LOGE("size_count:%d, size_send:%d.", info->file_trans.size_count,info->file_trans.size_send);
if((info->file_trans.size_count <= info->file_trans.size_send) )
diff --git a/mbtk/mbtk_lib/src/mbtk_ftp_at.c b/mbtk/libmbtk_ftp/mbtk_ftp_at.c
similarity index 98%
rename from mbtk/mbtk_lib/src/mbtk_ftp_at.c
rename to mbtk/libmbtk_ftp/mbtk_ftp_at.c
index 464f205..3541e2b 100755
--- a/mbtk/mbtk_lib/src/mbtk_ftp_at.c
+++ b/mbtk/libmbtk_ftp/mbtk_ftp_at.c
@@ -11,7 +11,6 @@
#include "mbtk_sock.h"
#include "mbtk_str.h"
#include "mbtk_sock2.h"
-#include "mbtk_info.h"
#include<linux/msg.h>
/*************************************************************
@@ -166,13 +165,13 @@
LOGI("%s %d", __FUNCTION__, __LINE__);
char send_buf[1024];
-
+
mbtk_at_ftp_par_at.at_ftp_handle = mbtk_ftp_init(mbtk_at_ftp_par_at.host, mbtk_at_ftp_par_at.port, mbtk_at_ftp_par_at.auth_type,
0, mbtk_at_ftp_par_at.use_cert);
mbtk_ftp_data_type_set(mbtk_at_ftp_par_at.at_ftp_handle,mbtk_at_ftp_par_at.ftp_type);//FTP_DATA_TYPE_I = 2 FTP_DATA_TYPE_A = 0
if(mbtk_at_ftp_par_at.at_ftp_handle < 0)
at_ftp_ret = -1;
-
+
at_ftp_ret = mbtk_ftp_login(mbtk_at_ftp_par_at.at_ftp_handle,mbtk_at_ftp_par_at.name,mbtk_at_ftp_par_at.pass);
if(at_ftp_ret != 0)
{
@@ -230,7 +229,7 @@
default:
break;
}
-
+
mbtk_at_printf(send_buf);
mbtk_at_printf("end");
mbtk_ftp_quit(mbtk_at_ftp_par_at.at_ftp_handle);
@@ -243,19 +242,19 @@
int at_ftp_ret=-1;
int len_size;
char send_buf[1024];
-
+
mbtk_at_ftp_par_at.at_ftp_handle = mbtk_ftp_init(mbtk_at_ftp_par_at.host, mbtk_at_ftp_par_at.port, mbtk_at_ftp_par_at.auth_type,
0, mbtk_at_ftp_par_at.use_cert);
mbtk_ftp_data_type_set(mbtk_at_ftp_par_at.at_ftp_handle,mbtk_at_ftp_par_at.ftp_type);//FTP_DATA_TYPE_I = 2 FTP_DATA_TYPE_A = 0
if(mbtk_at_ftp_par_at.at_ftp_handle < 0)
at_ftp_ret = -1;
-
+
at_ftp_ret = mbtk_ftp_login(mbtk_at_ftp_par_at.at_ftp_handle,mbtk_at_ftp_par_at.name,mbtk_at_ftp_par_at.pass);
if(at_ftp_ret != 0)
{
printf("ftp_login err:%d\n",at_ftp_ret);
}
-
+
memset(mbtk_at_ftp_par_at.remote_path, 0, strlen(mbtk_at_ftp_par_at.remote_path)+1);
memcpy(mbtk_at_ftp_par_at.remote_path, remote_path, strlen(remote_path)+1);
if(local_path!=NULL)
@@ -288,7 +287,7 @@
printf("+CFTPPUT: FAIL,<%d>\n",at_ftp_ret);
sprintf(send_buf,"+CFTPPUT: FAIL,<%d>\n",at_ftp_ret);
}
- else
+ else
{
at_ftp_ret = mbtk_ftp_upload_send(mbtk_at_ftp_par_at.at_ftp_handle,"" ,size_byte);
if(at_ftp_ret != 0)
@@ -359,7 +358,7 @@
memset(resp_buf,0,2150);
memcpy(resp_buf,data,data_len);
mbtk_at_printf(resp_buf);
-
+
memset(resp_buf,0,2150);
sprintf(resp_buf, "<%d>", data_len);
mbtk_at_printf(resp_buf);
@@ -372,13 +371,13 @@
int at_ftp_ret=-1;
int len_size;
-
+
mbtk_at_ftp_par_at.at_ftp_handle = mbtk_ftp_init(mbtk_at_ftp_par_at.host, mbtk_at_ftp_par_at.port, mbtk_at_ftp_par_at.auth_type,
0, mbtk_at_ftp_par_at.use_cert);
mbtk_ftp_data_type_set(mbtk_at_ftp_par_at.at_ftp_handle,mbtk_at_ftp_par_at.ftp_type);//FTP_DATA_TYPE_I = 2 FTP_DATA_TYPE_A = 0
if(mbtk_at_ftp_par_at.at_ftp_handle < 0)
at_ftp_ret = -1;
-
+
at_ftp_ret = mbtk_ftp_login(mbtk_at_ftp_par_at.at_ftp_handle,mbtk_at_ftp_par_at.name,mbtk_at_ftp_par_at.pass);
if(at_ftp_ret != 0)
{
@@ -394,14 +393,14 @@
}
mbtk_at_ftp_par_at.rest_size = rest_size;
mbtk_at_ftp_par_at.read_size = read_size;
-
+
// Download file: /data
uint32 len_count = 0;
uint32 len;
int download_time = 0;
char resp_buf[1024];
int ret;
-
+
uint32 file_size = mbtk_ftp_file_size(mbtk_at_ftp_par_at.at_ftp_handle, remote_path);
if(file_size > 0)
{
@@ -471,7 +470,7 @@
mbtk_at_printf(resp_buf);
*/
}
-
+
printf("Download complete - [%d / %d].\n",len_count, file_size);
memset(resp_buf,0,1024);
sprintf(resp_buf, "+CFTPGETFILE: SUCCESS,<%d>\r\n",len_count);
@@ -496,11 +495,11 @@
goto exit;
}
-
+
exit:
if(file_size != len_count)
mbtk_at_ftp_par_at.rest_size = len_count;
-
+
//mbtk_at_printf(resp_buf);
mbtk_at_printf("end");
mbtk_ftp_quit(mbtk_at_ftp_par_at.at_ftp_handle);
@@ -525,13 +524,13 @@
int at_ftp_ret=-1;
int len_size;
char resp_buf[1024];
-
+
mbtk_at_ftp_par_at.at_ftp_handle = mbtk_ftp_init(mbtk_at_ftp_par_at.host, mbtk_at_ftp_par_at.port, mbtk_at_ftp_par_at.auth_type,
0, mbtk_at_ftp_par_at.use_cert);
mbtk_ftp_data_type_set(mbtk_at_ftp_par_at.at_ftp_handle,mbtk_at_ftp_par_at.ftp_type);//FTP_DATA_TYPE_I = 2 FTP_DATA_TYPE_A = 0
if(mbtk_at_ftp_par_at.at_ftp_handle < 0)
at_ftp_ret = -1;
-
+
at_ftp_ret = mbtk_ftp_login(mbtk_at_ftp_par_at.at_ftp_handle,mbtk_at_ftp_par_at.name,mbtk_at_ftp_par_at.pass);
if(at_ftp_ret != 0)
{
@@ -540,7 +539,7 @@
memset(mbtk_at_ftp_par_at.remote_path, 0, strlen(mbtk_at_ftp_par_at.remote_path)+1);
memcpy(mbtk_at_ftp_par_at.remote_path, ftp_path, strlen(ftp_path)+1);
-
+
at_ftp_ret = mbtk_ftp_cd(mbtk_at_ftp_par_at.at_ftp_handle, ftp_path);
if(FTP_ERR_SUCCESS != at_ftp_ret) {
printf("mbtk_ftp_cd() fail:%d\n", at_ftp_ret);
diff --git a/mbtk/libmbtk_gnss/Makefile b/mbtk/libmbtk_gnss/Makefile
new file mode 100755
index 0000000..71eeae3
--- /dev/null
+++ b/mbtk/libmbtk_gnss/Makefile
@@ -0,0 +1,39 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_ftp
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib -lmbtk_net
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+MY_FILES_PATH:=$(LOCAL_PATH)
+MY_FILES_SUFFIX:=%.c %.cpp
+My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_ftp.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/src/mbtk_gnss_5311.c b/mbtk/libmbtk_gnss/mbtk_gnss_5311.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_gnss_5311.c
rename to mbtk/libmbtk_gnss/mbtk_gnss_5311.c
diff --git a/mbtk/mbtk_lib/src/mbtk_gnss_6228.c b/mbtk/libmbtk_gnss/mbtk_gnss_6228.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_gnss_6228.c
rename to mbtk/libmbtk_gnss/mbtk_gnss_6228.c
diff --git a/mbtk/mbtk_lib/src/mbtk_gnss_update.c b/mbtk/libmbtk_gnss/mbtk_gnss_update.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_gnss_update.c
rename to mbtk/libmbtk_gnss/mbtk_gnss_update.c
diff --git a/mbtk/libmbtk_http/Makefile b/mbtk/libmbtk_http/Makefile
new file mode 100755
index 0000000..417ffe6
--- /dev/null
+++ b/mbtk/libmbtk_http/Makefile
@@ -0,0 +1,39 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_http
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib -lmbtk_net
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+MY_FILES_PATH:=$(LOCAL_PATH)
+MY_FILES_SUFFIX:=%.c %.cpp
+My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_http.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/src/mbtk_http.c b/mbtk/libmbtk_http/mbtk_http.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_http.c
rename to mbtk/libmbtk_http/mbtk_http.c
diff --git a/mbtk/mbtk_lib/src/mbtk_http_base.c b/mbtk/libmbtk_http/mbtk_http_base.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_http_base.c
rename to mbtk/libmbtk_http/mbtk_http_base.c
diff --git a/mbtk/mbtk_lib/inc/mbtk_http_base.h b/mbtk/libmbtk_http/mbtk_http_base.h
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_lib/inc/mbtk_http_base.h
rename to mbtk/libmbtk_http/mbtk_http_base.h
diff --git a/mbtk/mbtk_lib/src/mbtk_http_chunks.c b/mbtk/libmbtk_http/mbtk_http_chunks.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_http_chunks.c
rename to mbtk/libmbtk_http/mbtk_http_chunks.c
diff --git a/mbtk/mbtk_lib/inc/mbtk_http_chunks.h b/mbtk/libmbtk_http/mbtk_http_chunks.h
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_lib/inc/mbtk_http_chunks.h
rename to mbtk/libmbtk_http/mbtk_http_chunks.h
diff --git a/mbtk/libmbtk_lib/Makefile b/mbtk/libmbtk_lib/Makefile
new file mode 100755
index 0000000..fe71e7e
--- /dev/null
+++ b/mbtk/libmbtk_lib/Makefile
@@ -0,0 +1,68 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_lib
+
+INC_DIR += \
+ -I$(LOCAL_PATH)/inc
+
+LIB_DIR +=
+
+LIBS += -llog -lubus -lubox -luci -lprop2uci -lrilutil -lblobmsg_json
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+DEFINE += -DMBTK_NET_MONITOR_SUPPORT
+
+MY_FILES_PATH:=$(LOCAL_PATH)/src
+#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
+#MY_FILES_PATH += $(LOCAL_PATH)/ql
+#endif
+
+#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
+#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
+#endif
+
+#MY_FILES_SUFFIX:=%.c %.cpp
+#My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+#MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+#MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+#LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+LOCAL_SRC_FILES = src/ds_ASBuffer.cpp \
+ src/ds_ASString.cpp \
+ src/mbtk_at.c \
+ src/mbtk_bs_position.c \
+ src/mbtk_file.c \
+ src/mbtk_list.c \
+ src/mbtk_log.c \
+ src/mbtk_map.c \
+ src/mbtk_ntp.c \
+ src/mbtk_queue.c \
+ src/mbtk_str.c \
+ src/mbtk_task.c \
+ src/mbtk_utf.c \
+ src/mbtk_utils.c \
+ src/ringbuffer.c \
+ src/mbtk_mtd.c \
+ src/mbtk_device_info.c
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_lib.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/src/ds_ASBuffer.cpp b/mbtk/libmbtk_lib/src/ds_ASBuffer.cpp
similarity index 100%
rename from mbtk/mbtk_lib/src/ds_ASBuffer.cpp
rename to mbtk/libmbtk_lib/src/ds_ASBuffer.cpp
diff --git a/mbtk/mbtk_lib/src/ds_ASString.cpp b/mbtk/libmbtk_lib/src/ds_ASString.cpp
similarity index 100%
rename from mbtk/mbtk_lib/src/ds_ASString.cpp
rename to mbtk/libmbtk_lib/src/ds_ASString.cpp
diff --git a/mbtk/mbtk_lib/src/mbtk_alarm.c b/mbtk/libmbtk_lib/src/mbtk_alarm.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_alarm.c
rename to mbtk/libmbtk_lib/src/mbtk_alarm.c
diff --git a/mbtk/mbtk_lib/src/mbtk_at.c b/mbtk/libmbtk_lib/src/mbtk_at.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_at.c
rename to mbtk/libmbtk_lib/src/mbtk_at.c
diff --git a/mbtk/mbtk_lib/src/mbtk_bs_position.c b/mbtk/libmbtk_lib/src/mbtk_bs_position.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_bs_position.c
rename to mbtk/libmbtk_lib/src/mbtk_bs_position.c
diff --git a/mbtk/mbtk_lib/src/mbtk_device_info.c b/mbtk/libmbtk_lib/src/mbtk_device_info.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_device_info.c
rename to mbtk/libmbtk_lib/src/mbtk_device_info.c
diff --git a/mbtk/mbtk_lib/src/mbtk_file.c b/mbtk/libmbtk_lib/src/mbtk_file.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_file.c
rename to mbtk/libmbtk_lib/src/mbtk_file.c
diff --git a/mbtk/mbtk_lib/src/mbtk_list.c b/mbtk/libmbtk_lib/src/mbtk_list.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_list.c
rename to mbtk/libmbtk_lib/src/mbtk_list.c
diff --git a/mbtk/mbtk_lib/src/mbtk_log.c b/mbtk/libmbtk_lib/src/mbtk_log.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_log.c
rename to mbtk/libmbtk_lib/src/mbtk_log.c
diff --git a/mbtk/mbtk_lib/src/mbtk_map.c b/mbtk/libmbtk_lib/src/mbtk_map.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_map.c
rename to mbtk/libmbtk_lib/src/mbtk_map.c
diff --git a/mbtk/mbtk_lib/src/mbtk_mtd.c b/mbtk/libmbtk_lib/src/mbtk_mtd.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_mtd.c
rename to mbtk/libmbtk_lib/src/mbtk_mtd.c
diff --git a/mbtk/mbtk_lib/src/mbtk_ntp.c b/mbtk/libmbtk_lib/src/mbtk_ntp.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_ntp.c
rename to mbtk/libmbtk_lib/src/mbtk_ntp.c
diff --git a/mbtk/mbtk_lib/src/mbtk_queue.c b/mbtk/libmbtk_lib/src/mbtk_queue.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_queue.c
rename to mbtk/libmbtk_lib/src/mbtk_queue.c
diff --git a/mbtk/mbtk_lib/src/mbtk_str.c b/mbtk/libmbtk_lib/src/mbtk_str.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_str.c
rename to mbtk/libmbtk_lib/src/mbtk_str.c
diff --git a/mbtk/mbtk_lib/src/mbtk_task.c b/mbtk/libmbtk_lib/src/mbtk_task.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_task.c
rename to mbtk/libmbtk_lib/src/mbtk_task.c
diff --git a/mbtk/mbtk_lib/src/mbtk_utf.c b/mbtk/libmbtk_lib/src/mbtk_utf.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_utf.c
rename to mbtk/libmbtk_lib/src/mbtk_utf.c
diff --git a/mbtk/mbtk_lib/src/mbtk_utils.c b/mbtk/libmbtk_lib/src/mbtk_utils.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_utils.c
rename to mbtk/libmbtk_lib/src/mbtk_utils.c
diff --git a/mbtk/mbtk_lib/src/ringbuffer.c b/mbtk/libmbtk_lib/src/ringbuffer.c
similarity index 100%
rename from mbtk/mbtk_lib/src/ringbuffer.c
rename to mbtk/libmbtk_lib/src/ringbuffer.c
diff --git a/mbtk/mbtk_mqtt/MQTTClient.c b/mbtk/libmbtk_mqtt/MQTTClient.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTClient.c
rename to mbtk/libmbtk_mqtt/MQTTClient.c
diff --git a/mbtk/mbtk_mqtt/MQTTClient.h b/mbtk/libmbtk_mqtt/MQTTClient.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTClient.h
rename to mbtk/libmbtk_mqtt/MQTTClient.h
diff --git a/mbtk/mbtk_mqtt/MQTTLinux.c b/mbtk/libmbtk_mqtt/MQTTLinux.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTLinux.c
rename to mbtk/libmbtk_mqtt/MQTTLinux.c
diff --git a/mbtk/mbtk_mqtt/MQTTLinux.h b/mbtk/libmbtk_mqtt/MQTTLinux.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTLinux.h
rename to mbtk/libmbtk_mqtt/MQTTLinux.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTConnect.h b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTConnect.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTConnect.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTConnect.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTConnectClient.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTConnectClient.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTConnectClient.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTConnectClient.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTConnectServer.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTConnectServer.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTConnectServer.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTConnectServer.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTDeserializePublish.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTDeserializePublish.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTDeserializePublish.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTDeserializePublish.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTFormat.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTFormat.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTFormat.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTFormat.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTFormat.h b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTFormat.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTFormat.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTFormat.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTPacket.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTPacket.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTPacket.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTPacket.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTPacket.h b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTPacket.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTPacket.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTPacket.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTPublish.h b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTPublish.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTPublish.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTPublish.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTSerializePublish.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTSerializePublish.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTSerializePublish.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTSerializePublish.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTSubscribe.h b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTSubscribe.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTSubscribe.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTSubscribe.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTSubscribeClient.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTSubscribeClient.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTSubscribeClient.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTSubscribeClient.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTSubscribeServer.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTSubscribeServer.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTSubscribeServer.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTSubscribeServer.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTUnsubscribe.h b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTUnsubscribe.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTUnsubscribe.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTUnsubscribe.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTUnsubscribeClient.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTUnsubscribeClient.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTUnsubscribeClient.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTUnsubscribeClient.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/MQTTUnsubscribeServer.c b/mbtk/libmbtk_mqtt/MQTTPacket/MQTTUnsubscribeServer.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/MQTTUnsubscribeServer.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/MQTTUnsubscribeServer.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/StackTrace.h b/mbtk/libmbtk_mqtt/MQTTPacket/StackTrace.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/StackTrace.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/StackTrace.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/core_sha1.c b/mbtk/libmbtk_mqtt/MQTTPacket/core_sha1.c
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/core_sha1.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/core_sha1.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/core_sha1.h b/mbtk/libmbtk_mqtt/MQTTPacket/core_sha1.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/core_sha1.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/core_sha1.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/core_sha256.c b/mbtk/libmbtk_mqtt/MQTTPacket/core_sha256.c
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/core_sha256.c
rename to mbtk/libmbtk_mqtt/MQTTPacket/core_sha256.c
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/core_sha256.h b/mbtk/libmbtk_mqtt/MQTTPacket/core_sha256.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/core_sha256.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/core_sha256.h
diff --git a/mbtk/mbtk_mqtt/MQTTPacket/core_stdinc.h b/mbtk/libmbtk_mqtt/MQTTPacket/core_stdinc.h
similarity index 100%
rename from mbtk/mbtk_mqtt/MQTTPacket/core_stdinc.h
rename to mbtk/libmbtk_mqtt/MQTTPacket/core_stdinc.h
diff --git a/mbtk/mbtk_mqtt/Makefile b/mbtk/libmbtk_mqtt/Makefile
similarity index 85%
rename from mbtk/mbtk_mqtt/Makefile
rename to mbtk/libmbtk_mqtt/Makefile
index 4c89d96..f33a5b6 100755
--- a/mbtk/mbtk_mqtt/Makefile
+++ b/mbtk/libmbtk_mqtt/Makefile
@@ -1,14 +1,14 @@
ROOT = $(shell pwd)/../..
include ../Make.defines
-LOCAL_PATH=$(BUILD_ROOT)/mbtk_mqtt
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_mqtt
INC_DIR += -I. \
-I$(LOCAL_PATH)/MQTTPacket
LIB_DIR +=
-LIBS += -llog -lmbtk_lib
+LIBS += -llog -lmbtk_lib -lmbtk_net -lmbtk_http
CFLAGS += -shared -Wl,-shared,-Bsymbolic
@@ -29,7 +29,7 @@
OBJS = $(patsubst %.c, %.o, $(LOCAL_SRC_FILES))
$(info OBJS = $(OBJS))
-dtarget := $(OUT_DIR)/lib/libmbtk_mqtt_lib.so
+dtarget := $(OUT_DIR)/lib/libmbtk_mqtt.so
all: $(dtarget)
@@ -38,7 +38,7 @@
%.o:%.c
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
-
+
%.o:%.cpp
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
diff --git a/mbtk/mbtk_mqtt/mbtk_mqtt.c b/mbtk/libmbtk_mqtt/mbtk_mqtt.c
similarity index 100%
rename from mbtk/mbtk_mqtt/mbtk_mqtt.c
rename to mbtk/libmbtk_mqtt/mbtk_mqtt.c
diff --git a/mbtk/libmbtk_net/Makefile b/mbtk/libmbtk_net/Makefile
new file mode 100755
index 0000000..09f62e5
--- /dev/null
+++ b/mbtk/libmbtk_net/Makefile
@@ -0,0 +1,47 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_net
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib -lprop2uci
+
+ifeq ($(BUILD_PLATFORM), asr1803)
+LIBS += -lpolarssl
+else
+LIBS += -lssl -lcrypto
+endif
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+DEFINE += -DMBTK_NET_MONITOR_SUPPORT
+
+MY_FILES_PATH:=$(LOCAL_PATH)
+MY_FILES_SUFFIX:=%.c %.cpp
+My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_net.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/src/mbtk_dhcp.c b/mbtk/libmbtk_net/mbtk_dhcp.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_dhcp.c
rename to mbtk/libmbtk_net/mbtk_dhcp.c
diff --git a/mbtk/mbtk_lib/src/mbtk_ifc.c b/mbtk/libmbtk_net/mbtk_ifc.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_ifc.c
rename to mbtk/libmbtk_net/mbtk_ifc.c
diff --git a/mbtk/mbtk_lib/src/mbtk_net_control.c b/mbtk/libmbtk_net/mbtk_net_control.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_net_control.c
rename to mbtk/libmbtk_net/mbtk_net_control.c
diff --git a/mbtk/mbtk_lib/src/mbtk_sock.c b/mbtk/libmbtk_net/mbtk_sock.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_sock.c
rename to mbtk/libmbtk_net/mbtk_sock.c
diff --git a/mbtk/mbtk_lib/src/mbtk_sock2.c b/mbtk/libmbtk_net/mbtk_sock2.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_sock2.c
rename to mbtk/libmbtk_net/mbtk_sock2.c
diff --git a/mbtk/mbtk_lib/inc/mbtk_sock_internal.h b/mbtk/libmbtk_net/mbtk_sock_internal.h
similarity index 100%
rename from mbtk/mbtk_lib/inc/mbtk_sock_internal.h
rename to mbtk/libmbtk_net/mbtk_sock_internal.h
diff --git a/mbtk/libmbtk_ril/Makefile b/mbtk/libmbtk_ril/Makefile
new file mode 100755
index 0000000..26203d4
--- /dev/null
+++ b/mbtk/libmbtk_ril/Makefile
@@ -0,0 +1,36 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_ril
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib -lmbtk_net
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+LOCAL_SRC_FILES = $(wildcard *.cpp) $(wildcard *.c)
+OBJS = $(patsubst %.c, %.o, $(LOCAL_SRC_FILES))
+$(info OBJS = $(OBJS))
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_ril.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/inc/mbtk_alphabet.h b/mbtk/libmbtk_ril/mbtk_alphabet.h
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_lib/inc/mbtk_alphabet.h
rename to mbtk/libmbtk_ril/mbtk_alphabet.h
diff --git a/mbtk/mbtk_lib/src/mbtk_info.c b/mbtk/libmbtk_ril/mbtk_info.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_info.c
rename to mbtk/libmbtk_ril/mbtk_info.c
diff --git a/mbtk/mbtk_lib/inc/mbtk_info.h b/mbtk/libmbtk_ril/mbtk_info.h
similarity index 100%
rename from mbtk/mbtk_lib/inc/mbtk_info.h
rename to mbtk/libmbtk_ril/mbtk_info.h
diff --git a/mbtk/mbtk_lib/src/mbtk_info_api.c b/mbtk/libmbtk_ril/mbtk_info_api.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_info_api.c
rename to mbtk/libmbtk_ril/mbtk_info_api.c
diff --git a/mbtk/mbtk_lib/src/mbtk_pdu_sms.c b/mbtk/libmbtk_ril/mbtk_pdu_sms.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_pdu_sms.c
rename to mbtk/libmbtk_ril/mbtk_pdu_sms.c
diff --git a/mbtk/libmbtk_tcpip/Makefile b/mbtk/libmbtk_tcpip/Makefile
new file mode 100755
index 0000000..3396400
--- /dev/null
+++ b/mbtk/libmbtk_tcpip/Makefile
@@ -0,0 +1,39 @@
+ROOT = $(shell pwd)/../..
+include ../Make.defines
+
+LOCAL_PATH=$(BUILD_ROOT)/libmbtk_tcpip
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -llog -lmbtk_lib -lmbtk_net
+
+CFLAGS += -shared -Wl,-shared,-Bsymbolic
+
+MY_FILES_PATH:=$(LOCAL_PATH)
+MY_FILES_SUFFIX:=%.c %.cpp
+My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
+MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
+MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
+LOCAL_SRC_FILES += $(MY_SRC_LIST)
+
+OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
+$(info OBJS = $(OBJS))
+
+dtarget := $(OUT_DIR)/lib/libmbtk_tcpip.so
+
+all: $(dtarget)
+
+$(dtarget):$(OBJS)
+ $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS) $(dtarget)
+
diff --git a/mbtk/mbtk_lib/src/mbtk_tcpip_at.c b/mbtk/libmbtk_tcpip/mbtk_tcpip_at.c
similarity index 100%
rename from mbtk/mbtk_lib/src/mbtk_tcpip_at.c
rename to mbtk/libmbtk_tcpip/mbtk_tcpip_at.c
diff --git a/mbtk/mbtk_audio_lib/Makefile b/mbtk/libql_lib/Makefile
similarity index 87%
rename from mbtk/mbtk_audio_lib/Makefile
rename to mbtk/libql_lib/Makefile
index 01d734d..cb50bb7 100755
--- a/mbtk/mbtk_audio_lib/Makefile
+++ b/mbtk/libql_lib/Makefile
@@ -1,13 +1,13 @@
ROOT = $(shell pwd)/../..
include ../Make.defines
-LOCAL_PATH=$(BUILD_ROOT)/mbtk_audio_lib
+LOCAL_PATH=$(BUILD_ROOT)/libql_lib
-INC_DIR += -I$(BUILD_ROOT)/mbtk_lib/inc
+INC_DIR +=
LIB_DIR +=
-LIBS += -llog -lubus -lubox -lblobmsg_json -lrilutil -lmbtk_lib -lcutils -laudio-apu
+LIBS += -llog -lubus -lubox -lblobmsg_json -lrilutil -lmbtk_lib -lmbtk_ril -lmbtk_fota -lmbtk_http -lmbtk_factory -lmbtk_audio
CFLAGS += -shared -Wl,-shared,-Bsymbolic
@@ -33,7 +33,7 @@
OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
$(info OBJS = $(OBJS))
-dtarget := $(OUT_DIR)/lib/libmbtk_audio_lib.so
+dtarget := $(OUT_DIR)/lib/libql_lib.so
all: $(dtarget)
diff --git a/mbtk/ql_lib/src/ql_adc.c b/mbtk/libql_lib/src/ql_adc.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_adc.c
rename to mbtk/libql_lib/src/ql_adc.c
diff --git a/mbtk/ql_lib/src/ql_atc.c b/mbtk/libql_lib/src/ql_atc.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_atc.c
rename to mbtk/libql_lib/src/ql_atc.c
diff --git a/mbtk/ql_lib/src/ql_audio.c b/mbtk/libql_lib/src/ql_audio.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_audio.c
rename to mbtk/libql_lib/src/ql_audio.c
diff --git a/mbtk/ql_lib/src/ql_call.c b/mbtk/libql_lib/src/ql_call.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_call.c
rename to mbtk/libql_lib/src/ql_call.c
diff --git a/mbtk/ql_lib/src/ql_cell_locator.c b/mbtk/libql_lib/src/ql_cell_locator.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_cell_locator.c
rename to mbtk/libql_lib/src/ql_cell_locator.c
diff --git a/mbtk/ql_lib/src/ql_common.c b/mbtk/libql_lib/src/ql_common.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_common.c
rename to mbtk/libql_lib/src/ql_common.c
diff --git a/mbtk/ql_lib/src/ql_data_call.c b/mbtk/libql_lib/src/ql_data_call.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_data_call.c
rename to mbtk/libql_lib/src/ql_data_call.c
diff --git a/mbtk/ql_lib/src/ql_dev_api.c b/mbtk/libql_lib/src/ql_dev_api.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_dev_api.c
rename to mbtk/libql_lib/src/ql_dev_api.c
diff --git a/mbtk/ql_lib/src/ql_fota.c b/mbtk/libql_lib/src/ql_fota.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_fota.c
rename to mbtk/libql_lib/src/ql_fota.c
diff --git a/mbtk/ql_lib/src/ql_gpio.c b/mbtk/libql_lib/src/ql_gpio.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_gpio.c
rename to mbtk/libql_lib/src/ql_gpio.c
diff --git a/mbtk/ql_lib/src/ql_i2c.c b/mbtk/libql_lib/src/ql_i2c.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_i2c.c
rename to mbtk/libql_lib/src/ql_i2c.c
diff --git a/mbtk/ql_lib/src/ql_quec_nw.c b/mbtk/libql_lib/src/ql_quec_nw.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_quec_nw.c
rename to mbtk/libql_lib/src/ql_quec_nw.c
diff --git a/mbtk/ql_lib/src/ql_quec_sim.c b/mbtk/libql_lib/src/ql_quec_sim.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_quec_sim.c
rename to mbtk/libql_lib/src/ql_quec_sim.c
diff --git a/mbtk/ql_lib/src/ql_sleep_wakelock.c b/mbtk/libql_lib/src/ql_sleep_wakelock.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_sleep_wakelock.c
rename to mbtk/libql_lib/src/ql_sleep_wakelock.c
diff --git a/mbtk/ql_lib/src/ql_sms.c b/mbtk/libql_lib/src/ql_sms.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_sms.c
rename to mbtk/libql_lib/src/ql_sms.c
diff --git a/mbtk/ql_lib/src/ql_spi.c b/mbtk/libql_lib/src/ql_spi.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_spi.c
rename to mbtk/libql_lib/src/ql_spi.c
diff --git a/mbtk/ql_lib/src/ql_uart.c b/mbtk/libql_lib/src/ql_uart.c
similarity index 100%
rename from mbtk/ql_lib/src/ql_uart.c
rename to mbtk/libql_lib/src/ql_uart.c
diff --git a/mbtk/ql_lib/src/ql_voice.c b/mbtk/libql_lib/src/ql_voice.c
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/ql_lib/src/ql_voice.c
rename to mbtk/libql_lib/src/ql_voice.c
diff --git a/mbtk/mbtk_adbd/Makefile b/mbtk/mbtk_adbd/Makefile
index 4420021..8af5c6c 100755
--- a/mbtk/mbtk_adbd/Makefile
+++ b/mbtk/mbtk_adbd/Makefile
@@ -5,12 +5,12 @@
INC_DIR += \
-I$(LOCAL_PATH)/inc
-
+
LIB_DIR +=
LIBS += -lmbtk_lib -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm
-CFLAGS +=
+CFLAGS +=
DEFINE +=
@@ -38,4 +38,4 @@
$(CC) $(CFLAGS) $(LOCAL_SRC_FILES) -o $@ $(DEFINE) $(INC_DIR) $(LIB_DIR) $(LIBS)
clean:
-
+
diff --git a/mbtk/mbtk_lib/Makefile b/mbtk/mbtk_lib/Makefile
deleted file mode 100755
index 64caae9..0000000
--- a/mbtk/mbtk_lib/Makefile
+++ /dev/null
@@ -1,128 +0,0 @@
-ROOT = $(shell pwd)/../..
-include ../Make.defines
-
-LOCAL_PATH=$(BUILD_ROOT)/mbtk_lib
-
-INC_DIR += \
- -I$(LOCAL_PATH)/inc
-
-LIB_DIR +=
-
-LIBS += -llog -lubus -lubox -luci -lprop2uci -lrilutil -lblobmsg_json
-
-ifeq ($(BUILD_PLATFORM), asr1803)
-LIBS += -lcutils -laudio-apu
-endif
-
-ifeq ($(BUILD_PLATFORM), asr1803)
-LIBS += -lpolarssl \
- -lavcodec \
- -lavdevice \
- -lavfilter \
- -lavformat \
- -lavutil \
- -lpostproc \
- -lswresample \
- -lswscale
-else
-LIBS += -lssl -lcrypto
-endif
-
-CFLAGS += -shared -Wl,-shared,-Bsymbolic
-
-DEFINE += -DMBTK_NET_MONITOR_SUPPORT
-
-MY_FILES_PATH:=$(LOCAL_PATH)/src
-#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
-#MY_FILES_PATH += $(LOCAL_PATH)/ql
-#endif
-
-#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
-#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
-#endif
-
-#MY_FILES_SUFFIX:=%.c %.cpp
-#My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
-#MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
-#MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
-#LOCAL_SRC_FILES += $(MY_SRC_LIST)
-
-LOCAL_SRC_FILES = src/ds_ASBuffer.cpp \
- src/ds_ASString.cpp \
- src/g711_pcm_convert.c \
- src/mbtk_adc.c \
- src/mbtk_at.c \
- src/mbtk_basic_at_wrapper.c \
- src/mbtk_bs_position.c \
- src/mbtk_coap_api.cpp \
- src/mbtk_coap.c \
- src/mbtk_coap_pdu.cpp \
- src/mbtk_dhcp.c \
- src/mbtk_file.c \
- src/mbtk_ftp_at.c \
- src/mbtk_ftp.c \
- src/mbtk_gpio.c \
- src/mbtk_http_base.c \
- src/mbtk_http.c \
- src/mbtk_http_chunks.c \
- src/mbtk_ifc.c \
- src/mbtk_info_api.c \
- src/mbtk_info.c \
- src/mbtk_list.c \
- src/mbtk_log.c \
- src/mbtk_map.c \
- src/mbtk_net_control.c \
- src/mbtk_ntp.c \
- src/mbtk_pdu_sms.c \
- src/mbtk_queue.c \
- src/mbtk_sock2.c \
- src/mbtk_sock.c \
- src/mbtk_str.c \
- src/mbtk_task.c \
- src/mbtk_tcpip_at.c \
- src/mbtk_utf.c \
- src/mbtk_utils.c \
- src/mbtk_fota.c \
- src/ringbuffer.c \
- src/mbtk_mtd.c \
- src/mbtk_device_info.c \
- src/mbtk_audio_gain.c
-
-ifeq ($(BUILD_PLATFORM), asr1803)
-LOCAL_SRC_FILES += \
- src/mbtk_audio_alsa.c \
- src/mbtk_audio.c
-
-ifeq ($(BUILD_BRANCH), rls3671)
-LOCAL_SRC_FILES += src/mbtk_mp3_to_wav.c
-endif
-endif
-
-ifeq ($(MBTK_GNSS_MODE), gnss_6228)
-LOCAL_SRC_FILES += src/mbtk_gnss_6228.c \
- src/mbtk_gnss_update.c
-endif
-
-ifeq ($(MBTK_GNSS_MODE), gnss_5311)
-LOCAL_SRC_FILES += src/mbtk_gnss_5311.c
-endif
-
-OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
-$(info OBJS = $(OBJS))
-
-dtarget := $(OUT_DIR)/lib/libmbtk_lib.so
-
-all: $(dtarget)
-
-$(dtarget):$(OBJS)
- $(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
-
-%.o:%.c
- $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
-
-%.o:%.cpp
- $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
-
-clean:
- rm -f $(OBJS) $(dtarget)
-
diff --git a/mbtk/mbtk_logd/syslog_read.c b/mbtk/mbtk_logd/syslog_read.c
index 8b84cde..9df5f05 100755
--- a/mbtk/mbtk_logd/syslog_read.c
+++ b/mbtk/mbtk_logd/syslog_read.c
@@ -30,8 +30,9 @@
#include <libubox/usock.h>
#include <libubox/uloop.h>
#include "libubus.h"
-#include "syslog.h"
+#include "sys/syslog.h"
#include "log_config.h"
+//#include "lynq/liblog.h"
#define LOG_CONFIG_LEN 50
enum {
@@ -365,7 +366,7 @@
req.fd_cb = logread_fd_cb;
req.complete_cb = logread_complete_cb;
ubus_complete_request_async(ctx, &req);
-
+
uloop_run();
ubus_free(ctx);
uloop_done();
diff --git a/mbtk/mbtk_ril/Makefile b/mbtk/mbtk_rild/Makefile
similarity index 77%
rename from mbtk/mbtk_ril/Makefile
rename to mbtk/mbtk_rild/Makefile
index e75fe08..453bb19 100755
--- a/mbtk/mbtk_ril/Makefile
+++ b/mbtk/mbtk_rild/Makefile
@@ -1,17 +1,17 @@
ROOT = $(shell pwd)/../..
include ../Make.defines
-LOCAL_PATH=$(BUILD_ROOT)/mbtk_ril
+LOCAL_PATH=$(BUILD_ROOT)/mbtk_rild
INC_DIR += \
-I$(LOCAL_PATH)/inc \
- -I$(BUILD_ROOT)/mbtk_lib/inc
-
+ -I$(BUILD_ROOT)/libmbtk_ril
+
LIB_DIR +=
-LIBS += -lmbtk_lib -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm
+LIBS += -lmbtk_lib -lmbtk_net -lmbtk_ril -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm
-CFLAGS +=
+CFLAGS +=
DEFINE +=
@@ -28,7 +28,7 @@
OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
$(info OBJS = $(OBJS))
-dtarget := $(OUT_DIR)/bin/mbtk_ril
+dtarget := $(OUT_DIR)/bin/mbtk_rild
all: $(dtarget)
@@ -38,7 +38,7 @@
%.o:%.c
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
-
+
%.o:%.cpp
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
diff --git a/mbtk/mbtk_ril/inc/at_tok.h b/mbtk/mbtk_rild/inc/at_tok.h
similarity index 100%
rename from mbtk/mbtk_ril/inc/at_tok.h
rename to mbtk/mbtk_rild/inc/at_tok.h
diff --git a/mbtk/mbtk_ril/inc/atchannel.h b/mbtk/mbtk_rild/inc/atchannel.h
similarity index 100%
rename from mbtk/mbtk_ril/inc/atchannel.h
rename to mbtk/mbtk_rild/inc/atchannel.h
diff --git a/mbtk/mbtk_ril/inc/cust_info.h b/mbtk/mbtk_rild/inc/cust_info.h
similarity index 100%
rename from mbtk/mbtk_ril/inc/cust_info.h
rename to mbtk/mbtk_rild/inc/cust_info.h
diff --git a/mbtk/mbtk_ril/inc/info_data.h b/mbtk/mbtk_rild/inc/info_data.h
similarity index 100%
rename from mbtk/mbtk_ril/inc/info_data.h
rename to mbtk/mbtk_rild/inc/info_data.h
diff --git a/mbtk/mbtk_ril/inc/mbtk_led.h b/mbtk/mbtk_rild/inc/mbtk_led.h
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_ril/inc/mbtk_led.h
rename to mbtk/mbtk_rild/inc/mbtk_led.h
diff --git a/mbtk/mbtk_ril/src/at_tok.c b/mbtk/mbtk_rild/src/at_tok.c
similarity index 100%
rename from mbtk/mbtk_ril/src/at_tok.c
rename to mbtk/mbtk_rild/src/at_tok.c
diff --git a/mbtk/mbtk_ril/src/atchannel.c b/mbtk/mbtk_rild/src/atchannel.c
similarity index 100%
rename from mbtk/mbtk_ril/src/atchannel.c
rename to mbtk/mbtk_rild/src/atchannel.c
diff --git a/mbtk/mbtk_ril/src/main.c b/mbtk/mbtk_rild/src/main.c
similarity index 100%
rename from mbtk/mbtk_ril/src/main.c
rename to mbtk/mbtk_rild/src/main.c
diff --git a/mbtk/mbtk_ril/src/mbtk_call.c b/mbtk/mbtk_rild/src/mbtk_call.c
similarity index 100%
rename from mbtk/mbtk_ril/src/mbtk_call.c
rename to mbtk/mbtk_rild/src/mbtk_call.c
diff --git a/mbtk/mbtk_ril/src/mbtk_info_server.c b/mbtk/mbtk_rild/src/mbtk_info_server.c
similarity index 100%
rename from mbtk/mbtk_ril/src/mbtk_info_server.c
rename to mbtk/mbtk_rild/src/mbtk_info_server.c
diff --git a/mbtk/mbtk_ril/src/mbtk_led.c b/mbtk/mbtk_rild/src/mbtk_led.c
old mode 100644
new mode 100755
similarity index 100%
rename from mbtk/mbtk_ril/src/mbtk_led.c
rename to mbtk/mbtk_rild/src/mbtk_led.c
diff --git a/mbtk/mbtk_ril/src/mbtk_phonebook.c b/mbtk/mbtk_rild/src/mbtk_phonebook.c
similarity index 100%
rename from mbtk/mbtk_ril/src/mbtk_phonebook.c
rename to mbtk/mbtk_rild/src/mbtk_phonebook.c
diff --git a/mbtk/mbtk_ril/src/mbtk_sms.c b/mbtk/mbtk_rild/src/mbtk_sms.c
similarity index 100%
rename from mbtk/mbtk_ril/src/mbtk_sms.c
rename to mbtk/mbtk_rild/src/mbtk_sms.c
diff --git a/mbtk/ql_lib/Makefile b/mbtk/ql_lib/Makefile
deleted file mode 100755
index db8e557..0000000
--- a/mbtk/ql_lib/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-ROOT = $(shell pwd)/../..
-include ../Make.defines
-
-LOCAL_PATH=$(BUILD_ROOT)/ql_lib
-
-INC_DIR += -I$(BUILD_ROOT)/mbtk_lib/inc
-
-LIB_DIR +=
-
-LIBS += -llog -lubus -lubox -lblobmsg_json -lrilutil -lmbtk_lib
-
-CFLAGS += -shared -Wl,-shared,-Bsymbolic
-
-DEFINE +=
-
-MY_FILES_PATH:=$(LOCAL_PATH)/src
-#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
-#MY_FILES_PATH += $(LOCAL_PATH)/ql
-#endif
-
-#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
-#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
-#endif
-
-#MY_FILES_SUFFIX:=%.c %.cpp
-#My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
-#MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
-#MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
-
-LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp)
-$(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES))
-
-OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
-$(info OBJS = $(OBJS))
-
-dtarget := $(OUT_DIR)/lib/libql_lib.so
-
-all: $(dtarget)
-
-$(dtarget): $(OBJS)
- $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
-
-%.o:%.c
- $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
-
-%.o:%.cpp
- $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
-
-clean:
- rm -f $(OBJS) $(dtarget)
-