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 |
|
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 28 | ifeq ($(USE_VEHICLE_DC_REF),yes)
|
| 29 | #wifi
|
| 30 | ifeq ($(CONFIG_WIFI_MODULE),realtek)
|
| 31 | CFLAGS += -D__REALTEK_8192_CHIP__
|
| 32 | ifeq ($(CONFIG_WIFI_RTL_WPA2),yes)
|
| 33 | tools_dir += ../zte_comm/wlan/realtek_tools_wpa2/auth ../zte_comm/wlan/realtek_tools_wpa2/mini_upnp ../zte_comm/wlan/realtek_tools_wpa2/utility
|
| 34 | tools_dir += ../zte_comm/wlan/realtek_tools_wpa2/wsc ../zte_comm/wlan/realtek_tools_wpa2/wireless_tools.25
|
| 35 | else
|
| 36 | tools_dir += ../zte_comm/wlan/realtek_tools/auth ../zte_comm/wlan/realtek_tools/mini_upnp ../zte_comm/wlan/realtek_tools/utility
|
| 37 | tools_dir += ../zte_comm/wlan/realtek_tools/wsc ../zte_comm/wlan/realtek_tools/wireless_tools.25
|
| 38 | endif
|
| 39 | else ifeq ($(CONFIG_WIFI_MODULE),rda5995)
|
| 40 | CFLAGS += -D__RDA_5995_CHIP__
|
| 41 | tools_dir += ../zte_comm/wlan/rda_tools
|
| 42 | else ifeq ($(CONFIG_WIFI_MODULE),esp8089)
|
| 43 | CFLAGS += -D__ESP_8089_CHIP__
|
| 44 | tools_dir += ../zte_comm/wlan/esp_tools/eagle_test ../zte_comm/wlan/esp_tools/fcctest
|
| 45 | else ifeq ($(CONFIG_WIFI_MODULE),xr819)
|
| 46 | CFLAGS += -D__XR_819_CHIP__
|
| 47 | #tools_dir +=
|
| 48 | else ifeq ($(CONFIG_WIFI_MODULE),ssv6x5x)
|
| 49 | CFLAGS += -D__SSV_6X5X_CHIP__
|
| 50 | #tools_dir +=
|
| 51 | else ifeq ($(CONFIG_WIFI_MODULE),aic8800)
|
| 52 | CFLAGS += -D__AIC_8800DW_CHIP__
|
| 53 | tools_dir += ../zte_comm/wlan/aic_tools/rftest
|
| 54 | ifeq ($(CONFIG_WIFI_SINGLEAP), no)
|
| 55 | CFLAGS += -D__MULTI_AP__
|
| 56 | endif
|
| 57 | endif
|
| 58 |
|
| 59 | $(warning CONFIG_WIFI_FUNCTION=$(CONFIG_WIFI_FUNCTION))
|
| 60 |
|
| 61 | ifeq ($(findstring sta,$(CONFIG_WIFI_FUNCTION)), sta)
|
| 62 | WLAN_STA_FUNC=yes
|
| 63 | endif
|
| 64 |
|
| 65 | ifeq ($(findstring ap,$(CONFIG_WIFI_FUNCTION)), ap)
|
| 66 | WLAN_AP_FUNC=yes
|
| 67 | endif
|
| 68 |
|
| 69 | CFLAGS += -D__QRCODE_WIFI__
|
| 70 | CFLAGS += -D__USE_AES__
|
| 71 |
|
| 72 | ifeq ($(WLAN_STA_FUNC),yes)
|
| 73 | CFLAGS += -D__STA_FUNC__
|
| 74 | CFLAGS += -I$(zte_app_path)/wpa_supplicant-2.10/src/common
|
| 75 | LDLIBS += -lwpa_client -L$(zte_app_path)/wpa_supplicant-2.10/wpa_supplicant
|
| 76 | endif
|
| 77 |
|
| 78 | ifeq ($(WLAN_AP_FUNC),yes)
|
| 79 | CFLAGS += -D__AP_FUNC__
|
| 80 | ifneq ($(WLAN_STA_FUNC),yes)
|
| 81 | CFLAGS += -I$(zte_app_path)/hostapd-2.10/src/common
|
| 82 | LDLIBS += -lwpa_client -L$(zte_app_path)/hostapd-2.10/hostapd
|
| 83 | endif
|
| 84 | endif
|
| 85 |
|
| 86 | OBJS += ../zte_comm/wlan/src/wlan_main.o ../zte_comm/wlan/src/wifi_socket.o ../zte_comm/wlan/src/wlan_rtc_sleep.o ../zte_comm/wlan/src/wifi_drv_ko.o \
|
| 87 | ../zte_comm/wlan/src/wifi_sta_ctrl.o ../zte_comm/wlan/src/wifi_util.o ../zte_comm/wlan/src/wlan_config_ssid.o ../zte_comm/wlan/src/wlan_netlink.o ../zte_comm/wlan/src/Vector.o
|
| 88 | ifeq ($(CONFIG_WIFI_MODULE),realtek)
|
| 89 | OBJS += ../zte_comm/wlan/src/wifi_hal.o
|
| 90 | ifeq ($(WLAN_STA_FUNC),yes)
|
| 91 | OBJS += ../zte_comm/wlan/src/wlan-station.o
|
| 92 | endif
|
| 93 | LDLIBS += -lwlan_interface
|
| 94 | LDLIBS += -L$(zte_lib_path)/libwlan_interface
|
| 95 | else ifeq ($(CONFIG_WIFI_MODULE),rda5995)
|
| 96 | ifeq ($(WLAN_STA_FUNC),yes)
|
| 97 | OBJS += ../zte_comm/wlan/src/wlan_sta_manager.o ../zte_comm/wlan/src/wlan_sm.o
|
| 98 | endif
|
| 99 |
|
| 100 | ifeq ($(WLAN_AP_FUNC),yes)
|
| 101 | OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
|
| 102 | LDLIBS += -lwlan_interface
|
| 103 | LDLIBS += -L$(zte_lib_path)/libwlan_interface
|
| 104 | endif
|
| 105 | else ifeq ($(CONFIG_WIFI_MODULE),esp8089)
|
| 106 | ifeq ($(WLAN_STA_FUNC),yes)
|
| 107 | OBJS += ../zte_comm/wlan/src/wlan_sta_manager.o ../zte_comm/wlan/src/wlan_sm.o
|
| 108 | endif
|
| 109 |
|
| 110 | ifeq ($(WLAN_AP_FUNC),yes)
|
| 111 | OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
|
| 112 | LDLIBS += -lwlan_interface
|
| 113 | LDLIBS += -L$(zte_lib_path)/libwlan_interface
|
| 114 | endif
|
| 115 | else ifeq ($(CONFIG_WIFI_MODULE),xr819)
|
| 116 | ifeq ($(WLAN_STA_FUNC),yes)
|
| 117 | OBJS += ../zte_comm/wlan/src/wlan_sta_manager.o ../zte_comm/wlan/src/wlan_sm.o
|
| 118 | endif
|
| 119 |
|
| 120 | ifeq ($(WLAN_AP_FUNC),yes)
|
| 121 | OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
|
| 122 | LDLIBS += -lwlan_interface
|
| 123 | LDLIBS += -L$(zte_lib_path)/libwlan_interface
|
| 124 | endif
|
| 125 | else ifeq ($(CONFIG_WIFI_MODULE),ssv6x5x)
|
| 126 | ifeq ($(WLAN_STA_FUNC),yes)
|
| 127 | OBJS += ../zte_comm/wlan/src/wlan-station.o
|
| 128 | endif
|
| 129 |
|
| 130 | ifeq ($(WLAN_AP_FUNC),yes)
|
| 131 | OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
|
| 132 | LDLIBS += -lwlan_interface
|
| 133 | LDLIBS += -L$(zte_lib_path)/libwlan_interface
|
| 134 | endif
|
| 135 | else ifeq ($(CONFIG_WIFI_MODULE),aic8800)
|
| 136 | ifeq ($(WLAN_STA_FUNC),yes)
|
| 137 | OBJS += ../zte_comm/wlan/src/wlan-station.o
|
| 138 | endif
|
| 139 |
|
| 140 | ifeq ($(WLAN_AP_FUNC),yes)
|
| 141 | OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o
|
| 142 | LDLIBS += -lwlan_interface
|
| 143 | LDLIBS += -L$(zte_lib_path)/libwlan_interface
|
| 144 | endif
|
| 145 | endif
|
| 146 | CFLAGS += -I../zte_comm/wlan/inc
|
| 147 | endif
|
| 148 |
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 149 | OBJS1 = ../zte_comm/rtc-service/zte-rtc-clock.o
|
| 150 | OBJS2 = ../zte_comm/zte_mainctrl/router_msg_proxy.o
|
| 151 | #aes
|
| 152 | CFLAGS += -I$(zte_lib_path)/libssl/install/include
|
| 153 | LDLIBS += -L$(zte_lib_path)/libssl/install/lib -lcrypto
|
| 154 | ifeq ($(USE_DSDS_VSIM),yes)
|
| 155 | LDLIBS += -L$(zte_lib_path)/libvsim -lght_vsim
|
| 156 | CFLAGS += -DUSE_DSDS_VSIM
|
| 157 | endif
|
| 158 |
|
| 159 | #*******************************************************************************
|
| 160 | # include path
|
| 161 | #*******************************************************************************
|
| 162 | CFLAGS += -I./
|
| 163 | CFLAGS += -I../include
|
| 164 | CFLAGS += -I../zte_comm/nvserver
|
| 165 | CFLAGS += -I$(LIB_DIR)/libnvram
|
| 166 | CFLAGS += -I$(APP_DIR)/include
|
| 167 | CFLAGS += -g -Werror=implicit-function-declaration
|
| 168 |
|
| 169 | CFLAGS += -I../zte_comm/zte_hotplug
|
| 170 | CFLAGS += -I../zte_comm/at_ctl/inc
|
| 171 | CFLAGS += -I../zte_comm/at_ctl/src/phone/inc
|
| 172 | CFLAGS += -I$(zte_app_path)/include
|
| 173 | CFLAGS += -I$(zte_lib_path)/libatext
|
| 174 | CFLAGS += -I$(zte_lib_path)/libsqlite
|
| 175 | CFLAGS += -I$(zte_lib_path)/libnvram
|
| 176 | CFLAGS += -I$(LINUX_DIR)
|
| 177 | CFLAGS += -I$(zte_lib_path)/libzcore/std/inc/zCore/bl
|
| 178 | CFLAGS += -I$(zte_lib_path)/libzcore/std/inc/zCore/gui
|
| 179 | CFLAGS += -I$(CPU_PUB_ROOT)/project/zx297520v3/include/nv
|
| 180 | CFLAGS += -O -Dlinux=1 -DHIGH_SPEED=1
|
| 181 |
|
| 182 |
|
| 183 | CFLAGS += -I$(zte_lib_path)/libsoftap
|
| 184 | #CFLAGS += -I.
|
| 185 |
|
| 186 |
|
| 187 | CFLAGS += -I$(zte_lib_path)/libsoft_timer
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 | CFLAGS += -I../zte_comm/fota_dm/inc
|
| 193 | #CFLAGS += -I../zte_comm/fota_dm/gs_lib
|
| 194 | CFLAGS += -I../zte_comm/fota_dm/rs_lib
|
| 195 | CFLAGS += -I$(zte_lib_path)/libzte_dmapp/inc
|
| 196 |
|
| 197 | ifeq ($(USE_FOTA_AB),yes)
|
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 198 | CFLAGS += -I$(LIB_DIR)/libflags
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 199 | endif
|
| 200 |
|
| 201 | #*******************************************************************************
|
| 202 | # library
|
| 203 | #*******************************************************************************
|
| 204 | LDLIBS += -lnvram_sc -L$(zte_lib_path)/libnvram -lpthread
|
| 205 | ifeq ($(LINUX_TYPE),uClinux)
|
| 206 | LDFLAGS += -Wl,--allow-multiple-definition,-elf2flt=-s131072
|
| 207 | endif
|
| 208 |
|
| 209 |
|
| 210 | LDLIBS += -lsoftap -L$(zte_lib_path)/libsoftap
|
| 211 | LDLIBS += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
|
| 212 | LDLIBS += -latutils -L$(zte_lib_path)/libatutils
|
| 213 | LDLIBS += -lsqlite -L$(zte_lib_path)/libsqlite
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 214 | ifeq ($(USE_VOICE_AT),yes)
|
| 215 | LDLIBS += -ltinyalsa -L$(zte_lib_path)/libtinyalsa
|
| 216 | LDLIBS += -lvoice -L$(zte_lib_path)/libvoice
|
| 217 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 218 | LDLIBS += -latext -L$(zte_lib_path)/libatext
|
| 219 | LDLIBS += -lm
|
| 220 | #LDLIBS += -ltinyalsa -L$(zte_lib_path)/libtinyalsa
|
| 221 | LDLIBS += -lcpnv -L$(zte_lib_path)/libcpnv
|
| 222 | LDLIBS += -lamt -L$(zte_lib_path)/libamt
|
| 223 | LDLIBS += -lkey -L$(zte_lib_path)/libkey
|
| 224 |
|
| 225 | LDLIBS += -lcurl -L$(zte_lib_path)/libcurl/install/lib
|
| 226 |
|
| 227 |
|
| 228 | LDLIBS += -lztedmapp -L$(zte_lib_path)/libzte_dmapp
|
| 229 | #LIBSHARE_GS = ../zte_comm/fota_dm/gs_lib/libdmgr.so.1
|
| 230 | #LDLIBS += -L../zte_comm/fota_dm/gs_lib -ldmgr
|
| 231 |
|
| 232 | LIBSHARE_GS = ../zte_comm/fota_dm/rs_lib/librsdlsdk.so
|
| 233 | LDLIBS += -L../zte_comm/fota_dm/rs_lib -lrsdlsdk
|
| 234 | LDLIBS1 += -lnvram_sc -L$(zte_lib_path)/libnvram -lpthread
|
| 235 | LDLIBS1 += -lsoftap -L$(zte_lib_path)/libsoftap
|
| 236 | LDLIBS1 += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
|
| 237 |
|
| 238 | ifeq ($(USE_FOTA_AB),yes)
|
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 239 | LDLIBS += -lflags -L$(zte_lib_path)/libflags
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 240 | endif
|
| 241 |
|
| 242 | ##############USER COMIZE END##################
|
| 243 |
|
| 244 | all: $(EXEC) $(EXEC1) $(EXEC2)
|
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 245 | ifneq ($(tools_dir), )
|
| 246 | for i in $(tools_dir) ; do $(MAKE) -C $$i || exit $?; done
|
| 247 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 248 | (cd ../zte_comm/fota_dm/gs_lib;rm libdmgr.so;ln -s libdmgr.so.1 libdmgr.so; cd ../../../zte_comm)
|
| 249 |
|
| 250 | $(EXEC): $(OBJS)
|
| 251 | $(CC) $(LDFLAGS) -o $@ $(OBJS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 252 | @cp $@ $@.elf
|
| 253 |
|
| 254 | $(EXEC1): $(OBJS1)
|
| 255 | $(CC) $(CFLAGS) -o $@ $(OBJS1) -Wl,--start-group $(LDLIBS1) -Wl,--end-group
|
| 256 | @cp $@ $@.elf
|
| 257 |
|
| 258 | $(EXEC2): $(OBJS2)
|
| 259 | $(CC) $(CFLAGS) -o $@ $(OBJS2) -Wl,--start-group $(LDLIBS1) -Wl,--end-group
|
| 260 | @cp $@ $@.elf
|
| 261 |
|
| 262 | romfs:
|
| 263 | $(ROMFSINST) /sbin/$(EXEC)
|
| 264 | $(ROMFSINST) /sbin/$(EXEC1)
|
| 265 | $(ROMFSINST) /sbin/$(EXEC2)
|
| 266 | $(ROMFSINST) $(LIBSHARE_GS) /lib/
|
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 267 | ifneq ($(tools_dir), )
|
| 268 | for i in $(tools_dir) ; do $(MAKE) -C $$i romfs || exit $?; done
|
| 269 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 270 |
|
| 271 | clean:
|
| 272 | -rm -f $(EXEC) *.elf *.gdb *.o
|
| 273 | -rm -f $(EXEC1) *.elf *.gdb *.o
|
| 274 | -rm -f $(EXEC2) *.elf *.gdb *.o
|
| 275 | -find ../zte_comm/ -name \*.o -exec rm -rf {} \;
|
| 276 | -find . -name \*.o -exec rm -rf {} \;
|
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 277 | ifneq ($(tools_dir), )
|
| 278 | for i in $(tools_dir) ; do $(MAKE) -C $$i clean || exit $?; done
|
| 279 | endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 280 |
|
| 281 |
|