| #ifneq ($(MK_SDK_VERSION),yes) |
| # /***************************************************************************** |
| #* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£ |
| #* |
| #* ÎļþÃû³Æ: Makefile |
| #* Îļþ±êʶ: Makefile |
| #* ÄÚÈÝÕªÒª: Makefile of ZTE librarys |
| #* ʹÓ÷½·¨: |
| #* |
| #* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ |
| #* ----------------------------------------------------------------------------- |
| #* |
| # ******************************************************************************/ |
| |
| #******************************************************************************* |
| # include ZTE library makefile |
| #******************************************************************************* |
| #include $(zte_lib_mak) |
| include $(COMMON_MK) |
| |
| #******************************************************************************* |
| # library |
| #******************************************************************************* |
| ifneq ($(LINUX_TYPE),uClinux) |
| #SO := libzcore.so |
| WORKPATH = $(zte_lib_path) |
| else |
| WORKPATH = ${ROOT_DIR}/os/uClinux/lib/zte_libs |
| endif |
| |
| #******************************************************************************* |
| # execute |
| #******************************************************************************* |
| EXEC = libzcore.a |
| |
| #******************************************************************************* |
| # zte_phone config |
| #******************************************************************************* |
| export ZCORE_PATH = $(WORKPATH)/libzcore/std |
| export ZCORE = $(ZCORE_PATH) |
| |
| export FRAME_PATH = $(WORKPATH)/libzcore/std/ws |
| |
| export ZCORE_FRAMEWORK_PATH = $(WORKPATH)/libzcore/std/src/framework |
| export ZCORE_ZCORE_PATH = $(WORKPATH)/libzcore/std/src/zCore |
| export ZCORE_SRC_PATH = $(ZCORE_ZCORE_PATH)/src |
| export ZCORE_INC_PATH = $(ZCORE_ZCORE_PATH)/inc |
| |
| export ZCORE_DEP_PATH = $(zte_app_path)/include |
| |
| #export PRJ_CFG_PATH = $(WORKPATH)/libzcore/std/ws |
| #export ZCORE_LIB_PATH = $(ZCORE_PATH)/lib |
| #export ZCORE_OBJ_PATH = $(ZCORE_PATH)/obj |
| |
| #export ADAPT_INC_PATH = $(ZCORE_PATH)/platadapt/linux/include |
| #export PLATADAPT_PATH = $(ZCORE_PATH)/platadapt/linux |
| #export PLATADAPT_LIB_PATH = $(PLATADAPT_PATH)/lib |
| |
| #export LIB_PATH = $(ZTE_PHONE_PATH)/lib |
| |
| export LIB_ZCORE_ZXIME = libzxime.a |
| |
| #******************************************************************************* |
| # objects |
| #******************************************************************************* |
| OBJS = |
| PRJ_MODS = $(patsubst config_of_%, %, $(filter config_of_%, $(notdir $(shell find $(FRAME_PATH) -maxdepth 1 -type d)))) |
| |
| #******************************************************************************* |
| # include path |
| #******************************************************************************* |
| INCLUE_PATH = -I. |
| CFLAGS += -Wextra -Wall $(INCLUE_PATH) |
| |
| include $(shell find $(FRAME_PATH) -type f -name "cfg_path.mk") |
| |
| #******************************************************************************* |
| # macro definition |
| #******************************************************************************* |
| |
| #******************************************************************************* |
| # library |
| #******************************************************************************* |
| |
| #******************************************************************************* |
| # targets |
| #******************************************************************************* |
| CPUS = $(shell cat /proc/cpuinfo | grep "processor" | wc -l) |
| ifeq ($(CPUS),) |
| CPUS = 1 |
| endif |
| |
| .PHONY: $(EXEC) |
| |
| ifneq ($(MK_SDK_VERSION),yes) |
| all: $(PRJ_MODS) platadaptcom ime |
| else |
| all: $(PRJ_MODS) platadaptcom |
| endif |
| |
| ifneq ($(MK_SDK_VERSION),yes) |
| MODS += src/framework |
| MODS += src/zCore |
| endif |
| MODS += platadapt |
| |
| #LDLIBS += ${ZCORE_LIB_PATH}/*.a |
| |
| romfs: |
| @echo Install $(EXEC)! |
| |
| clean: |
| ifneq ($(MK_SDK_VERSION),yes) |
| -rm -rf $(ZCORE_PATH)/lib/* |
| -rm -rf $(ZCORE_PATH)/obj/* |
| else |
| -rm -rf $(ZCORE_PATH)/lib/libplatadapt_* |
| -rm -rf $(ZCORE_PATH)/obj/phone/platadapt |
| -rm -rf $(ZCORE_PATH)/obj/watch/platadapt |
| -rm -rf $(ZCORE_PATH)/obj/fwp/platadapt |
| -rm -rf $(ZCORE_PATH)/obj/poc/platadapt |
| -rm -rf $(ZCORE_PATH)/obj/platadapt_com |
| -rm -rf $(ZCORE_PATH)/lib/$(LIB_ZCORE_ZXIME) |
| endif |
| -rm $(ZCORE_PATH)/prebuilts/ime/$(LIB_ZCORE_ZXIME) |
| |
| $(PRJ_MODS): |
| @for i in $(MODS) ; do \ |
| [ ! -d "$$i" ] || $(MAKE) -j$(CPUS) -C $$i/ws lib || exit $$?; \ |
| done |
| ifneq ($(MK_SDK_VERSION),yes) |
| rm -rvf $(ZCORE_PATH)/lib/$(EXEC:%.a=%)_$@.a |
| echo "create $(ZCORE_PATH)/lib/$(EXEC:%.a=%)_$@.a" > $(ZCORE_LIB_PATH)/ar.mc |
| @for i in $(ZCORE_LIB_PATH)/*.a ; do \ |
| echo "addlib $$i" >> $(ZCORE_LIB_PATH)/ar.mc; \ |
| done |
| echo "save" >> $(ZCORE_LIB_PATH)/ar.mc |
| echo "end" >> $(ZCORE_LIB_PATH)/ar.mc |
| $(AR) -M < $(ZCORE_LIB_PATH)/ar.mc |
| $(RANLIB) $(ZCORE_PATH)/lib/$(EXEC:%.a=%)_$@.a |
| endif |
| |
| platadaptcom: |
| $(MAKE) -C $(ZCORE)/platadapt/com lib |
| -mv $(ZCORE_PATH)/lib/$(LIB_ZCORE_ZXIME) $(ZCORE_PATH)/prebuilts/ime/ |
| |
| ifneq ($(MK_SDK_VERSION),yes) |
| ime: |
| $(MAKE) -C $(ZCORE_FRAMEWORK_PATH)/ime lib |
| -mv $(ZCORE_PATH)/lib/ime.a $(ZCORE_PATH)/prebuilts/ime/imeengine.a |
| endif |
| |
| #endif |
| |