blob: f016361d677b58f0b95ff391bd9a609c8e338d30 [file] [log] [blame]
Dmitriy Ivanov06b1b8c2014-12-02 14:00:13 -08001#
2# Copyright (C) 2014 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86))
18LINKER = linker64
19else
20LINKER = linker
21endif
22
23ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
24# gtest needs ANDROID_DATA/local/tmp for death test output.
25# Make sure to create ANDROID_DATA/local/tmp if doesn't exist.
26# bionic itself should always work relative to ANDROID_DATA or ANDROID_ROOT.
27bionic-prepare-run-on-host: $(TARGET_OUT_EXECUTABLES)/$(LINKER) $(TARGET_OUT)/etc/hosts $(TARGET_OUT_EXECUTABLES)/sh
28 if [ ! -d /system ]; then \
29 echo "Attempting to create /system"; \
30 sudo mkdir -p -m 0777 /system; \
31 fi
32 mkdir -p $(TARGET_OUT_DATA)/local/tmp
33 ln -fs `realpath $(TARGET_OUT)/bin` /system/
34 ln -fs `realpath $(TARGET_OUT)/etc` /system/
35 ln -fs `realpath $(TARGET_OUT)/lib` /system/
36 if [ -d "$(TARGET_OUT)/lib64" ]; then \
37 ln -fs `realpath $(TARGET_OUT)/lib64` /system/; \
38 fi
39endif