diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2016-08-29 20:32:11 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-08-29 20:32:12 +0000 |
commit | 10348cbeb916811dd64facfec2620e91df97476d (patch) | |
tree | 864f8d3e7cb9667cac8b0af954543f872207de54 /libsync | |
parent | 73d2cc570d10e527af60cfb7fe94cc4902189e66 (diff) | |
parent | 194edf772e4df2ade86acf97f616243aaef205fc (diff) | |
download | system_core-10348cbeb916811dd64facfec2620e91df97476d.tar.gz system_core-10348cbeb916811dd64facfec2620e91df97476d.tar.bz2 system_core-10348cbeb916811dd64facfec2620e91df97476d.zip |
Merge "Convert to Android.bp"
Diffstat (limited to 'libsync')
-rw-r--r-- | libsync/Android.bp | 42 | ||||
-rw-r--r-- | libsync/Android.mk | 30 | ||||
-rw-r--r-- | libsync/tests/Android.mk | 29 |
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 @@ +cc_defaults { + name: "libsync_defaults", + srcs: ["sync.c"], + local_include_dirs: ["include"], + export_include_dirs: ["include"], + cflags: ["-Werror"], +} + +cc_library_shared { + name: "libsync", + defaults: ["libsync_defaults"], +} + +// libsync_recovery is only intended for the recovery binary. +// Future versions of the kernel WILL require an updated libsync, and will break +// anything statically linked against the current libsync. +cc_library_static { + name: "libsync_recovery", + defaults: ["libsync_defaults"], +} + +cc_test { + name: "sync_test", + defaults: ["libsync_defaults"], + gtest: false, + srcs: ["sync_test.c"], +} + +cc_test { + name: "sync-unit-tests", + shared_libs: ["libsync"], + srcs: ["tests/sync_test.cpp"], + cflags: [ + "-g", + "-Wall", + "-Werror", + "-std=gnu++11", + "-Wno-missing-field-initializers", + "-Wno-sign-compare", + ], + clang: true, +} 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 @@ -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := sync.c -LOCAL_MODULE := libsync -LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include -LOCAL_CFLAGS := -Werror -include $(BUILD_SHARED_LIBRARY) - -# libsync_recovery is only intended for the recovery binary. -# Future versions of the kernel WILL require an updated libsync, and will break -# anything statically linked against the current libsync. -include $(CLEAR_VARS) -LOCAL_SRC_FILES := sync.c -LOCAL_MODULE := libsync_recovery -LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include -LOCAL_CFLAGS := -Werror -include $(BUILD_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := sync.c sync_test.c -LOCAL_MODULE := sync_test -LOCAL_MODULE_TAGS := optional tests -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include -LOCAL_CFLAGS := -Werror -include $(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 @@ -# -# Copyright 2014 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. -# - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_CLANG := true -LOCAL_MODULE := sync-unit-tests -LOCAL_CFLAGS += -g -Wall -Werror -std=gnu++11 -Wno-missing-field-initializers -Wno-sign-compare -LOCAL_SHARED_LIBRARIES += libsync -LOCAL_STATIC_LIBRARIES += libgtest_main -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include -LOCAL_C_INCLUDES += $(LOCAL_PATH)/.. -LOCAL_SRC_FILES := \ - sync_test.cpp -include $(BUILD_NATIVE_TEST) |