• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2014 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
15include $(CLEAR_VARS)
16
17LOCAL_MODULE_TARGET_ARCH := $(VALGRIND_SUPPORTED_ARCH)
18
19LOCAL_ARM_MODE := arm
20ifeq ($(vg_build_second_arch),true)
21LOCAL_MULTILIB := 32
22vg_local_arch := $(TARGET_2ND_ARCH)
23vg_local_android_arch := $(TARGET_2ND_ARCH)
24else
25LOCAL_MULTILIB := first
26vg_local_arch  := $(vg_arch)
27vg_local_android_arch := $(TARGET_ARCH)
28endif
29
30# Do not call (builtin) memset from VG(memset).
31LOCAL_CLANG_CFLAGS += -fno-builtin-memset
32
33LOCAL_MODULE := $(vg_local_module)-$(vg_local_arch)-linux
34
35LOCAL_MODULE_TARGET_ARCH := $(vg_local_android_arch)
36
37LOCAL_SRC_FILES := $(vg_local_src_files)
38
39LOCAL_C_INCLUDES := $(common_includes) $(vg_local_c_includes)
40
41LOCAL_PACK_MODULE_RELOCATIONS := false
42
43LOCAL_CFLAGS := $(vg_local_cflags)
44LOCAL_CFLAGS_$(TARGET_ARCH) := $(vg_local_target_arch_cflags)
45LOCAL_CFLAGS_$(TARGET_2ND_ARCH) := $(vg_local_target_2nd_arch_cflags)
46
47LOCAL_ASFLAGS := $(common_cflags)
48LOCAL_ASFLAGS_$(TARGET_ARCH) := $(vg_local_target_arch_cflags)
49LOCAL_ASFLAGS_$(TARGET_2ND_ARCH) := $(vg_local_target_2nd_arch_cflags)
50
51
52LOCAL_LDFLAGS := $(vg_local_ldflags)
53
54LOCAL_MODULE_CLASS := $(vg_local_module_class)
55
56LOCAL_STATIC_LIBRARIES := \
57    $(foreach l,$(vg_local_static_libraries),$l-$(vg_local_arch)-linux)
58LOCAL_WHOLE_STATIC_LIBRARIES := \
59    $(foreach l,$(vg_local_whole_static_libraries),$l-$(vg_local_arch)-linux)
60
61ifeq ($(vg_local_target),EXECUTABLE)
62  LOCAL_FORCE_STATIC_EXECUTABLE := true
63  LOCAL_NO_FPIE := true
64endif
65
66ifneq ($(vg_local_target),STATIC_LIBRARY)
67  LOCAL_MODULE_PATH=$(PRODUCT_OUT)$(vg_target_module_path)
68endif
69
70ifeq ($(vg_local_without_system_shared_libraries),true)
71  LOCAL_SYSTEM_SHARED_LIBRARIES :=
72endif
73
74ifeq ($(vg_local_no_crt),true)
75  LOCAL_NO_CRT := true
76endif
77
78include $(BUILD_$(vg_local_target))
79