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