#************************************************************************
#* Copyright (C), 2013  huawei Tech. Co., Ltd.                          *
#* All Rights Reserved                                                  *
#*                                                                      *
#* File name: makefile                                                  *
#*                                                                      *
#* Description : make rules for huawei app           .                         *
#*                                                                      *
#* Author:  fengxianzhong                                               *
#*                                                                      *
#* Version: v1.0                                                        *
#*                                                                      *
#* Date:  2013-04-18                                                    *
#************************************************************************

CC = /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/arm-uclibc-linux-2.6.36-gcc

CROSS_COMPILE = /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/arm-uclibc-linux-2.6.36-

AR = $(CROSS_COMPILE)ar

WEBSDK_ROOT := $(shell pwd)/../../source

ROUTER_ROOT := $(shell pwd)/../../source

TARGETDIR := $(shell pwd)/../obj

INCLUDEDIR := $(WEBSDK_ROOT)/include

OFFLOAD_ROOT := $(ROUTER_ROOT)/netplatform/offload/

ROUTER_INCLUDEDIR := $(ROUTER_ROOT)/netplatforminc

include product.min

export
#̬:밴й̶˳룬벻Ҫ޸ --------
startbuild:
	cd $(WEBSDK_ROOT)/libplatform/cpelib && make  -f makefile_libplatform
	
	cd $(WEBSDK_ROOT)/common && make  -f makefile_common
	
	cd $(WEBSDK_ROOT)/ats/atproxy && make  -f makefile_atproxy
	
	cd $(WEBSDK_ROOT)/approot/src/linux/syswatch_api && make  -f makefile_approot_api
	
	cd $(WEBSDK_ROOT)/notify/linux/post_event && make  -f makefile_post_event
	
	cd $(WEBSDK_ROOT)/upnp_lib && make  -f makefile_upnp_lib
	
###·Э--------------------------------------

	cd $(WEBSDK_ROOT)/netplatform && make 

###ģ --------------------------------------
	cd $(WEBSDK_ROOT)/approot && make  -f makefile_approot

	cd $(WEBSDK_ROOT)/notify/linux/notify_server && make  -f makefile_notify_sever
	
	cd $(WEBSDK_ROOT)/ats/atserver && make  -f makefile_ats

	cd $(WEBSDK_ROOT)/webserver && make  -f makefile_webserver

###ҵģ --------------------------------------

	cd $(WEBSDK_ROOT)/device && make  -f makefile_device
	
	cd $(WEBSDK_ROOT)/agent && make  -f makefile_agent
	
	cd $(WEBSDK_ROOT)/sms && make  -f makefile_sms
	
	cd $(WEBSDK_ROOT)/router && make  -f makefile_router

	cd $(WEBSDK_ROOT)/multiupg && make  -f makefile_multiupg
	cd $(WEBSDK_ROOT)/upgprocess && make  -f makefile_upgprocess
	
ifneq ($(findstring WEB_FEATURE_OLED, $(APP_DEFINE)),)
	cd $(WEBSDK_ROOT)/oled && make  -f makefile_oled
endif

ifneq ($(findstring WEB_FEATURE_LED, $(APP_DEFINE)),)
	cd $(WEBSDK_ROOT)/led && make  -f makefile_led
endif

ifneq ($(findstring FEATURE_HUAWEI_MBB_ATPROXY, $(APP_DEFINE)),)
	cd $(WEBSDK_ROOT)/atproxy && make  -f makefile_atproxy
endif

ifneq ($(findstring MBB_FEATURE_CWMP, $(APP_DEFINE)),)
	cd $(WEBSDK_ROOT)/cwmp && make  -f makefile_cwmp
endif

ifneq ($(findstring MBB_FEATURE_VOICE, $(APP_DEFINE)),)
	cd $(WEBSDK_ROOT)/voice && make  -f makefile_voice
endif
ifneq ($(findstring MBB_FEATURE_SYSGUARD, $(APP_DEFINE)),)
	cd $(WEBSDK_ROOT)/sysguard && make  -f makefile
endif