• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2009 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
15
16LOCAL_PATH := $(call my-dir)
17
18local_src_files := \
19    JNIHelp.cpp \
20    JniConstants.cpp \
21    toStringArray.cpp
22
23
24#
25# Build for the target (device).
26#
27
28include $(CLEAR_VARS)
29LOCAL_SRC_FILES := \
30    $(local_src_files) \
31    JniInvocation.cpp
32LOCAL_SHARED_LIBRARIES := liblog
33LOCAL_MODULE_TAGS := optional
34LOCAL_MODULE := libnativehelper
35LOCAL_CLANG := true
36LOCAL_CFLAGS := -Werror -fvisibility=protected
37LOCAL_C_INCLUDES := libcore/include
38LOCAL_SHARED_LIBRARIES += libcutils libdl
39LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
40include $(BUILD_SHARED_LIBRARY)
41
42
43#
44# NDK-only build for the target (device), using libc++.
45# - Relies only on NDK exposed functionality.
46# - This doesn't include JniInvocation.
47#
48
49include $(CLEAR_VARS)
50LOCAL_MODULE_TAGS := optional
51LOCAL_MODULE := libnativehelper_compat_libc++
52LOCAL_CLANG := true
53LOCAL_C_INCLUDES := \
54    $(LOCAL_PATH)/include/nativehelper
55LOCAL_EXPORT_C_INCLUDE_DIRS := \
56    $(LOCAL_PATH)/include/nativehelper
57LOCAL_CFLAGS := -Werror
58LOCAL_SRC_FILES := $(local_src_files)
59LOCAL_LDFLAGS := -llog -ldl
60LOCAL_SDK_VERSION := 19
61LOCAL_NDK_STL_VARIANT := c++_static
62LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
63include $(BUILD_SHARED_LIBRARY)
64
65
66#
67# Build for the host.
68#
69
70include $(CLEAR_VARS)
71LOCAL_MODULE := libnativehelper
72LOCAL_MODULE_TAGS := optional
73LOCAL_CLANG := true
74LOCAL_SRC_FILES := \
75    $(local_src_files) \
76    JniInvocation.cpp
77LOCAL_CFLAGS := -Werror -fvisibility=protected
78LOCAL_C_INCLUDES := libcore/include
79LOCAL_SHARED_LIBRARIES := liblog
80LOCAL_LDFLAGS := -ldl
81LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
82LOCAL_MULTILIB := both
83include $(BUILD_HOST_SHARED_LIBRARY)
84
85#
86# Tests.
87#
88
89include $(LOCAL_PATH)/tests/Android.mk
90