blob: 86df06d8b1527783f8c126d8d445d1a7b4421421 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# /*****************************************************************************
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#*******************************************************************************
18include $(zte_app_mak)
19
20.PHONE: webuinet
21.PHONE: webuiwifi
22.PHONE: webuiother
23#*******************************************************************************
24# LIBWEBINTERFACE
25#*******************************************************************************
26LIBWEBINTERFACE = libwebinterface.a
27LIBWEBINTERFACE_SHARED = libwebinterface.so
28
29#*******************************************************************************
30# objects
31#*******************************************************************************
32OBJS = 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)
41export WEBUI=
42
43ifeq ($(WEBUI), orig)
44OBJS +=
45WEBOBJS :=
46else
47CFLAGS += -DMYWEBUI
48WEBOBJS := $(patsubst %.c,%.o,$(wildcard ./net/*.c))
49endif
50
51WIFIOBJS := $(patsubst %.c,%.o,$(wildcard ./wifi/*.c))
52
53OTHEROBJS := $(patsubst %.c,%.o,$(wildcard ./other/*.c))
54#OBJS += $(WIFIOBJS)
55#*******************************************************************************
56# include path
57#*******************************************************************************
58CFLAGS += -DCONFIG_CHINA_UNICOM -DWEBS -DUEMF -DOS="LINUX" -DLINUX $(UMSW) $(DASW) $(SSLSW) $(IFMODSW)
59CFLAGS += -DWEBINSPECT_FIX
60CFLAGS += -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
63CFLAGS += -I$(zte_lib_path)/libnvram
64CFLAGS += -I$(zte_lib_path)/libezxml
65CFLAGS += -I$(zte_lib_path)/libmxml
66CFLAGS += -I$(zte_lib_path)/zlib/install/include
67CFLAGS += -I../../goahead/interface5.0/net
68CFLAGS += -I../../goahead/interface5.0/wifi
69CFLAGS += -I../../goahead/interface5.0/other
70CFLAGS += -I../../goahead/interface5.0
71CFLAGS += -I../../include
72CFLAGS += -I../../wlan
73#CFLAGS += -I../../zte_sqlite
74#CFLAGS += -I../../soft_timer
75CFLAGS += -I$(zte_lib_path)/libsqlite
76CFLAGS += -I$(zte_lib_path)/libsoft_timer
77CFLAGS += -I../../at_server
78CFLAGS += -I../../awps/include
79CFLAGS += -I.
80
81#CFLAGS += -I../../sms
82
83ifeq ($(LINUX_TYPE),linux)
84CFLAGS += -I$(USR_DIR)
85endif
86
87#CFLAGS += -I$(USR_DIR)/zte_apps/soft_timer
88#CFLAGS += -I$(USR_DIR)/zte_apps/at_server
89CFLAGS += -I../server
90CFLAGS += -fPIC -shared -lc
91SHAREDFLAG := -fPIC -shared -lc
92#CFLAGS += -I$(LIB_DIR)/lib/sms_pbm
93
94ifeq ($(CONFIG_USE_WEBUI_SECURITY),yes)
95CFLAGS += -DWEBS_SECURITY
96endif
97ifeq ($(CONFIG_USE_WEBUI_SSL),yes)
98CFLAGS += -DWEBS_SSL_SUPPORT -DOPENSSL
99endif
100
101#*******************************************************************************
102# macro definition
103#*******************************************************************************
104ifeq ($(FEATURE_IPV6), YES)
105 CFLAGS += -DFEATURE_IPV4V6_MODE
106endif
107
108ifeq ($(FEATURE_SMS_MODE), CS)
109 CFLAGS += -DCS_SMS
110endif
111
112ifeq ($(CUSTOM_MODEL),MF253)
113 ifeq ($(CUSTOM_OPERATOR),VIVO_BR)
114 CFLAGS += -DCUSTOM_VERSION_MF253_VIVO_BR
115 endif
116endif
117
118ifeq ($(FEATURE_TSP_MODE), YES)
119 CFLAGS += -DFEATURE_TSP_MODEM
120endif
121
122ifeq ($(CUSTOM_MODEL), MF253S2)
123ifeq ($(CUSTOM_OPERATOR), CM_CN)
124CFLAGS += -DCUSTOM_VERSION_MF253S2_CM_CN
125endif
126endif
127
128#*******************************************************************************
129# library
130#*******************************************************************************
131LDLIBS += -lpthread -lgcc_s
132LDLIBS += -lnvram_sc -lsoft_timer_sc -lsqlite -lzte_pbm -lwlan_interface -llog
133
134#*******************************************************************************
135# library path
136#*******************************************************************************
137LDLIBS += -L$(zte_lib_path)/libnvram
138LDLIBS += -L$(zte_lib_path)/libsoft_timer
139LDLIBS += -L$(zte_lib_path)/libsqlite
140LDLIBS += -L$(zte_lib_path)/liblog
141LDLIBS += -L$(zte_lib_path)/libzte_pbm
142LDLIBS += -L$(zte_lib_path)/../libezxml
143LDLIBS += -L$(zte_lib_path)/../libmxml
144LDLIBS += -L$(zte_lib_path)/libwlan_interface
145
146CFLAGS += -I$(zte_lib_path)/libssl/install/include
147LDLIBS += -L$(zte_lib_path)/libssl/install/lib -lcrypto
148#*******************************************************************************
149# targets
150#*******************************************************************************
151all: $(LIBWEBINTERFACE) webuinet webuiwifi webuiother
152zte_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
163romfs:
164
165ifeq ($(WEBUI), orig)
166webuinet:
167 @echo
168else
169webuinet:
170 cd ./net; echo $$pwd ;$(MAKE) -C ./ all||exit $$?
171endif
172
173webuiwifi:
174 cd ./wifi; echo $$pwd ;$(MAKE) -C ./ all||exit $$?
175
176webuiother:
177 cd ./other; echo $$pwd ;$(MAKE) -C ./ all||exit $$?
178
179root_fs:
180# $(ROMFSINST) -e CONFIG_USER_GOAHEAD /bin/$(LIBWEBINTERFACE)
181
182clean:
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