summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot2016-08-29 15:32:11 -0500
committerGerrit Code Review2016-08-29 15:32:12 -0500
commit10348cbeb916811dd64facfec2620e91df97476d (patch)
tree864f8d3e7cb9667cac8b0af954543f872207de54 /libsync
parent73d2cc570d10e527af60cfb7fe94cc4902189e66 (diff)
parent194edf772e4df2ade86acf97f616243aaef205fc (diff)
downloadplatform-system-core-10348cbeb916811dd64facfec2620e91df97476d.tar.gz
platform-system-core-10348cbeb916811dd64facfec2620e91df97476d.tar.xz
platform-system-core-10348cbeb916811dd64facfec2620e91df97476d.zip
Merge "Convert to Android.bp"
Diffstat (limited to 'libsync')
-rw-r--r--libsync/Android.bp42
-rw-r--r--libsync/Android.mk30
-rw-r--r--libsync/tests/Android.mk29
3 files changed, 42 insertions, 59 deletions
diff --git a/libsync/Android.bp b/libsync/Android.bp
new file mode 100644
index 000000000..4948aa524
--- /dev/null
+++ b/libsync/Android.bp
@@ -0,0 +1,42 @@
1cc_defaults {
2 name: "libsync_defaults",
3 srcs: ["sync.c"],
4 local_include_dirs: ["include"],
5 export_include_dirs: ["include"],
6 cflags: ["-Werror"],
7}
8
9cc_library_shared {
10 name: "libsync",
11 defaults: ["libsync_defaults"],
12}
13
14// libsync_recovery is only intended for the recovery binary.
15// Future versions of the kernel WILL require an updated libsync, and will break
16// anything statically linked against the current libsync.
17cc_library_static {
18 name: "libsync_recovery",
19 defaults: ["libsync_defaults"],
20}
21
22cc_test {
23 name: "sync_test",
24 defaults: ["libsync_defaults"],
25 gtest: false,
26 srcs: ["sync_test.c"],
27}
28
29cc_test {
30 name: "sync-unit-tests",
31 shared_libs: ["libsync"],
32 srcs: ["tests/sync_test.cpp"],
33 cflags: [
34 "-g",
35 "-Wall",
36 "-Werror",
37 "-std=gnu++11",
38 "-Wno-missing-field-initializers",
39 "-Wno-sign-compare",
40 ],
41 clang: true,
42}
diff --git a/libsync/Android.mk b/libsync/Android.mk
deleted file mode 100644
index f407bd119..000000000
--- a/libsync/Android.mk
+++ /dev/null
@@ -1,30 +0,0 @@
1LOCAL_PATH:= $(call my-dir)
2
3include $(CLEAR_VARS)
4LOCAL_SRC_FILES := sync.c
5LOCAL_MODULE := libsync
6LOCAL_MODULE_TAGS := optional
7LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
8LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
9LOCAL_CFLAGS := -Werror
10include $(BUILD_SHARED_LIBRARY)
11
12# libsync_recovery is only intended for the recovery binary.
13# Future versions of the kernel WILL require an updated libsync, and will break
14# anything statically linked against the current libsync.
15include $(CLEAR_VARS)
16LOCAL_SRC_FILES := sync.c
17LOCAL_MODULE := libsync_recovery
18LOCAL_MODULE_TAGS := optional
19LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
20LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
21LOCAL_CFLAGS := -Werror
22include $(BUILD_STATIC_LIBRARY)
23
24include $(CLEAR_VARS)
25LOCAL_SRC_FILES := sync.c sync_test.c
26LOCAL_MODULE := sync_test
27LOCAL_MODULE_TAGS := optional tests
28LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
29LOCAL_CFLAGS := -Werror
30include $(BUILD_EXECUTABLE)
diff --git a/libsync/tests/Android.mk b/libsync/tests/Android.mk
deleted file mode 100644
index 8137c7af6..000000000
--- a/libsync/tests/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
1#
2# Copyright 2014 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17LOCAL_PATH:= $(call my-dir)
18
19include $(CLEAR_VARS)
20LOCAL_CLANG := true
21LOCAL_MODULE := sync-unit-tests
22LOCAL_CFLAGS += -g -Wall -Werror -std=gnu++11 -Wno-missing-field-initializers -Wno-sign-compare
23LOCAL_SHARED_LIBRARIES += libsync
24LOCAL_STATIC_LIBRARIES += libgtest_main
25LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include
26LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
27LOCAL_SRC_FILES := \
28 sync_test.cpp
29include $(BUILD_NATIVE_TEST)