diff options
author | Tomasz Wasilczyk <twasilczyk@google.com> | 2017-05-08 15:29:10 -0700 |
---|---|---|
committer | Tomasz Wasilczyk <twasilczyk@google.com> | 2017-05-08 15:29:10 -0700 |
commit | e38d3a60bc13a63bf61fe519290747a749553eb5 (patch) | |
tree | b654fc907988f67a047a409a4ad4fb53d5724e88 /libnativebridge | |
parent | 823816ee9f3ee7519a282d3a089d23f0e96018ef (diff) | |
download | core-e38d3a60bc13a63bf61fe519290747a749553eb5.tar.gz core-e38d3a60bc13a63bf61fe519290747a749553eb5.tar.bz2 core-e38d3a60bc13a63bf61fe519290747a749553eb5.zip |
Convert libnativebridge[23]?-dummy to soong.
Bug: 37512442
Test: mmm system/core/libnativebridge/tests
Change-Id: Ib1ca9ef830f58041095226c2ba18d1302c7833b4
Diffstat (limited to 'libnativebridge')
-rw-r--r-- | libnativebridge/Android.bp | 2 | ||||
-rw-r--r-- | libnativebridge/tests/Android.bp | 53 | ||||
-rw-r--r-- | libnativebridge/tests/Android.mk | 2 | ||||
-rw-r--r-- | libnativebridge/tests/Android.nativebridge-dummy.mk | 108 |
4 files changed, 55 insertions, 110 deletions
diff --git a/libnativebridge/Android.bp b/libnativebridge/Android.bp index 5fb56f2d0..377b7dd1e 100644 --- a/libnativebridge/Android.bp +++ b/libnativebridge/Android.bp @@ -22,3 +22,5 @@ cc_library { }, }, } + +subdirs = ["tests"]
\ No newline at end of file diff --git a/libnativebridge/tests/Android.bp b/libnativebridge/tests/Android.bp new file mode 100644 index 000000000..efd397895 --- /dev/null +++ b/libnativebridge/tests/Android.bp @@ -0,0 +1,53 @@ +// +// Copyright (C) 2017 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +cc_defaults { + name: "libnativebridge-dummy-defaults", + + host_supported: true, + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + ], + cppflags: ["-fvisibility=protected"], + target: { + android: { + shared_libs: ["libdl"], + }, + host: { + host_ldlibs: ["-ldl"], + }, + }, +} + +cc_library_shared { + name: "libnativebridge-dummy", + srcs: ["DummyNativeBridge.cpp"], + defaults: ["libnativebridge-dummy-defaults"], +} + +cc_library_shared { + name: "libnativebridge2-dummy", + srcs: ["DummyNativeBridge2.cpp"], + defaults: ["libnativebridge-dummy-defaults"], +} + +cc_library_shared { + name: "libnativebridge3-dummy", + srcs: ["DummyNativeBridge3.cpp"], + defaults: ["libnativebridge-dummy-defaults"], +} diff --git a/libnativebridge/tests/Android.mk b/libnativebridge/tests/Android.mk index c9468f033..70b3fcc6d 100644 --- a/libnativebridge/tests/Android.mk +++ b/libnativebridge/tests/Android.mk @@ -1,8 +1,6 @@ # Build the unit tests. LOCAL_PATH := $(call my-dir) -include $(LOCAL_PATH)/Android.nativebridge-dummy.mk - include $(CLEAR_VARS) # Build the unit tests. diff --git a/libnativebridge/tests/Android.nativebridge-dummy.mk b/libnativebridge/tests/Android.nativebridge-dummy.mk deleted file mode 100644 index 2d78be0a1..000000000 --- a/libnativebridge/tests/Android.nativebridge-dummy.mk +++ /dev/null @@ -1,108 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -NATIVE_BRIDGE_COMMON_SRC_FILES := \ - DummyNativeBridge.cpp - -# Shared library for target -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_MODULE:= libnativebridge-dummy - -LOCAL_SRC_FILES:= $(NATIVE_BRIDGE_COMMON_SRC_FILES) -LOCAL_CLANG := true -LOCAL_CFLAGS += -Werror -Wall -LOCAL_CPPFLAGS := -fvisibility=protected -LOCAL_SHARED_LIBRARIES := libdl -LOCAL_MULTILIB := both - -include $(BUILD_SHARED_LIBRARY) - -# Shared library for host -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_MODULE:= libnativebridge-dummy - -LOCAL_SRC_FILES:= $(NATIVE_BRIDGE_COMMON_SRC_FILES) -LOCAL_CLANG := true -LOCAL_CFLAGS += -Werror -Wall -LOCAL_CPPFLAGS := -fvisibility=protected -LOCAL_LDFLAGS := -ldl -LOCAL_MULTILIB := both - -include $(BUILD_HOST_SHARED_LIBRARY) - - -# v2. - -NATIVE_BRIDGE2_COMMON_SRC_FILES := \ - DummyNativeBridge2.cpp - -# Shared library for target -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_MODULE:= libnativebridge2-dummy - -LOCAL_SRC_FILES:= $(NATIVE_BRIDGE2_COMMON_SRC_FILES) -LOCAL_CLANG := true -LOCAL_CFLAGS += -Werror -Wall -LOCAL_CPPFLAGS := -fvisibility=protected -LOCAL_SHARED_LIBRARIES := libdl -LOCAL_MULTILIB := both - -include $(BUILD_SHARED_LIBRARY) - -# Shared library for host -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_MODULE:= libnativebridge2-dummy - -LOCAL_SRC_FILES:= $(NATIVE_BRIDGE2_COMMON_SRC_FILES) -LOCAL_CLANG := true -LOCAL_CFLAGS += -Werror -Wall -LOCAL_CPPFLAGS := -fvisibility=protected -LOCAL_LDFLAGS := -ldl -LOCAL_MULTILIB := both - -include $(BUILD_HOST_SHARED_LIBRARY) - - -# v3. - -NATIVE_BRIDGE3_COMMON_SRC_FILES := \ - DummyNativeBridge3.cpp - -# Shared library for target -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_MODULE:= libnativebridge3-dummy - -LOCAL_SRC_FILES:= $(NATIVE_BRIDGE3_COMMON_SRC_FILES) -LOCAL_CLANG := true -LOCAL_CFLAGS += -Werror -Wall -LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected -LOCAL_LDFLAGS := -ldl -LOCAL_MULTILIB := both - -include $(BUILD_SHARED_LIBRARY) - -# Shared library for host -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_MODULE:= libnativebridge3-dummy - -LOCAL_SRC_FILES:= $(NATIVE_BRIDGE3_COMMON_SRC_FILES) -LOCAL_CLANG := true -LOCAL_CFLAGS += -Werror -Wall -LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected -LOCAL_LDFLAGS := -ldl -LOCAL_MULTILIB := both - -include $(BUILD_HOST_SHARED_LIBRARY) - - |