Dan Bornstein | 3f30fc0 | 2009-07-21 16:08:39 -0700 | [diff] [blame] | 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. |
The Android Open Source Project | 7f844dd | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 14 | |
Dan Bornstein | 3f30fc0 | 2009-07-21 16:08:39 -0700 | [diff] [blame] | 15 | |
| 16 | LOCAL_PATH := $(call my-dir) |
| 17 | |
Elliott Hughes | 73d3c2e | 2012-05-03 17:06:04 -0700 | [diff] [blame] | 18 | local_src_files := \ |
Brian Carlstrom | dd8af23 | 2012-05-13 23:56:07 -0700 | [diff] [blame] | 19 | JNIHelp.cpp \ |
| 20 | JniConstants.cpp \ |
| 21 | toStringArray.cpp |
Dan Bornstein | 3f30fc0 | 2009-07-21 16:08:39 -0700 | [diff] [blame] | 22 | |
| 23 | |
| 24 | # |
| 25 | # Build for the target (device). |
| 26 | # |
| 27 | |
| 28 | include $(CLEAR_VARS) |
Ruben Brunk | a77f3a2 | 2013-09-09 02:21:31 -0700 | [diff] [blame] | 29 | LOCAL_SRC_FILES := \ |
| 30 | $(local_src_files) \ |
| 31 | JniInvocation.cpp |
Elliott Hughes | 73d3c2e | 2012-05-03 17:06:04 -0700 | [diff] [blame] | 32 | LOCAL_SHARED_LIBRARIES := liblog |
Jesse Wilson | 51c0f5b | 2010-09-16 15:56:25 -0700 | [diff] [blame] | 33 | LOCAL_MODULE_TAGS := optional |
The Android Open Source Project | 7f844dd | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 34 | LOCAL_MODULE := libnativehelper |
Andreas Gampe | 73ff0de | 2014-08-25 14:58:30 -0700 | [diff] [blame] | 35 | LOCAL_CLANG := true |
Andreas Gampe | 5f4f4aa | 2014-08-19 16:57:38 -0700 | [diff] [blame] | 36 | LOCAL_CFLAGS := -Werror -fvisibility=protected |
Dan Albert | 32392a3 | 2014-09-26 10:27:04 -0700 | [diff] [blame] | 37 | LOCAL_C_INCLUDES := libcore/include |
| 38 | LOCAL_SHARED_LIBRARIES += libcutils libdl |
Brian Carlstrom | b2acfa2 | 2013-06-19 15:09:28 -0700 | [diff] [blame] | 39 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
The Android Open Source Project | 7f844dd | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 40 | include $(BUILD_SHARED_LIBRARY) |
Dan Bornstein | 3f30fc0 | 2009-07-21 16:08:39 -0700 | [diff] [blame] | 41 | |
Ruben Brunk | a77f3a2 | 2013-09-09 02:21:31 -0700 | [diff] [blame] | 42 | |
Sam Hasinoff | 9a321e1 | 2014-04-24 17:52:07 -0700 | [diff] [blame] | 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 | |
| 49 | include $(CLEAR_VARS) |
| 50 | LOCAL_MODULE_TAGS := optional |
| 51 | LOCAL_MODULE := libnativehelper_compat_libc++ |
Andreas Gampe | 73ff0de | 2014-08-25 14:58:30 -0700 | [diff] [blame] | 52 | LOCAL_CLANG := true |
Sam Hasinoff | 9a321e1 | 2014-04-24 17:52:07 -0700 | [diff] [blame] | 53 | LOCAL_C_INCLUDES := \ |
| 54 | $(LOCAL_PATH)/include/nativehelper |
| 55 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 56 | $(LOCAL_PATH)/include/nativehelper |
| 57 | LOCAL_CFLAGS := -Werror |
| 58 | LOCAL_SRC_FILES := $(local_src_files) |
Nicolas Geoffray | 9d5ffd8 | 2014-05-07 17:57:25 +0000 | [diff] [blame] | 59 | LOCAL_LDFLAGS := -llog -ldl |
Sam Hasinoff | 9a321e1 | 2014-04-24 17:52:07 -0700 | [diff] [blame] | 60 | LOCAL_SDK_VERSION := 19 |
| 61 | LOCAL_NDK_STL_VARIANT := c++_static |
| 62 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 63 | include $(BUILD_SHARED_LIBRARY) |
Ruben Brunk | a77f3a2 | 2013-09-09 02:21:31 -0700 | [diff] [blame] | 64 | |
Dan Bornstein | 3f30fc0 | 2009-07-21 16:08:39 -0700 | [diff] [blame] | 65 | |
| 66 | # |
| 67 | # Build for the host. |
| 68 | # |
| 69 | |
Elliott Hughes | 73d3c2e | 2012-05-03 17:06:04 -0700 | [diff] [blame] | 70 | include $(CLEAR_VARS) |
| 71 | LOCAL_MODULE := libnativehelper |
| 72 | LOCAL_MODULE_TAGS := optional |
Andreas Gampe | 73ff0de | 2014-08-25 14:58:30 -0700 | [diff] [blame] | 73 | LOCAL_CLANG := true |
Ruben Brunk | a77f3a2 | 2013-09-09 02:21:31 -0700 | [diff] [blame] | 74 | LOCAL_SRC_FILES := \ |
| 75 | $(local_src_files) \ |
| 76 | JniInvocation.cpp |
Andreas Gampe | 5f4f4aa | 2014-08-19 16:57:38 -0700 | [diff] [blame] | 77 | LOCAL_CFLAGS := -Werror -fvisibility=protected |
Brian Carlstrom | dd8af23 | 2012-05-13 23:56:07 -0700 | [diff] [blame] | 78 | LOCAL_C_INCLUDES := libcore/include |
Elliott Hughes | 73d3c2e | 2012-05-03 17:06:04 -0700 | [diff] [blame] | 79 | LOCAL_SHARED_LIBRARIES := liblog |
Nicolas Geoffray | 9d5ffd8 | 2014-05-07 17:57:25 +0000 | [diff] [blame] | 80 | LOCAL_LDFLAGS := -ldl |
Brian Carlstrom | b2acfa2 | 2013-06-19 15:09:28 -0700 | [diff] [blame] | 81 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Ian Rogers | 9305a75 | 2014-06-16 08:25:45 -0700 | [diff] [blame] | 82 | LOCAL_MULTILIB := both |
Elliott Hughes | 73d3c2e | 2012-05-03 17:06:04 -0700 | [diff] [blame] | 83 | include $(BUILD_HOST_SHARED_LIBRARY) |
Ningsheng Jian | 88b84ec | 2014-09-17 13:34:09 +0800 | [diff] [blame] | 84 | |
| 85 | # |
| 86 | # Tests. |
| 87 | # |
| 88 | |
| 89 | include $(LOCAL_PATH)/tests/Android.mk |