1# Copyright (C) 2013 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH:= $(call my-dir)
16
17src_files := \
18    memtrack.cpp
19
20include $(CLEAR_VARS)
21LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
22
23LOCAL_SRC_FILES := $(src_files)
24
25LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
26LOCAL_MODULE := memtrack_share
27LOCAL_CFLAGS := -Wall -Werror -Wno-error=unused-value
28
29LOCAL_C_INCLUDES += $(includes)
30LOCAL_SHARED_LIBRARIES := \
31    liblog \
32
33include $(BUILD_EXECUTABLE)
34
35include $(CLEAR_VARS)
36LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
37
38LOCAL_SRC_FILES := $(src_files)
39LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
40LOCAL_MODULE := memtrack
41LOCAL_CFLAGS := -Wall -Werror -Wno-error=unused-value
42
43LOCAL_FORCE_STATIC_EXECUTABLE := true
44LOCAL_STATIC_LIBRARIES := \
45    libc \
46    liblog \
47    libc++abi \
48    libdl \
49
50LOCAL_CXX_STL := libc++_static
51
52# Bug: 18389563 - Today, libc++_static and libgcc have duplicate sybols for
53# __aeabi_uidiv(). Allowing multiple definitions lets the build proceed, but
54# updating compiler-rt to be a superset of libgcc will allow this WAR to be
55# removed.
56LOCAL_LDFLAGS := -Wl,-z,muldefs
57
58include $(BUILD_EXECUTABLE)
59