lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | #*******************************************************************************
|
| 2 | # include ZTE application makefile
|
| 3 | #*******************************************************************************
|
| 4 | include $(zte_app_mak)
|
| 5 | #include ../net_team.mk
|
| 6 | include $(COMMON_MK)
|
| 7 |
|
| 8 | CPU_PUB_ROOT=$(TOPDIR_AP)/../pub
|
| 9 | ##############USER COMIZE BEGIN################
|
| 10 | EXEC = zte_mdl
|
| 11 | EXEC1 = zte-rtc-clock
|
| 12 | EXEC2 = router_msg_proxy
|
| 13 | OBJS = zte_mdl.o \
|
| 14 | $(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)) \
|
| 15 | ../zte_comm/rtc-service/rtc-service.o \
|
| 16 | $(filter-out ../zte_comm/zte_mainctrl/router_msg_proxy.o,$(patsubst %.c,%.o,$(wildcard ../zte_comm/zte_mainctrl/*.c))) \
|
| 17 | ../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 \
|
| 18 | $(patsubst %.c,%.o,$(wildcard ../zte_comm/zte_drv_ctrl/usb/*.c ../zte_comm/zte_drv_ctrl/serial/*.c)) \
|
| 19 | ../zte_comm/sntp/sntp.o \
|
| 20 | $(patsubst %.c,%.o,$(wildcard ../zte_comm/fota_dm/src/*.c ))
|
| 21 |
|
| 22 | ifeq ($(USE_VEHICLE_DC),yes)
|
| 23 | OBJS += ../zte_comm/nvserver/nvserver_rpc.o ../zte_comm/nvserver/sc_rpc.o ../zte_comm/nvserver/file.o
|
| 24 | else
|
| 25 | OBJS += ../zte_comm/nvserver/nvserver.o ../zte_comm/nvserver/nvupdate.o
|
| 26 | endif
|
| 27 |
|
| 28 | OBJS1 = ../zte_comm/rtc-service/zte-rtc-clock.o
|
| 29 | OBJS2 = ../zte_comm/zte_mainctrl/router_msg_proxy.o
|
| 30 | #aes
|
| 31 | CFLAGS += -I$(zte_lib_path)/libssl/install/include
|
| 32 | LDLIBS += -L$(zte_lib_path)/libssl/install/lib -lcrypto
|
| 33 | ifeq ($(USE_DSDS_VSIM),yes)
|
| 34 | LDLIBS += -L$(zte_lib_path)/libvsim -lght_vsim
|
| 35 | CFLAGS += -DUSE_DSDS_VSIM
|
| 36 | endif
|
| 37 |
|
| 38 | #*******************************************************************************
|
| 39 | # include path
|
| 40 | #*******************************************************************************
|
| 41 | CFLAGS += -I./
|
| 42 | CFLAGS += -I../include
|
| 43 | CFLAGS += -I../zte_comm/nvserver
|
| 44 | CFLAGS += -I$(LIB_DIR)/libnvram
|
| 45 | CFLAGS += -I$(APP_DIR)/include
|
| 46 | CFLAGS += -g -Werror=implicit-function-declaration
|
| 47 |
|
| 48 | CFLAGS += -I../zte_comm/zte_hotplug
|
| 49 | CFLAGS += -I../zte_comm/at_ctl/inc
|
| 50 | CFLAGS += -I../zte_comm/at_ctl/src/phone/inc
|
| 51 | CFLAGS += -I$(zte_app_path)/include
|
| 52 | CFLAGS += -I$(zte_lib_path)/libatext
|
| 53 | CFLAGS += -I$(zte_lib_path)/libsqlite
|
| 54 | CFLAGS += -I$(zte_lib_path)/libnvram
|
| 55 | CFLAGS += -I$(LINUX_DIR)
|
| 56 | CFLAGS += -I$(zte_lib_path)/libzcore/std/inc/zCore/bl
|
| 57 | CFLAGS += -I$(zte_lib_path)/libzcore/std/inc/zCore/gui
|
| 58 | CFLAGS += -I$(CPU_PUB_ROOT)/project/zx297520v3/include/nv
|
| 59 | CFLAGS += -O -Dlinux=1 -DHIGH_SPEED=1
|
| 60 |
|
| 61 |
|
| 62 | CFLAGS += -I$(zte_lib_path)/libsoftap
|
| 63 | #CFLAGS += -I.
|
| 64 |
|
| 65 |
|
| 66 | CFLAGS += -I$(zte_lib_path)/libsoft_timer
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 | CFLAGS += -I../zte_comm/fota_dm/inc
|
| 72 | #CFLAGS += -I../zte_comm/fota_dm/gs_lib
|
| 73 | CFLAGS += -I../zte_comm/fota_dm/rs_lib
|
| 74 | CFLAGS += -I$(zte_lib_path)/libzte_dmapp/inc
|
| 75 |
|
| 76 | ifeq ($(USE_FOTA_AB),yes)
|
| 77 | CFLAGS += -I$(LIB_DIR)/libupi_ab/inc
|
| 78 | endif
|
| 79 |
|
| 80 | #*******************************************************************************
|
| 81 | # library
|
| 82 | #*******************************************************************************
|
| 83 | LDLIBS += -lnvram_sc -L$(zte_lib_path)/libnvram -lpthread
|
| 84 | ifeq ($(LINUX_TYPE),uClinux)
|
| 85 | LDFLAGS += -Wl,--allow-multiple-definition,-elf2flt=-s131072
|
| 86 | endif
|
| 87 |
|
| 88 |
|
| 89 | LDLIBS += -lsoftap -L$(zte_lib_path)/libsoftap
|
| 90 | LDLIBS += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
|
| 91 | LDLIBS += -latutils -L$(zte_lib_path)/libatutils
|
| 92 | LDLIBS += -lsqlite -L$(zte_lib_path)/libsqlite
|
| 93 | LDLIBS += -latext -L$(zte_lib_path)/libatext
|
| 94 | LDLIBS += -lm
|
| 95 | #LDLIBS += -ltinyalsa -L$(zte_lib_path)/libtinyalsa
|
| 96 | LDLIBS += -lcpnv -L$(zte_lib_path)/libcpnv
|
| 97 | LDLIBS += -lamt -L$(zte_lib_path)/libamt
|
| 98 | LDLIBS += -lkey -L$(zte_lib_path)/libkey
|
| 99 |
|
| 100 | LDLIBS += -lcurl -L$(zte_lib_path)/libcurl/install/lib
|
| 101 |
|
| 102 |
|
| 103 | LDLIBS += -lztedmapp -L$(zte_lib_path)/libzte_dmapp
|
| 104 | #LIBSHARE_GS = ../zte_comm/fota_dm/gs_lib/libdmgr.so.1
|
| 105 | #LDLIBS += -L../zte_comm/fota_dm/gs_lib -ldmgr
|
| 106 |
|
| 107 | LIBSHARE_GS = ../zte_comm/fota_dm/rs_lib/librsdlsdk.so
|
| 108 | LDLIBS += -L../zte_comm/fota_dm/rs_lib -lrsdlsdk
|
| 109 | LDLIBS1 += -lnvram_sc -L$(zte_lib_path)/libnvram -lpthread
|
| 110 | LDLIBS1 += -lsoftap -L$(zte_lib_path)/libsoftap
|
| 111 | LDLIBS1 += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
|
| 112 |
|
| 113 | ifeq ($(USE_FOTA_AB),yes)
|
| 114 | LDLIBS += -lupi_ab -L$(LIB_DIR)/libupi_ab
|
| 115 | LDLIBS += -lcrypto -L$(LIB_DIR)/libssl/install/lib
|
| 116 | endif
|
| 117 |
|
| 118 | ##############USER COMIZE END##################
|
| 119 |
|
| 120 | all: $(EXEC) $(EXEC1) $(EXEC2)
|
| 121 | (cd ../zte_comm/fota_dm/gs_lib;rm libdmgr.so;ln -s libdmgr.so.1 libdmgr.so; cd ../../../zte_comm)
|
| 122 |
|
| 123 | $(EXEC): $(OBJS)
|
| 124 | $(CC) $(LDFLAGS) -o $@ $(OBJS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 125 | @cp $@ $@.elf
|
| 126 |
|
| 127 | $(EXEC1): $(OBJS1)
|
| 128 | $(CC) $(CFLAGS) -o $@ $(OBJS1) -Wl,--start-group $(LDLIBS1) -Wl,--end-group
|
| 129 | @cp $@ $@.elf
|
| 130 |
|
| 131 | $(EXEC2): $(OBJS2)
|
| 132 | $(CC) $(CFLAGS) -o $@ $(OBJS2) -Wl,--start-group $(LDLIBS1) -Wl,--end-group
|
| 133 | @cp $@ $@.elf
|
| 134 |
|
| 135 | romfs:
|
| 136 | $(ROMFSINST) /sbin/$(EXEC)
|
| 137 | $(ROMFSINST) /sbin/$(EXEC1)
|
| 138 | $(ROMFSINST) /sbin/$(EXEC2)
|
| 139 | $(ROMFSINST) $(LIBSHARE_GS) /lib/
|
| 140 |
|
| 141 | clean:
|
| 142 | -rm -f $(EXEC) *.elf *.gdb *.o
|
| 143 | -rm -f $(EXEC1) *.elf *.gdb *.o
|
| 144 | -rm -f $(EXEC2) *.elf *.gdb *.o
|
| 145 | -find ../zte_comm/ -name \*.o -exec rm -rf {} \;
|
| 146 | -find . -name \*.o -exec rm -rf {} \;
|
| 147 |
|
| 148 |
|