blob: 86df06d8b1527783f8c126d8d445d1a7b4421421 [file] [log] [blame]
# /*****************************************************************************
#* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
#*
#* ÎļþÃû³Æ: Makefile
#* Îļþ±êʶ: Makefile
#* ÄÚÈÝÕªÒª: Makefile of ZTE applications
#* ʹÓ÷½·¨: void
#*
#* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
#* -----------------------------------------------------------------------------
#* 2015/02/10 V1.0 Create ÁõÑÇÄÏ ´´½¨
#*
# ******************************************************************************/
#*******************************************************************************
# include ZTE application makefile
#*******************************************************************************
include $(zte_app_mak)
.PHONE: webuinet
.PHONE: webuiwifi
.PHONE: webuiother
#*******************************************************************************
# LIBWEBINTERFACE
#*******************************************************************************
LIBWEBINTERFACE = libwebinterface.a
LIBWEBINTERFACE_SHARED = libwebinterface.so
#*******************************************************************************
# objects
#*******************************************************************************
OBJS = zte_web_regist.o zte_web_util.o zte_web_mgmt.o \
zte_web_pbm.o \
zte_web_wan.o zte_web_sms.o \
zte_web_get_fw_para.o \
zte_web_httpshare.o zte_web_ussd.o \
zte_web_mc.o zte_web_rest.o zte_web_safe.o zte_web_cell_broadcast.o \
zte_web_cjson.o zte_web_sem.o
#OBJS += $(wildcard $(zte_lib_path)/libpthread/*.o)
export WEBUI=
ifeq ($(WEBUI), orig)
OBJS +=
WEBOBJS :=
else
CFLAGS += -DMYWEBUI
WEBOBJS := $(patsubst %.c,%.o,$(wildcard ./net/*.c))
endif
WIFIOBJS := $(patsubst %.c,%.o,$(wildcard ./wifi/*.c))
OTHEROBJS := $(patsubst %.c,%.o,$(wildcard ./other/*.c))
#OBJS += $(WIFIOBJS)
#*******************************************************************************
# include path
#*******************************************************************************
CFLAGS += -DCONFIG_CHINA_UNICOM -DWEBS -DUEMF -DOS="LINUX" -DLINUX $(UMSW) $(DASW) $(SSLSW) $(IFMODSW)
CFLAGS += -DWEBINSPECT_FIX
CFLAGS += -Wall -fno-strict-aliasing
#CFLAGS += -I$(ROOTDIR)/lib/libnvram -I$(ROOTDIR)/$(LINUXDIR)/drivers/char -I$(ROOTDIR)/$(LINUXDIR)/include
#CFLAGS += -I$(ROOTDIR)/$(LINUXDIR)/drivers/flash
CFLAGS += -I$(zte_lib_path)/libnvram
CFLAGS += -I$(zte_lib_path)/libezxml
CFLAGS += -I$(zte_lib_path)/libmxml
CFLAGS += -I$(zte_lib_path)/zlib/install/include
CFLAGS += -I../../goahead/interface5.0/net
CFLAGS += -I../../goahead/interface5.0/wifi
CFLAGS += -I../../goahead/interface5.0/other
CFLAGS += -I../../goahead/interface5.0
CFLAGS += -I../../include
CFLAGS += -I../../wlan
#CFLAGS += -I../../zte_sqlite
#CFLAGS += -I../../soft_timer
CFLAGS += -I$(zte_lib_path)/libsqlite
CFLAGS += -I$(zte_lib_path)/libsoft_timer
CFLAGS += -I../../at_server
CFLAGS += -I../../awps/include
CFLAGS += -I.
#CFLAGS += -I../../sms
ifeq ($(LINUX_TYPE),linux)
CFLAGS += -I$(USR_DIR)
endif
#CFLAGS += -I$(USR_DIR)/zte_apps/soft_timer
#CFLAGS += -I$(USR_DIR)/zte_apps/at_server
CFLAGS += -I../server
CFLAGS += -fPIC -shared -lc
SHAREDFLAG := -fPIC -shared -lc
#CFLAGS += -I$(LIB_DIR)/lib/sms_pbm
ifeq ($(CONFIG_USE_WEBUI_SECURITY),yes)
CFLAGS += -DWEBS_SECURITY
endif
ifeq ($(CONFIG_USE_WEBUI_SSL),yes)
CFLAGS += -DWEBS_SSL_SUPPORT -DOPENSSL
endif
#*******************************************************************************
# macro definition
#*******************************************************************************
ifeq ($(FEATURE_IPV6), YES)
CFLAGS += -DFEATURE_IPV4V6_MODE
endif
ifeq ($(FEATURE_SMS_MODE), CS)
CFLAGS += -DCS_SMS
endif
ifeq ($(CUSTOM_MODEL),MF253)
ifeq ($(CUSTOM_OPERATOR),VIVO_BR)
CFLAGS += -DCUSTOM_VERSION_MF253_VIVO_BR
endif
endif
ifeq ($(FEATURE_TSP_MODE), YES)
CFLAGS += -DFEATURE_TSP_MODEM
endif
ifeq ($(CUSTOM_MODEL), MF253S2)
ifeq ($(CUSTOM_OPERATOR), CM_CN)
CFLAGS += -DCUSTOM_VERSION_MF253S2_CM_CN
endif
endif
#*******************************************************************************
# library
#*******************************************************************************
LDLIBS += -lpthread -lgcc_s
LDLIBS += -lnvram_sc -lsoft_timer_sc -lsqlite -lzte_pbm -lwlan_interface -llog
#*******************************************************************************
# library path
#*******************************************************************************
LDLIBS += -L$(zte_lib_path)/libnvram
LDLIBS += -L$(zte_lib_path)/libsoft_timer
LDLIBS += -L$(zte_lib_path)/libsqlite
LDLIBS += -L$(zte_lib_path)/liblog
LDLIBS += -L$(zte_lib_path)/libzte_pbm
LDLIBS += -L$(zte_lib_path)/../libezxml
LDLIBS += -L$(zte_lib_path)/../libmxml
LDLIBS += -L$(zte_lib_path)/libwlan_interface
CFLAGS += -I$(zte_lib_path)/libssl/install/include
LDLIBS += -L$(zte_lib_path)/libssl/install/lib -lcrypto
#*******************************************************************************
# targets
#*******************************************************************************
all: $(LIBWEBINTERFACE) webuinet webuiwifi webuiother
zte_web_util.o: webuinet webuiwifi webuiother
#all:
# echo $(ROOTDIR) $(LINUXDIR) $(zte_lib_path)
$(LIBWEBINTERFACE): $(OBJS) webuinet webuiwifi webuiother
$(AR) -rc $@ $(OBJS) $(WEBOBJS) $(WIFIOBJS) $(OTHEROBJS)
$(LIBWEBINTERFACE_SHARED): $(OBJS) webuinet webuiwifi webuiother
$(LD) $(SHAREDFLAG) -o $@ $^ $(LDLIBS) $(WEBOBJS) $(WIFIOBJS) $(OTHEROBJS)
# $(STRIP) $@
romfs:
ifeq ($(WEBUI), orig)
webuinet:
@echo
else
webuinet:
cd ./net; echo $$pwd ;$(MAKE) -C ./ all||exit $$?
endif
webuiwifi:
cd ./wifi; echo $$pwd ;$(MAKE) -C ./ all||exit $$?
webuiother:
cd ./other; echo $$pwd ;$(MAKE) -C ./ all||exit $$?
root_fs:
# $(ROMFSINST) -e CONFIG_USER_GOAHEAD /bin/$(LIBWEBINTERFACE)
clean:
-rm -f $(LIBWEBINTERFACE) *.elf *.gdb *.o
-cd ./net && $(MAKE) -C ./ clean
-cd ./wifi && $(MAKE) -C ./ clean
-cd ./other && $(MAKE) -C ./ clean