[Feature][ZXW-65]merged P49 base code

Change-Id: I3e09c0c3d47483bc645f02310380ecb7fc6f4041
diff --git a/ap/app/dlt-daemon/makefile b/ap/app/dlt-daemon/makefile
new file mode 100755
index 0000000..ea42076
--- /dev/null
+++ b/ap/app/dlt-daemon/makefile
@@ -0,0 +1,84 @@
+
+include $(COMMON_BASE_MK)
+
+NAME=dlt-daemon
+SRC_DIR=dlt-daemon-2.18.8
+INSTALL_DIR=$(APP_DIR)/$(NAME)/install
+BUILD_DIR=$(SRC_DIR)/build
+GEN_MAKEFILE=$(BUILD_DIR)/Makefile
+
+CONFIG_OPTS = -DCMAKE_SYSTEM_NAME=Linux
+CONFIG_OPTS += -DCMAKE_SYSTEM_PROCESSOR=arm
+CONFIG_OPTS += -DCMAKE_C_COMPILER=$(CROSS_COMPILE_PREFIX)gcc
+CONFIG_OPTS += -DCMAKE_CXX_COMPILER=$(CROSS_COMPILE_PREFIX)g++
+CONFIG_OPTS += -DCMAKE_AR=$(CROSS_COMPILE_PREFIX)ar
+CONFIG_OPTS += -DCMAKE_C_FLAGS=" -march=armv7-a  -g "
+CONFIG_OPTS += -DCMAKE_CXX_FLAGS=" -march=armv7-a  -g "
+CONFIG_OPTS += -DCMAKE_C_LINK_FLAGS=" -march=armv7-a  "
+CONFIG_OPTS += -DCMAKE_CXX_LINK_FLAGS=" -march=armv7-a  "
+CONFIG_OPTS += -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR)
+CONFIG_OPTS += -DCMAKE_INSTALL_LIBDIR=$(INSTALL_DIR)/lib
+CONFIG_OPTS += -DCONFIGURATION_FILES_DIR=$(INSTALL_DIR)/etc
+CONFIG_OPTS += -DRT_LIBRARY=$(CROSS_COMPILE_RT_LIBRARY)
+
+CONFIG_OPTS += -DWITH_SYSTEMD=OFF
+CONFIG_OPTS += -DWITH_SYSTEMD_WATCHDOG=OFF
+CONFIG_OPTS += -DWITH_SYSTEMD_JOURNAL=OFF
+CONFIG_OPTS += -DWITH_DOC=OFF
+CONFIG_OPTS += -DWITH_MAN=OFF
+CONFIG_OPTS += -DWITH_DLT_ADAPTOR=OFF
+CONFIG_OPTS += -DWITH_DLT_CONSOLE=OFF
+CONFIG_OPTS += -DWITH_DLT_EXAMPLES=OFF
+CONFIG_OPTS += -DWITH_DLT_SYSTEM=OFF
+CONFIG_OPTS += -DWITH_DLT_DBUS=OFF
+CONFIG_OPTS += -DWITH_DLT_TESTS=ON
+CONFIG_OPTS += -DWITH_DLT_UNIT_TESTS=OFF
+CONFIG_OPTS += -DWITH_DLT_SHM_ENABLE=OFF
+CONFIG_OPTS += -DWITH_DLTTEST=OFF
+CONFIG_OPTS += -DWITH_DLT_PKGCONFIG=ON
+CONFIG_OPTS += -DWITH_DLT_CXX11_EXT=OFF
+CONFIG_OPTS += -DWITH_DLT_COREDUMPHANDLER=OFF
+CONFIG_OPTS += -DWITH_DLT_KPI=OFF
+CONFIG_OPTS += -DWITH_DLT_FATAL_LOG_TRAP=OFF
+CONFIG_OPTS += -DWITH_CHECK_CONFIG_FILE=OFF
+CONFIG_OPTS += -DWITH_TESTSCRIPTS=OFF
+CONFIG_OPTS += -DWITH_GPROF=OFF
+CONFIG_OPTS += -DWITH_DLT_USE_IPv6=ON
+CONFIG_OPTS += -DDLT_USER=genivi
+CONFIG_OPTS += -DBUILD_SHARED_LIBS=ON
+CONFIG_OPTS += -DTARGET_CPU_NAME=
+#CONFIG_OPTS += -DCMAKE_INSTALL_PREFIX=/usr
+CONFIG_OPTS += -DCMAKE_BUILD_TYPE=RelWithDebInfo
+CONFIG_OPTS += -DCMAKE_HOST_SYSTEM_PROCESSOR=x86_64
+CONFIG_OPTS += -DCMAKE_SYSTEM_PROCESSOR=arm
+CONFIG_OPTS += -DWITH_DLT_LOGSTORAGE_CTRL_UDEV=OFF
+CONFIG_OPTS += -DDLT_IPC=UNIX_SOCKET
+CONFIG_OPTS += -DWITH_UDP_CONNECTION=OFF
+CONFIG_OPTS += -DWITH_DLT_DISABLE_MACRO=OFF
+
+CONFIG_OPTS += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
+
+
+all: $(GEN_MAKEFILE)
+	make -C $(BUILD_DIR) all
+	make -C $(BUILD_DIR) install
+
+$(GEN_MAKEFILE):
+	mkdir -p $(BUILD_DIR)
+	cd $(BUILD_DIR); cmake  $(CONFIG_OPTS)  ..
+
+clean:
+	-rm -fr $(BUILD_DIR) $(INSTALL_DIR)
+
+romfs:
+	$(ROMFSINST) $(INSTALL_DIR)/bin/dlt-daemon /bin/dlt-daemon
+	$(ROMFSINST) $(INSTALL_DIR)/bin/dlt-test-user /bin/dlt-test-user
+	$(ROMFSINST) $(INSTALL_DIR)/etc/dlt.conf /etc/dlt.conf
+	cd $(INSTALL_DIR)/lib; \
+	for i in *.so*; do \
+		if [ -L $$i ]; then \
+			$(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \
+		elif [ -f $$i ]; then \
+			$(ROMFSINST) /lib/$$i; \
+		fi; \
+	done