blob: 6bf0ef223c5c240fc705ed08ffd09c3e00dcd208 [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#*******************************************************************************
21# execute
22#*******************************************************************************
23EXEC = goahead
24
25
26# User Management switch
27#UMSW = -DUSER_MANAGEMENT_SUPPORT
28CPU_PUB_ROOT=$(TOPDIR_AP)/../pub
29INTERFACEDIR = ../interface5.0
30INTERFACELIB = $(INTERFACEDIR)/libwebinterface.a
31#*******************************************************************************
32# objects asp.o ejlex.o ejparse.o umui.o
33#*******************************************************************************
34OBJS = balloc.o base64.o cgi.o default.o \
35 form.o \
36 h.o handler.o mime.o misc.o page.o \
37 ringq.o \
38 sock.o sockGen.o \
39 sym.o uemf.o value.o \
40 webs.o websuemf.o goahead.o
41
42#*******************************************************************************
43# include path
44#*******************************************************************************
45CFLAGS += -DWEBS -DUEMF -DOS="LINUX" -DLINUX $(UMSW) $(DASW) $(SSLSW) $(IFMODSW)
46CFLAGS += -Wall -fno-strict-aliasing -I../interface5.0/net -I.
47#CFLAGS += -I$(ROOTDIR)/lib/libnvram -I$(ROOTDIR)/$(LINUXDIR)/drivers/char -I$(ROOTDIR)/$(LINUXDIR)/include
48#CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/flash -I$(INTERFACEDIR)
49
50#OTHERS = -DB_STATS -DB_FILL -DDEBUG
51CFLAGS += -I../../include -g
52#CFLAGS += -I../../zte_sqlite
53#CFLAGS += -I../../soft_timer
54CFLAGS += -I$(zte_lib_path)/libsqlite
55CFLAGS += -I$(zte_lib_path)/libsoft_timer
56CFLAGS += -I../../at_server
57CFLAGS += -I$(zte_lib_path)/libnvram
58CFLAGS += -I$(zte_lib_path)/libezxml
59CFLAGS += -I$(zte_lib_path)/libmxml
60ifeq ($(CONFIG_USE_WEBUI_SSL),yes)
61OBJS += websSSL.o
62CFLAGS += -I$(zte_lib_path)/libssl/install/include
63CFLAGS += -I$(CPU_PUB_ROOT)/project/zx297520v3/include/nv
64CFLAGS += -DWEBS_SSL_SUPPORT -DOPENSSL
65LDLIBS += -L$(zte_lib_path)/libssl/install/lib -lssl -lcrypto
66LDLIBS += -ldl
67endif
68CFLAGS += -DWEBINSPECT_FIX
69LDLIBS += -lpthread
70LDLIBS += -lsoftap -L$(zte_lib_path)/libsoftap
71LDLIBS += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer
72#LDLIBS += -lkey -L$(zte_lib_path)/libkey
73LDLIBS += -lamt -L$(zte_lib_path)/libamt
74LDLIBS += -lcpnv -L$(zte_lib_path)/libcpnv
75
76ifeq ($(CONFIG_USE_WEBUI_SECURITY),yes)
77CFLAGS += -DWEBS_SECURITY
78endif
79#*******************************************************************************
80# macro definition
81#*******************************************************************************
82ifeq ($(CONFIG_USE_WEBUI_ZIP),yes)
83OBJS += ioapi.o unzip.o
84CFLAGS += -D_USE_WEBUI_ZIP
85CFLAGS += -I$(zte_lib_path)/zlib/install/include
86LDFLAGS += -L$(zte_lib_path)/zlib/install/lib -lz
87endif
88
89ifeq ($(CUSTOM_MODEL), MF253S2)
90ifeq ($(CUSTOM_OPERATOR), CM_CN)
91CFLAGS += -DCUSTOM_VERSION_MF253S2_CM_CN
92endif
93endif
94
95##changed by huangmin10103007 for new partition, 20130116 begin
96ifeq ($(FEATURE_ZTE_CPE_CFG), YES)
97CFLAGS += -D_ZTE_CFG_
98endif
99##changed by huangmin10103007 for new partition, 20130116 end
100# Digest Access switch
101# DASW = -DDIGEST_ACCESS_SUPPORT
102
103# SSL switches
104ifeq ("$(CONFIG_USER_GOAHEAD_SSL)", "y")
105SSLPATCHFILE = matrix_ssl.o sslSocket.o
106MATRIXDIR = $(ROOTDIR)/user/matrixssl-1.8.3
107SSLINC = $(MATRIXDIR)
108SSLLIB = $(MATRIXDIR)/src/libmatrixsslstatic.a
109SSLSW = -DWEBS_SSL_SUPPORT -DMATRIX_SSL -I$(SSLINC)
110endif
111
112#CONF_H = $(ROOTDIR)/$(LINUXDIR)/include/linux/autoconf.h
113#CONF_H = $(LINUX_DIR)/include/linux/autoconf.h
114#UCONF_H = $(ROOTDIR)/config/autoconf.h
115
116#BUSYCONF_H = $(USR_DIR)/busybox-1.15.0/include/autoconf.h
117#UCONF_H = $(CFG_DIR)/autoconf.h
118
119ifeq ($(FEATURE_DLNA), YES)
120# DLNA settings(libztedlna.so)
121LDLIBS += -L../../DMS -lztedlna -lpthread
122endif
123
124#*******************************************************************************
125# library
126#*******************************************************************************
127LDLIBS += -lnvram_sc -lzte_pbm -lsqlite -lwlan_interface
128ifeq ($(LINUX_TYPE),uClinux)
129LDLIBS += -lpthread
130else
131LDLIBS += -lpthread
132endif
133
134
135ifeq ($(FEATURE_DLNA), YES)
136LDLIBS += -L../../DMS -lztedlna
137endif
138
139LDFLAGS += $(SSLLIB) $(IFMODLIB) $(INTERFACELIB) -lm -lgcc_s
140
141#LDFLAGS += -Wl,-elf2flt=-s131072
142
143CFLAGS += -I$(zte_lib_path)/libssl/install/include
144LDLIBS += -L$(zte_lib_path)/libssl/install/lib -lcrypto
145
146#*******************************************************************************
147# library path
148#*******************************************************************************
149LDLIBS += -L$(zte_lib_path)/libnvram
150#LDLIBS += -L$(zte_lib_path)/libsoft_timer
151LDLIBS += -L$(zte_lib_path)/libsqlite
152LDLIBS += -L$(zte_lib_path)/libzte_pbm
153LDLIBS += -L$(zte_lib_path)/libmxml
154LDLIBS += -L$(zte_lib_path)/libwlan_interface
155
156#*******************************************************************************
157# targets
158#*******************************************************************************
159all:$(EXEC)
160
161#
162# Primary link
163#
164#$(CC) -o $@ $(OBJS) $(LDFLAGS) $(EXTRALIBS) $(LDLIBS)
165$(EXEC): $(OBJS) $(INTERFACELIB)
166 #$(LD) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
167 $(CC) -o $@ $(OBJS) $(LDFLAGS) $(EXTRALIBS) $(LDLIBS)
168
169root_fs:
170 cp $(EXEC) $(EXEC).elf
171 $(ROMFSINST) /bin/$(EXEC)
172
173romfs:
174 cp $(EXEC) $(EXEC).elf
175 $(ROMFSINST) /bin/$(EXEC)
176
177clean:
178 -rm -f $(EXEC) *.o *.elf
179
180#
181# Dependencies
182#
183asp.o: webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
184
185balloc.o: balloc.c uemf.h
186
187base64.o: base64.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
188
189cgi.o: webs.h wsIntrn.h uemf.h
190
191default.o: default.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h $(CONF_H)
192
193ejlex.o: ejlex.c ej.h ejIntrn.h uemf.h
194
195ejparse.o: ejparse.c ej.h ejIntrn.h uemf.h
196
197emfdb.o: emfdb.h wsIntrn.h uemf.h
198
199form.o: form.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
200
201h.o: h.c uemf.h
202
203handler.o: handler.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
204
205md5c.o: md5.h wsIntrn.h uemf.h
206
207mime.o: mime.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
208
209misc.o: misc.c uemf.h
210
211page.o: page.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
212
213ringq.o: ringq.c uemf.h
214
215rom.o: rom.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
216
217security.o: security.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
218
219sock.o: sock.c uemf.h
220
221sockGen.o: sockGen.c uemf.h $(CONF_H)
222
223sym.o: sym.c uemf.h
224
225uemf.o: uemf.c uemf.h
226
227um.o: webs.h wsIntrn.h um.h uemf.h
228
229umui.o: webs.h wsIntrn.h um.h uemf.h
230
231url.o: url.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
232
233value.o: value.c uemf.h
234
235webrom.o: webrom.c webs.h wsIntrn.h uemf.h
236
237webs.o: webs.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h $(CONF_H)
238
239websda.o: webs.h wsIntrn.h websda.h uemf.h
240
241websuemf.o: websuemf.c webs.h wsIntrn.h ej.h ejIntrn.h uemf.h
242
243websSSL.o: websSSL.c websSSL.h wsIntrn.h ej.h ejIntrn.h uemf.h
244
245#goahead.o: goahead.c wsIntrn.h webs.h ej.h ejIntrn.h uemf.h $(CONF_H) $(UCONF_H) $(BUSYCONF_H)
246goahead.o: goahead.c wsIntrn.h webs.h ej.h ejIntrn.h uemf.h $(CONF_H) $(BUSYCONF_H)