#******************************************************************************* | |
# 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_mifi | |
EXEC1 = zte-rtc-clock | |
EXEC2 = router_msg_proxy | |
OBJS = zte_mifi.o ../zte_comm/nvserver/nvserver.o ../zte_comm/nvserver/nvupdate.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 \ | |
$(patsubst %.c,%.o,$(wildcard ../zte_comm/zte_drv_ctrl/usb/*.c ../zte_comm/zte_drv_ctrl/serial/*.c)) \ | |
../zte_comm/fluxstat/fluxstat.o \ | |
../zte_comm/sntp/sntp.o \ | |
../zte_comm/sd_hotplug/sd_hotplug.o ../zte_comm/sd_hotplug/sd_httpshare.o \ | |
$(patsubst %.c,%.o,$(wildcard ../zte_comm/sms/src/*.c )) \ | |
$(patsubst %.c,%.o,$(wildcard ../zte_comm/fota_dm/src/*.c )) \ | |
# $(patsubst %.c,%.o,$(wildcard ../zte_comm/phonebook/src/*.c )) ../zte_comm/zte_audio_ctrl/audio_res_ctrl.o | |
OBJS1 = ../zte_comm/rtc-service/zte-rtc-clock.o | |
OBJS2 = ../zte_comm/zte_mainctrl/router_msg_proxy.o | |
ZTE_MMI_DEP = zte_mmi_app | |
ZTE_MMI_TOBJS = mmi_adapter.o mmi.o mmi_battery.o mmi_net.o mmi_wifi.o mmi_tip.o mmi_sms.o mmi_lcd_page.o mmi_lcd.o mmi_lcd_init.o mmi_ctrl.o \ | |
mmi_keystrokes.o mmi_lcd_timer.o mmi_led.o mmi_led_init.o mmi_led_adapter.o mmi_poweroff_charger.o mmi_traffic.o mmi_fota.o mmi_msg.o \ | |
mmi_cfg.o mmi_poweroff.o mmi_battery_adapter.o mmi_mo.o mmi_mo_en.o mmi_mo_zh.o mmi_voip.o mmi_plat_adapter.o | |
ZTE_MMI_OBJS = $(addprefix ../zte_comm/zte_mmi/,$(ZTE_MMI_TOBJS)) | |
ZTE_LOCKNET_DEP = zte_locknet_app | |
ZTE_LOCKNET_OBJS = $(patsubst %.c,%.o,$(wildcard ../zte_comm/zte_locknet/src/*.c )) | |
ZTE_WATCHDOG_DEP = zte_watchdog_app | |
ZTE_WATCHDOG_TOBJS = watchdog.o watchdog_adapter.o watchdog_battery.o | |
ZTE_WATCHDOG_OBJS = $(addprefix ../zte_comm/zte_watchdog/,$(ZTE_WATCHDOG_TOBJS)) | |
#wifi | |
ifeq ($(CONFIG_WIFI_MODULE),realtek) | |
CFLAGS += -D__REALTEK_8192_CHIP__ | |
ifeq ($(CONFIG_WIFI_RTL_WPA2),yes) | |
tools_dir += ../zte_comm/wlan/realtek_tools_wpa2/auth ../zte_comm/wlan/realtek_tools_wpa2/mini_upnp ../zte_comm/wlan/realtek_tools_wpa2/utility | |
tools_dir += ../zte_comm/wlan/realtek_tools_wpa2/wsc ../zte_comm/wlan/realtek_tools_wpa2/wireless_tools.25 | |
else | |
tools_dir += ../zte_comm/wlan/realtek_tools/auth ../zte_comm/wlan/realtek_tools/mini_upnp ../zte_comm/wlan/realtek_tools/utility | |
tools_dir += ../zte_comm/wlan/realtek_tools/wsc ../zte_comm/wlan/realtek_tools/wireless_tools.25 | |
endif | |
else ifeq ($(CONFIG_WIFI_MODULE),rda5995) | |
CFLAGS += -D__RDA_5995_CHIP__ | |
tools_dir += ../zte_comm/wlan/rda_tools | |
else ifeq ($(CONFIG_WIFI_MODULE),esp8089) | |
CFLAGS += -D__ESP_8089_CHIP__ | |
tools_dir += ../zte_comm/wlan/esp_tools/eagle_test ../zte_comm/wlan/esp_tools/fcctest | |
else ifeq ($(CONFIG_WIFI_MODULE),xr819) | |
CFLAGS += -D__XR_819_CHIP__ | |
#tools_dir += | |
else ifeq ($(CONFIG_WIFI_MODULE),ssv6x5x) | |
CFLAGS += -D__SSV_6X5X_CHIP__ | |
#tools_dir += | |
else ifeq ($(CONFIG_WIFI_MODULE),aic8800) | |
CFLAGS += -D__AIC_8800DW_CHIP__ | |
tools_dir += ../zte_comm/wlan/aic_tools/rftest | |
ifeq ($(CONFIG_WIFI_SINGLEAP), no) | |
CFLAGS += -D__MULTI_AP__ | |
endif | |
endif | |
$(warning CONFIG_WIFI_FUNCTION=$(CONFIG_WIFI_FUNCTION)) | |
ifeq ($(findstring sta,$(CONFIG_WIFI_FUNCTION)), sta) | |
WLAN_STA_FUNC=yes | |
endif | |
ifeq ($(findstring ap,$(CONFIG_WIFI_FUNCTION)), ap) | |
WLAN_AP_FUNC=yes | |
endif | |
CFLAGS += -D__QRCODE_WIFI__ | |
CFLAGS += -D__USE_AES__ | |
ifeq ($(WLAN_STA_FUNC),yes) | |
CFLAGS += -D__STA_FUNC__ | |
CFLAGS += -I$(zte_app_path)/wpa_supplicant-2.10/src/common | |
LDLIBS += -lwpa_client -L$(zte_app_path)/wpa_supplicant-2.10/wpa_supplicant | |
endif | |
ifeq ($(WLAN_AP_FUNC),yes) | |
CFLAGS += -D__AP_FUNC__ | |
ifneq ($(WLAN_STA_FUNC),yes) | |
CFLAGS += -I$(zte_app_path)/hostapd-2.10/src/common | |
LDLIBS += -lwpa_client -L$(zte_app_path)/hostapd-2.10/hostapd | |
endif | |
endif | |
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 \ | |
../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 | |
ifeq ($(CONFIG_WIFI_MODULE),realtek) | |
OBJS += ../zte_comm/wlan/src/wifi_hal.o | |
ifeq ($(WLAN_STA_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wlan-station.o | |
endif | |
LDLIBS += -lwlan_interface | |
LDLIBS += -L$(zte_lib_path)/libwlan_interface | |
else ifeq ($(CONFIG_WIFI_MODULE),rda5995) | |
ifeq ($(WLAN_STA_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wlan_sta_manager.o ../zte_comm/wlan/src/wlan_sm.o | |
endif | |
ifeq ($(WLAN_AP_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o | |
LDLIBS += -lwlan_interface | |
LDLIBS += -L$(zte_lib_path)/libwlan_interface | |
endif | |
else ifeq ($(CONFIG_WIFI_MODULE),esp8089) | |
ifeq ($(WLAN_STA_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wlan_sta_manager.o ../zte_comm/wlan/src/wlan_sm.o | |
endif | |
ifeq ($(WLAN_AP_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o | |
LDLIBS += -lwlan_interface | |
LDLIBS += -L$(zte_lib_path)/libwlan_interface | |
endif | |
else ifeq ($(CONFIG_WIFI_MODULE),xr819) | |
ifeq ($(WLAN_STA_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wlan_sta_manager.o ../zte_comm/wlan/src/wlan_sm.o | |
endif | |
ifeq ($(WLAN_AP_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o | |
LDLIBS += -lwlan_interface | |
LDLIBS += -L$(zte_lib_path)/libwlan_interface | |
endif | |
else ifeq ($(CONFIG_WIFI_MODULE),ssv6x5x) | |
ifeq ($(WLAN_STA_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wlan-station.o | |
endif | |
ifeq ($(WLAN_AP_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o | |
LDLIBS += -lwlan_interface | |
LDLIBS += -L$(zte_lib_path)/libwlan_interface | |
endif | |
else ifeq ($(CONFIG_WIFI_MODULE),aic8800) | |
ifeq ($(WLAN_STA_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wlan-station.o | |
endif | |
ifeq ($(WLAN_AP_FUNC),yes) | |
OBJS += ../zte_comm/wlan/src/wifi_ap_ctrl.o | |
LDLIBS += -lwlan_interface | |
LDLIBS += -L$(zte_lib_path)/libwlan_interface | |
endif | |
endif | |
#aes | |
CFLAGS += -I$(zte_lib_path)/libssl/install/include | |
LDLIBS += -L$(zte_lib_path)/libssl/install/lib -lcrypto | |
#******************************************************************************* | |
# 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/sms/inc | |
#CFLAGS += -I../zte_comm/phonebook/inc | |
CFLAGS += -I../zte_comm/wlan/inc | |
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 | |
#******************************************************************************* | |
# 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 | |
ifneq ($(CONFIG_MMI_LCD),no) | |
LDLIBS += -lzcore | |
LDLIBS += -lrt | |
ifeq ($(USE_TTF_FONT), yes) | |
LDLIBS += -lft2 | |
LDLIBS += -lttf_font | |
else | |
LDLIBS += -lbitmap_font | |
endif | |
LDLIBS += -L$(zte_lib_path)/libzcore/min | |
ifeq ($(USE_TTF_FONT), yes) | |
LDLIBS += -L$(zte_lib_path)/libzcore/min/prebuilts/freetype | |
endif | |
endif | |
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 | |
##############USER COMIZE END################## | |
all: $(EXEC) $(EXEC1) $(EXEC2) | |
ifneq ($(tools_dir), ) | |
for i in $(tools_dir) ; do $(MAKE) -C $$i || exit $?; done | |
endif | |
(cd ../zte_comm/fota_dm/gs_lib;rm libdmgr.so;ln -s libdmgr.so.1 libdmgr.so; cd ../../../zte_comm) | |
$(EXEC): $(OBJS) $(ZTE_MMI_DEP) $(ZTE_LOCKNET_DEP) $(ZTE_WATCHDOG_DEP) | |
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(ZTE_MMI_OBJS) $(ZTE_LOCKNET_OBJS) $(ZTE_WATCHDOG_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/ | |
ifneq ($(tools_dir), ) | |
for i in $(tools_dir) ; do $(MAKE) -C $$i romfs || exit $?; done | |
endif | |
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 {} \; | |
ifneq ($(tools_dir), ) | |
for i in $(tools_dir) ; do $(MAKE) -C $$i clean || exit $?; done | |
endif | |
ifeq ($(CONFIG_USER_SINGLE_DM), zx) | |
rm -rf $(ROOTFS_DIR)//bin/$(EXEC_GS) | |
endif | |
$(ZTE_MMI_DEP): | |
${MAKE} -C ../zte_comm/zte_mmi lib | |
$(ZTE_LOCKNET_DEP): | |
${MAKE} -C ../zte_comm/zte_locknet lib | |
$(ZTE_WATCHDOG_DEP): | |
${MAKE} -C ../zte_comm/zte_watchdog lib |