lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | # /***************************************************************************** |
| 2 | #* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£ |
| 3 | #* |
| 4 | #* ÎļþÃû³Æ: Makefile |
| 5 | #* Îļþ±êʶ: Makefile |
| 6 | #* ÄÚÈÝÕªÒª: Makefile of ZTE applications |
| 7 | #* ʹÓ÷½·¨: void |
| 8 | #* |
| 9 | #* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ |
| 10 | #* ----------------------------------------------------------------------------- |
| 11 | #* 2015/02/10 V1.0 Create ÁõÑÇÄÏ ´´½¨ |
| 12 | #* |
| 13 | # ******************************************************************************/ |
| 14 | |
| 15 | #******************************************************************************* |
| 16 | # include ZTE application makefile |
| 17 | #******************************************************************************* |
| 18 | include $(zte_app_mak) |
| 19 | |
| 20 | .PHONE: webuinet |
| 21 | .PHONE: webuiwifi |
| 22 | .PHONE: webuiother |
| 23 | #******************************************************************************* |
| 24 | # LIBWEBINTERFACE |
| 25 | #******************************************************************************* |
| 26 | LIBWEBINTERFACE = libwebinterface.a |
| 27 | LIBWEBINTERFACE_SHARED = libwebinterface.so |
| 28 | |
| 29 | #******************************************************************************* |
| 30 | # objects |
| 31 | #******************************************************************************* |
| 32 | OBJS = zte_web_regist.o zte_web_util.o zte_web_mgmt.o \ |
| 33 | zte_web_pbm.o \ |
| 34 | zte_web_wan.o zte_web_sms.o \ |
| 35 | zte_web_get_fw_para.o \ |
| 36 | zte_web_httpshare.o zte_web_ussd.o \ |
| 37 | zte_web_mc.o zte_web_rest.o zte_web_safe.o zte_web_cell_broadcast.o \ |
| 38 | zte_web_cjson.o zte_web_sem.o |
| 39 | |
| 40 | #OBJS += $(wildcard $(zte_lib_path)/libpthread/*.o) |
| 41 | export WEBUI= |
| 42 | |
| 43 | ifeq ($(WEBUI), orig) |
| 44 | OBJS += |
| 45 | WEBOBJS := |
| 46 | else |
| 47 | CFLAGS += -DMYWEBUI |
| 48 | WEBOBJS := $(patsubst %.c,%.o,$(wildcard ./net/*.c)) |
| 49 | endif |
| 50 | |
| 51 | WIFIOBJS := $(patsubst %.c,%.o,$(wildcard ./wifi/*.c)) |
| 52 | |
| 53 | OTHEROBJS := $(patsubst %.c,%.o,$(wildcard ./other/*.c)) |
| 54 | #OBJS += $(WIFIOBJS) |
| 55 | #******************************************************************************* |
| 56 | # include path |
| 57 | #******************************************************************************* |
| 58 | CFLAGS += -DCONFIG_CHINA_UNICOM -DWEBS -DUEMF -DOS="LINUX" -DLINUX $(UMSW) $(DASW) $(SSLSW) $(IFMODSW) |
| 59 | CFLAGS += -DWEBINSPECT_FIX |
| 60 | CFLAGS += -Wall -fno-strict-aliasing |
| 61 | #CFLAGS += -I$(ROOTDIR)/lib/libnvram -I$(ROOTDIR)/$(LINUXDIR)/drivers/char -I$(ROOTDIR)/$(LINUXDIR)/include |
| 62 | #CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/flash |
| 63 | CFLAGS += -I$(zte_lib_path)/libnvram |
| 64 | CFLAGS += -I$(zte_lib_path)/libezxml |
| 65 | CFLAGS += -I$(zte_lib_path)/libmxml |
| 66 | CFLAGS += -I$(zte_lib_path)/zlib/install/include |
| 67 | CFLAGS += -I../../goahead/interface5.0/net |
| 68 | CFLAGS += -I../../goahead/interface5.0/wifi |
| 69 | CFLAGS += -I../../goahead/interface5.0/other |
| 70 | CFLAGS += -I../../goahead/interface5.0 |
| 71 | CFLAGS += -I../../include |
| 72 | CFLAGS += -I../../wlan |
| 73 | #CFLAGS += -I../../zte_sqlite |
| 74 | #CFLAGS += -I../../soft_timer |
| 75 | CFLAGS += -I$(zte_lib_path)/libsqlite |
| 76 | CFLAGS += -I$(zte_lib_path)/libsoft_timer |
| 77 | CFLAGS += -I../../at_server |
| 78 | CFLAGS += -I../../awps/include |
| 79 | CFLAGS += -I. |
| 80 | |
| 81 | #CFLAGS += -I../../sms |
| 82 | |
| 83 | ifeq ($(LINUX_TYPE),linux) |
| 84 | CFLAGS += -I$(USR_DIR) |
| 85 | endif |
| 86 | |
| 87 | #CFLAGS += -I$(USR_DIR)/zte_apps/soft_timer |
| 88 | #CFLAGS += -I$(USR_DIR)/zte_apps/at_server |
| 89 | CFLAGS += -I../server |
| 90 | CFLAGS += -fPIC -shared -lc |
| 91 | SHAREDFLAG := -fPIC -shared -lc |
| 92 | #CFLAGS += -I$(LIB_DIR)/lib/sms_pbm |
| 93 | |
| 94 | ifeq ($(CONFIG_USE_WEBUI_SECURITY),yes) |
| 95 | CFLAGS += -DWEBS_SECURITY |
| 96 | endif |
| 97 | ifeq ($(CONFIG_USE_WEBUI_SSL),yes) |
| 98 | CFLAGS += -DWEBS_SSL_SUPPORT -DOPENSSL |
| 99 | endif |
| 100 | |
| 101 | #******************************************************************************* |
| 102 | # macro definition |
| 103 | #******************************************************************************* |
| 104 | ifeq ($(FEATURE_IPV6), YES) |
| 105 | CFLAGS += -DFEATURE_IPV4V6_MODE |
| 106 | endif |
| 107 | |
| 108 | ifeq ($(FEATURE_SMS_MODE), CS) |
| 109 | CFLAGS += -DCS_SMS |
| 110 | endif |
| 111 | |
| 112 | ifeq ($(CUSTOM_MODEL),MF253) |
| 113 | ifeq ($(CUSTOM_OPERATOR),VIVO_BR) |
| 114 | CFLAGS += -DCUSTOM_VERSION_MF253_VIVO_BR |
| 115 | endif |
| 116 | endif |
| 117 | |
| 118 | ifeq ($(FEATURE_TSP_MODE), YES) |
| 119 | CFLAGS += -DFEATURE_TSP_MODEM |
| 120 | endif |
| 121 | |
| 122 | ifeq ($(CUSTOM_MODEL), MF253S2) |
| 123 | ifeq ($(CUSTOM_OPERATOR), CM_CN) |
| 124 | CFLAGS += -DCUSTOM_VERSION_MF253S2_CM_CN |
| 125 | endif |
| 126 | endif |
| 127 | |
| 128 | #******************************************************************************* |
| 129 | # library |
| 130 | #******************************************************************************* |
| 131 | LDLIBS += -lpthread -lgcc_s |
| 132 | LDLIBS += -lnvram_sc -lsoft_timer_sc -lsqlite -lzte_pbm -lwlan_interface -llog |
| 133 | |
| 134 | #******************************************************************************* |
| 135 | # library path |
| 136 | #******************************************************************************* |
| 137 | LDLIBS += -L$(zte_lib_path)/libnvram |
| 138 | LDLIBS += -L$(zte_lib_path)/libsoft_timer |
| 139 | LDLIBS += -L$(zte_lib_path)/libsqlite |
| 140 | LDLIBS += -L$(zte_lib_path)/liblog |
| 141 | LDLIBS += -L$(zte_lib_path)/libzte_pbm |
| 142 | LDLIBS += -L$(zte_lib_path)/../libezxml |
| 143 | LDLIBS += -L$(zte_lib_path)/../libmxml |
| 144 | LDLIBS += -L$(zte_lib_path)/libwlan_interface |
| 145 | |
| 146 | CFLAGS += -I$(zte_lib_path)/libssl/install/include |
| 147 | LDLIBS += -L$(zte_lib_path)/libssl/install/lib -lcrypto |
| 148 | #******************************************************************************* |
| 149 | # targets |
| 150 | #******************************************************************************* |
| 151 | all: $(LIBWEBINTERFACE) webuinet webuiwifi webuiother |
| 152 | zte_web_util.o: webuinet webuiwifi webuiother |
| 153 | #all: |
| 154 | # echo $(ROOTDIR) $(LINUXDIR) $(zte_lib_path) |
| 155 | |
| 156 | $(LIBWEBINTERFACE): $(OBJS) webuinet webuiwifi webuiother |
| 157 | $(AR) -rc $@ $(OBJS) $(WEBOBJS) $(WIFIOBJS) $(OTHEROBJS) |
| 158 | |
| 159 | $(LIBWEBINTERFACE_SHARED): $(OBJS) webuinet webuiwifi webuiother |
| 160 | $(LD) $(SHAREDFLAG) -o $@ $^ $(LDLIBS) $(WEBOBJS) $(WIFIOBJS) $(OTHEROBJS) |
| 161 | # $(STRIP) $@ |
| 162 | |
| 163 | romfs: |
| 164 | |
| 165 | ifeq ($(WEBUI), orig) |
| 166 | webuinet: |
| 167 | @echo |
| 168 | else |
| 169 | webuinet: |
| 170 | cd ./net; echo $$pwd ;$(MAKE) -C ./ all||exit $$? |
| 171 | endif |
| 172 | |
| 173 | webuiwifi: |
| 174 | cd ./wifi; echo $$pwd ;$(MAKE) -C ./ all||exit $$? |
| 175 | |
| 176 | webuiother: |
| 177 | cd ./other; echo $$pwd ;$(MAKE) -C ./ all||exit $$? |
| 178 | |
| 179 | root_fs: |
| 180 | # $(ROMFSINST) -e CONFIG_USER_GOAHEAD /bin/$(LIBWEBINTERFACE) |
| 181 | |
| 182 | clean: |
| 183 | -rm -f $(LIBWEBINTERFACE) *.elf *.gdb *.o |
| 184 | -cd ./net && $(MAKE) -C ./ clean |
| 185 | -cd ./wifi && $(MAKE) -C ./ clean |
| 186 | -cd ./other && $(MAKE) -C ./ clean |