153cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# 253cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# Copyright (C) 2014 The Android Open Source Project 353cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# 453cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# Licensed under the Apache License, Version 2.0 (the "License"); 553cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# you may not use this file except in compliance with the License. 653cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# You may obtain a copy of the License at 753cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# 853cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# http://www.apache.org/licenses/LICENSE-2.0 953cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# 1053cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# Unless required by applicable law or agreed to in writing, software 1153cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# distributed under the License is distributed on an "AS IS" BASIS, 1253cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1353cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# See the License for the specific language governing permissions and 1453cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# limitations under the License. 1553cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# 1653cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light 1753cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex LightLOCAL_PATH := $(call my-dir) 1853cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light 1953cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightinclude art/build/Android.executable.mk 2053cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light 2153cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex LightPATCHOAT_SRC_FILES := \ 2253cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light patchoat.cc 2353cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light 2453cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# TODO: Remove this when the framework (installd) supports pushing the 2553cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# right instruction-set parameter for the primary architecture. 2653cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightifneq ($(filter ro.zygote=zygote64,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES)),) 2753cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light patchoat_arch := 64 2853cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightelse 2953cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light patchoat_arch := 32 3053cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightendif 3153cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light 3253cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightifeq ($(ART_BUILD_TARGET_NDEBUG),true) 3353cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light $(eval $(call build-art-executable,patchoat,$(PATCHOAT_SRC_FILES),libcutils,art/compiler,target,ndebug,$(patchoat_arch))) 3453cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightendif 3553cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightifeq ($(ART_BUILD_TARGET_DEBUG),true) 3653cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light $(eval $(call build-art-executable,patchoat,$(PATCHOAT_SRC_FILES),libcutils,art/compiler,target,debug,$(patchoat_arch))) 3753cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightendif 3853cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light 3953cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Light# We always build patchoat and dependencies, even if the host build is otherwise disabled, since they are used to cross compile for the target. 4076ab347dc9b89970da1451568965ee208c728c43Junmo Parkifeq ($(ART_BUILD_HOST_NDEBUG),true) 413296f4cb397f75044e7bd5f9b345f4b29d0275f3Richard Uhler $(eval $(call build-art-executable,patchoat,$(PATCHOAT_SRC_FILES),libcutils,art/compiler,host,ndebug)) 4253cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightendif 4376ab347dc9b89970da1451568965ee208c728c43Junmo Parkifeq ($(ART_BUILD_HOST_DEBUG),true) 443296f4cb397f75044e7bd5f9b345f4b29d0275f3Richard Uhler $(eval $(call build-art-executable,patchoat,$(PATCHOAT_SRC_FILES),libcutils,art/compiler,host,debug)) 4553cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightendif 46