[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/zte_mdl/Makefile b/ap/app/zte_mdl/Makefile
new file mode 100755
index 0000000..1d30806
--- /dev/null
+++ b/ap/app/zte_mdl/Makefile
@@ -0,0 +1,148 @@
+#*******************************************************************************

+# include ZTE application makefile

+#*******************************************************************************

+include $(zte_app_mak)

+#include ../net_team.mk

+include $(COMMON_MK)

+

+CPU_PUB_ROOT=$(TOPDIR_AP)/../pub

+##############USER COMIZE BEGIN################

+EXEC = zte_mdl 

+EXEC1 = zte-rtc-clock 

+EXEC2 = router_msg_proxy 

+OBJS = zte_mdl.o \

+       $(patsubst %.c,%.o,$(wildcard ../zte_comm/at_ctl/src/atctrl/*.c ../zte_comm/at_ctl/src/atconfig/*.c ../zte_comm/at_ctl/src/phone/*.c ../zte_comm/at_ctl/src/phone/src/*.c)) \

+       ../zte_comm/rtc-service/rtc-service.o \

+       $(filter-out ../zte_comm/zte_mainctrl/router_msg_proxy.o,$(patsubst %.c,%.o,$(wildcard ../zte_comm/zte_mainctrl/*.c))) \

+       ../zte_comm/zte_hotplug/hotplug.o ../zte_comm/zte_hotplug/netdev_plug.o ../zte_comm/zte_hotplug/drv_plug.o ../zte_comm/zte_audio_ctrl/audio_res_ctrl.o \

+       $(patsubst %.c,%.o,$(wildcard ../zte_comm/zte_drv_ctrl/usb/*.c ../zte_comm/zte_drv_ctrl/serial/*.c)) \

+       ../zte_comm/sntp/sntp.o \

+       $(patsubst %.c,%.o,$(wildcard ../zte_comm/fota_dm/src/*.c ))

+

+ifeq ($(USE_VEHICLE_DC),yes)

+OBJS += ../zte_comm/nvserver/nvserver_rpc.o  ../zte_comm/nvserver/sc_rpc.o ../zte_comm/nvserver/file.o

+else

+OBJS += ../zte_comm/nvserver/nvserver.o  ../zte_comm/nvserver/nvupdate.o

+endif

+

+OBJS1 = ../zte_comm/rtc-service/zte-rtc-clock.o

+OBJS2 = ../zte_comm/zte_mainctrl/router_msg_proxy.o

+#aes

+CFLAGS += -I$(zte_lib_path)/libssl/install/include

+LDLIBS += -L$(zte_lib_path)/libssl/install/lib -lcrypto

+ifeq ($(USE_DSDS_VSIM),yes)

+LDLIBS += -L$(zte_lib_path)/libvsim -lght_vsim

+CFLAGS += -DUSE_DSDS_VSIM

+endif

+

+#*******************************************************************************

+# include path

+#*******************************************************************************

+CFLAGS += -I./

+CFLAGS += -I../include

+CFLAGS += -I../zte_comm/nvserver

+CFLAGS += -I$(LIB_DIR)/libnvram

+CFLAGS += -I$(APP_DIR)/include                                                   

+CFLAGS += -g -Werror=implicit-function-declaration 

+

+CFLAGS += -I../zte_comm/zte_hotplug

+CFLAGS += -I../zte_comm/at_ctl/inc

+CFLAGS += -I../zte_comm/at_ctl/src/phone/inc

+CFLAGS += -I$(zte_app_path)/include

+CFLAGS += -I$(zte_lib_path)/libatext

+CFLAGS += -I$(zte_lib_path)/libsqlite

+CFLAGS += -I$(zte_lib_path)/libnvram

+CFLAGS += -I$(LINUX_DIR)

+CFLAGS += -I$(zte_lib_path)/libzcore/std/inc/zCore/bl

+CFLAGS += -I$(zte_lib_path)/libzcore/std/inc/zCore/gui

+CFLAGS += -I$(CPU_PUB_ROOT)/project/zx297520v3/include/nv

+CFLAGS += -O -Dlinux=1 -DHIGH_SPEED=1

+

+

+CFLAGS += -I$(zte_lib_path)/libsoftap

+#CFLAGS += -I.

+

+

+CFLAGS += -I$(zte_lib_path)/libsoft_timer

+

+

+

+

+CFLAGS	+= -I../zte_comm/fota_dm/inc

+#CFLAGS 	+= -I../zte_comm/fota_dm/gs_lib

+CFLAGS 	+= -I../zte_comm/fota_dm/rs_lib

+CFLAGS 	+= -I$(zte_lib_path)/libzte_dmapp/inc

+

+ifeq ($(USE_FOTA_AB),yes)

+CFLAGS += -I$(LIB_DIR)/libupi_ab/inc

+endif

+

+#*******************************************************************************

+# library

+#*******************************************************************************

+LDLIBS += -lnvram_sc -L$(zte_lib_path)/libnvram -lpthread

+ifeq ($(LINUX_TYPE),uClinux)

+LDFLAGS += -Wl,--allow-multiple-definition,-elf2flt=-s131072

+endif

+

+

+LDLIBS  += -lsoftap -L$(zte_lib_path)/libsoftap

+LDLIBS  += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer

+LDLIBS  += -latutils -L$(zte_lib_path)/libatutils

+LDLIBS  += -lsqlite -L$(zte_lib_path)/libsqlite

+LDLIBS  += -latext -L$(zte_lib_path)/libatext

+LDLIBS  += -lm

+#LDLIBS  += -ltinyalsa -L$(zte_lib_path)/libtinyalsa

+LDLIBS  += -lcpnv -L$(zte_lib_path)/libcpnv

+LDLIBS  += -lamt -L$(zte_lib_path)/libamt

+LDLIBS  += -lkey -L$(zte_lib_path)/libkey

+

+LDLIBS  += -lcurl -L$(zte_lib_path)/libcurl/install/lib

+

+

+LDLIBS +=  -lztedmapp  -L$(zte_lib_path)/libzte_dmapp

+#LIBSHARE_GS =  ../zte_comm/fota_dm/gs_lib/libdmgr.so.1

+#LDLIBS +=  -L../zte_comm/fota_dm/gs_lib -ldmgr

+

+LIBSHARE_GS =  ../zte_comm/fota_dm/rs_lib/librsdlsdk.so

+LDLIBS +=  -L../zte_comm/fota_dm/rs_lib -lrsdlsdk

+LDLIBS1 += -lnvram_sc -L$(zte_lib_path)/libnvram -lpthread

+LDLIBS1  += -lsoftap -L$(zte_lib_path)/libsoftap

+LDLIBS1  += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer

+

+ifeq ($(USE_FOTA_AB),yes)

+LDLIBS += -lupi_ab  -L$(LIB_DIR)/libupi_ab

+LDLIBS += -lcrypto  -L$(LIB_DIR)/libssl/install/lib

+endif

+

+##############USER COMIZE END##################

+

+all: $(EXEC) $(EXEC1) $(EXEC2)

+	(cd ../zte_comm/fota_dm/gs_lib;rm libdmgr.so;ln -s libdmgr.so.1  libdmgr.so; cd ../../../zte_comm)

+

+$(EXEC): $(OBJS)

+	$(CC) $(LDFLAGS) -o $@ $(OBJS) -Wl,--start-group $(LDLIBS) -Wl,--end-group

+	@cp $@ $@.elf

+

+$(EXEC1): $(OBJS1)

+	$(CC) $(CFLAGS) -o $@ $(OBJS1) -Wl,--start-group $(LDLIBS1) -Wl,--end-group

+	@cp $@ $@.elf

+

+$(EXEC2): $(OBJS2)

+	$(CC) $(CFLAGS) -o $@ $(OBJS2) -Wl,--start-group $(LDLIBS1) -Wl,--end-group

+	@cp $@ $@.elf

+

+romfs:

+	$(ROMFSINST)  /sbin/$(EXEC)

+	$(ROMFSINST)  /sbin/$(EXEC1)

+	$(ROMFSINST)  /sbin/$(EXEC2)

+	$(ROMFSINST) $(LIBSHARE_GS) /lib/

+

+clean:

+	-rm -f $(EXEC) *.elf *.gdb *.o

+	-rm -f $(EXEC1) *.elf *.gdb *.o

+	-rm -f $(EXEC2) *.elf *.gdb *.o

+	-find ../zte_comm/ -name \*.o -exec rm -rf {} \; 

+	-find . -name \*.o -exec rm -rf {} \;

+

+