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