From 689d34c48f0783e497f5e8e06eddbe11e8c593e6 Mon Sep 17 00:00:00 2001 From: Jack Yen Date: Tue, 14 Aug 2012 10:00:14 -0500 Subject: TICPU: Fix Android.mk to allow successful copy of binaries Binaries don't copy to the out directory on a clean build. Change-Id: I108935548208957d46e0a0b3b9c1c10fa0f651ab Signed-off-by: Jack Yen --- ticpu/Android.mk | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/ticpu/Android.mk b/ticpu/Android.mk index f59715b..59f9b57 100755 --- a/ticpu/Android.mk +++ b/ticpu/Android.mk @@ -15,6 +15,37 @@ # LOCAL_PATH := $(call my-dir) - $(shell cp -afr $(LOCAL_PATH)/lib/android/* $(TARGET_OUT)/vendor/lib) +#Copying libbltsville_ticpu.VERSION.so +include $(CLEAR_VARS) +BV_CPUVERSION :=$(shell ls external/bltsville/ticpu/lib/android/libbltsville_*.*.so|\ + sed 's/external\/bltsville\/ticpu\/lib\/android\/libbltsville_ticpu.//') +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := SHARED_LIBRARIES +LOCAL_MODULE := libbltsville_ticpu.$(BV_CPUVERSION) +LOCAL_SRC_FILES := lib/android/libbltsville_ticpu.$(BV_CPUVERSION) +LOCAL_MODULE_PATH:= $(TARGET_OUT_VENDOR)/lib +include $(BUILD_PREBUILT) + +#Creating SymLinks +#libbltsville_ticpu.so -> libbltsville_ticpu.VERSION.so +#libbltsville_cpu.so -> libbltsville_ticpu.so +SYMLINKS := $(TARGET_OUT_VENDOR)/lib/libbltsville_ticpu.so +$(SYMLINKS): TICPU_BINARY := ./libbltsville_ticpu.$(BV_CPUVERSION) +$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk + @echo "Symlink: $@ -> $(TICPU_BINARY)" + @mkdir -p $(dir $@) + @rm -rf $@ + $(hide) ln -fs $(TICPU_BINARY) $@ + @cp -afr external/bltsville/ticpu/lib/android/libbltsville_ticpu_license.txt $(TARGET_OUT_VENDOR)/lib +ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) + +SYMLINKS1 := $(TARGET_OUT_VENDOR)/lib/libbltsville_cpu.so +$(SYMLINKS1): LINK_BINARY := ./libbltsville_ticpu.so +$(SYMLINKS1): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk + @echo "Symlink: $@ -> $(LINK_BINARY)" + @mkdir -p $(dir $@) + @rm -rf $@ + $(hide) ln -fs $(LINK_BINARY) $@ +ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS1) -- cgit v1.1