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