[FOSS_TLK]tlk: Fix Makefile
Anand Prasad [Mon, 6 Apr 2015 22:36:29 +0000 (15:36 -0700)]
Change-Id: I017909acff10532889c91f1a7cfb97b843750400
Reviewed-on: http://git-master/r/752886
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Inamdar Sharif <isharif@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

Android.mk

index 6d5dbe4..0e3b2e2 100644 (file)
@@ -41,7 +41,6 @@ endif # (t124,$(TARGET_TEGRA_VERSION))
 
 LOCAL_PATH := $(call my-dir)
 
-include $(CLEAR_VARS)
 
 # Enable storage rollback protection for desired devices.
 ifeq ($(BOARD_SUPPORT_ROLLBACK_PROTECTION),true)
@@ -51,18 +50,17 @@ else
 endif
 
 # Local module is tos.img, we also define the tlk target
+include $(NVIDIA_DEFAULTS)
 LOCAL_MODULE := tos.img
 LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_MODULE_PATH := $(PRODUCT_OUT)
 
 TLK_INTERMEDIATES := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE),,,$(LOCAL_2ND_ARCH_VAR_PREFIX))
 TLK_PROJECT := tegra
 
-LOCAL_BUILT_MODULE_STEM := build-$(TLK_PROJECT)/lk.bin
-LK_BIN := $(TLK_INTERMEDIATES)/$(LOCAL_BUILT_MODULE_STEM)
+LK_BIN := $(TLK_INTERMEDIATES)/build-$(TLK_PROJECT)/lk.bin
 tlk: tos.img
-TOSIMAGE := $(PRODUCT_OUT)/tos.img
-ALL_MODULES.$(LOCAL_MODULE).INSTALLED := $(TOSIMAGE)
+TOSIMAGE := $(TLK_INTERMEDIATES)/tos.img
 
 # List of task modules to link with tlk
 TASK_MODULES := \
@@ -129,11 +127,15 @@ $(TOSIMAGE): $(LK_BIN)
 
 .PHONY: $(LK_BIN)
 
-# Needed to clean tos.img
-PRIVATE_CLEAN_FILES := $(TOSIMAGE)
-
+ifeq ($(LOCAL_2ND_ARCH_VAR_PREFIX),)
 ALL_NVIDIA_MODULES += $(LOCAL_MODULE)
+else
+ALL_NVIDIA_MODULES += $(LOCAL_MODULE)_32
+endif
+
+include $(NVIDIA_BASE)
 include $(BUILD_SYSTEM)/base_rules.mk
+include $(NVIDIA_POST)
 
 # Clean variables
 TLK_INTERMEDIATES :=