blob: 03c1c4bef6e7398c433bc08216d704c4aee0ab70 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001include $(zte_app_mak)
2
3all:
4 echo "zte_webui compile do nothing"
5
6clean:
7 echo "zte_webui clean do nothing"
8
9romfs:
10 @mkdir -p $(ROOTFS_DIR)/etc_ro/web
11 @cp -afvp $(APP_DIR)/zte_webui_min/* $(ROOTFS_DIR)/etc_ro/web
12 find . -type f -name '*.js' | xargs -n1 -I {} java -jar $(YUICOMPRESSOR) {} -o $(ROOTFS_DIR)/etc_ro/web/{}
13 find . -type f -name '*.css' | xargs -n1 -I {} java -jar $(YUICOMPRESSOR) {} -o $(ROOTFS_DIR)/etc_ro/web/{}
14 find . -type f -name '*.html' | xargs -n1 -I {} sed -i 's/^[ \t]*//g' $(ROOTFS_DIR)/etc_ro/web/{}
15 find . -type f -name '*.html' | xargs -n1 -I {} sed -i 's/[ \t]*$$//g' $(ROOTFS_DIR)/etc_ro/web/{}
16 find . -type f -name '*.html' | xargs -n1 -I {} sed -i ":a;N;s/\r//g;ta" $(ROOTFS_DIR)/etc_ro/web/{}
17 find . -type f -name '*.html' | xargs -n1 -I {} sed -i ":a;N;s/\n//g;ta" $(ROOTFS_DIR)/etc_ro/web/{}
18ifneq ($(CONFIG_WIFI_MODULE), aic8800)
19 -rm -v $(ROOTFS_DIR)/etc_ro/web/subpg/wifi_ap_station.html
20endif
21ifeq ($(CONFIG_WEBUI_TYPE),CPE)
22 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
23 -cp -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_cpe.js $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
24endif
25ifeq ($(CONFIG_WEBUI_TYPE),CPE_SW)
26 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
27 -cp -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_cpe_sw.js $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
28endif
29
30ifeq ($(PRJ_IS_MIN), yes)
31 -cp -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_min.js $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
32ifeq ($(CONFIG_WIFI_MODULE), xr819)
33 -cp -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_xr819.js $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
34endif
35ifeq ($(CONFIG_WIFI_MODULE), ssv6x5x)
36 -cp -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_ssv6x5x.js $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
37endif
38ifeq ($(CONFIG_WIFI_MODULE), aic8800)
39 -cp -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_aic8800.js $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
40ifeq ($(CONFIG_WIFI_SINGLEAP), no)
41 -sed -i 's/WIFI_SLEEP_SUPPORT:false,//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
42 -sed -i 's/HAS_BATTERY:false,//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
43 -sed -i 's/TURN_OFF_SUPPORT:false,//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
44else
45 -sed -i 's/AP_STATION_SUPPORT:true,//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
46 -sed -i 's/HAS_MULTI_SSID:true,//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
47endif
48endif
49endif
50
51ifneq ($(CONFIG_USE_WEBUI_SECURITY),yes)
52 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/3rd/crypto-js.js
53 -cp -v $(ROOTFS_DIR)/etc_ro/web/js/ext/crypto-js-null.js $(ROOTFS_DIR)/etc_ro/web/js/3rd/crypto-js.js
54 -sed -i 's/PASSWORD_ENCODE:false,//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
55endif
56ifeq ($(USE_FOTA),yes)
57 -sed -i 's/UPGRADE_TYPE:"NONE",//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
58 -sed -i 's/HAS_FOTA:false,//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
59 -sed -i 's/HAS_UPDATE_CHECK:false,//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
60endif
61ifeq ($(CONFIG_MMI_LCD),yes)
62 -sed -i 's/WIFI_SUPPORT_QR_CODE:false,//' $(ROOTFS_DIR)/etc_ro/web/js/ext/set.js
63endif
64 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/ext/crypto-js-null.js
65 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_min.js
66 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_xr819.js
67 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_ssv6x5x.js
68 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_aic8800.js
69 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_cpe.js
70 -rm -v $(ROOTFS_DIR)/etc_ro/web/js/ext/set_cpe_sw.js
71 -rm -v $(ROOTFS_DIR)/etc_ro/web/makefile
72ifeq ($(CONFIG_USE_WEBUI_ZIP),yes)
73 (cd $(ROOTFS_DIR)/etc_ro && zip -r web.zip web)
74 (cd $(ROOTFS_DIR)/etc_ro && rm -rfv web)
75endif
76
77