summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen2016-07-13 00:10:56 -0500
committerDan Willemsen2016-07-13 19:41:45 -0500
commit45f05240c2d9d1f3903e2766b4883e256288f6c2 (patch)
treeee0405336f534c9b00448860c3df845452e43223
parentdc9fbc34402a61ca9b23714b78cac4f92ee113e2 (diff)
downloadplatform-system-core-45f05240c2d9d1f3903e2766b4883e256288f6c2.tar.gz
platform-system-core-45f05240c2d9d1f3903e2766b4883e256288f6c2.tar.xz
platform-system-core-45f05240c2d9d1f3903e2766b4883e256288f6c2.zip
Convert more Android.mk files to Android.bp
These modules have their dependencies satisfied, and aren't doing anything strange. Change-Id: I72039a15256cbd5e5eee0d79a15d66d74a6c087d
-rw-r--r--adf/Android.bp1
-rw-r--r--adf/Android.mk18
-rw-r--r--adf/libadf/Android.bp21
-rw-r--r--adf/libadf/Android.mk24
-rw-r--r--adf/libadf/tests/Android.bp22
-rw-r--r--adf/libadf/tests/Android.mk23
-rw-r--r--adf/libadfhwc/Android.bp29
-rw-r--r--adf/libadfhwc/Android.mk25
-rw-r--r--libdiskconfig/Android.bp32
-rw-r--r--libdiskconfig/Android.mk29
-rw-r--r--libion/Android.bp25
-rw-r--r--libion/Android.mk22
-rw-r--r--libion/tests/Android.bp36
-rw-r--r--libion/tests/Android.mk33
-rw-r--r--libmemtrack/Android.bp30
-rw-r--r--libmemtrack/Android.mk20
-rw-r--r--libnativebridge/Android.bp25
-rw-r--r--libnativebridge/Android.mk54
-rw-r--r--libsparse/Android.bp78
-rw-r--r--libsparse/Android.mk100
-rw-r--r--libsuspend/Android.bp21
-rw-r--r--libsuspend/Android.mk33
-rw-r--r--logwrapper/Android.bp36
-rw-r--r--logwrapper/Android.mk37
-rw-r--r--reboot/Android.bp8
-rw-r--r--reboot/Android.mk14
-rw-r--r--tzdatacheck/Android.bp14
-rw-r--r--tzdatacheck/Android.mk21
28 files changed, 378 insertions, 453 deletions
diff --git a/adf/Android.bp b/adf/Android.bp
new file mode 100644
index 000000000..b44c29601
--- /dev/null
+++ b/adf/Android.bp
@@ -0,0 +1 @@
subdirs = ["*"]
diff --git a/adf/Android.mk b/adf/Android.mk
deleted file mode 100644
index 64d486e50..000000000
--- a/adf/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
1#
2# Copyright (C) 2013 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#
16LOCAL_PATH := $(my-dir)
17
18include $(call first-makefiles-under,$(LOCAL_PATH))
diff --git a/adf/libadf/Android.bp b/adf/libadf/Android.bp
new file mode 100644
index 000000000..2b5461e3b
--- /dev/null
+++ b/adf/libadf/Android.bp
@@ -0,0 +1,21 @@
1// Copyright (C) 2013 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
15cc_library_static {
16 name: "libadf",
17 srcs: ["adf.c"],
18 cflags: ["-Werror"],
19 local_include_dirs: ["include"],
20 export_include_dirs: ["include"],
21}
diff --git a/adf/libadf/Android.mk b/adf/libadf/Android.mk
deleted file mode 100644
index 7df354bc2..000000000
--- a/adf/libadf/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
1# Copyright (C) 2013 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
15LOCAL_PATH:= $(call my-dir)
16
17include $(CLEAR_VARS)
18LOCAL_SRC_FILES := adf.c
19LOCAL_MODULE := libadf
20LOCAL_MODULE_TAGS := optional
21LOCAL_CFLAGS += -Werror
22LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
23LOCAL_C_INCLUDES += $(LOCAL_EXPORT_C_INCLUDE_DIRS)
24include $(BUILD_STATIC_LIBRARY)
diff --git a/adf/libadf/tests/Android.bp b/adf/libadf/tests/Android.bp
new file mode 100644
index 000000000..7b333004d
--- /dev/null
+++ b/adf/libadf/tests/Android.bp
@@ -0,0 +1,22 @@
1//
2// Copyright (C) 2013 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
17cc_test {
18 name: "adf-unit-tests",
19 srcs: ["adf_test.cpp"],
20 static_libs: ["libadf"],
21 cflags: ["-Werror"],
22}
diff --git a/adf/libadf/tests/Android.mk b/adf/libadf/tests/Android.mk
deleted file mode 100644
index 68e5817fc..000000000
--- a/adf/libadf/tests/Android.mk
+++ /dev/null
@@ -1,23 +0,0 @@
1#
2# Copyright (C) 2013 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#
16LOCAL_PATH := $(my-dir)
17
18include $(CLEAR_VARS)
19LOCAL_SRC_FILES := adf_test.cpp
20LOCAL_MODULE := adf-unit-tests
21LOCAL_STATIC_LIBRARIES := libadf
22LOCAL_CFLAGS += -Werror
23include $(BUILD_NATIVE_TEST)
diff --git a/adf/libadfhwc/Android.bp b/adf/libadfhwc/Android.bp
new file mode 100644
index 000000000..86f0c9c21
--- /dev/null
+++ b/adf/libadfhwc/Android.bp
@@ -0,0 +1,29 @@
1// Copyright (C) 2013 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
15cc_library_static {
16 name: "libadfhwc",
17 srcs: ["adfhwc.cpp"],
18 static_libs: [
19 "libadf",
20 "liblog",
21 "libutils",
22 ],
23 cflags: [
24 "-DLOG_TAG=\\\"adfhwc\\\"",
25 "-Werror",
26 ],
27 local_include_dirs: ["include"],
28 export_include_dirs: ["include"],
29}
diff --git a/adf/libadfhwc/Android.mk b/adf/libadfhwc/Android.mk
deleted file mode 100644
index 898f9c967..000000000
--- a/adf/libadfhwc/Android.mk
+++ /dev/null
@@ -1,25 +0,0 @@
1# Copyright (C) 2013 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
15LOCAL_PATH:= $(call my-dir)
16
17include $(CLEAR_VARS)
18LOCAL_SRC_FILES := adfhwc.cpp
19LOCAL_MODULE := libadfhwc
20LOCAL_MODULE_TAGS := optional
21LOCAL_STATIC_LIBRARIES := libadf liblog libutils
22LOCAL_CFLAGS += -DLOG_TAG=\"adfhwc\" -Werror
23LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
24LOCAL_C_INCLUDES += $(LOCAL_EXPORT_C_INCLUDE_DIRS)
25include $(BUILD_STATIC_LIBRARY)
diff --git a/libdiskconfig/Android.bp b/libdiskconfig/Android.bp
new file mode 100644
index 000000000..041fd63b0
--- /dev/null
+++ b/libdiskconfig/Android.bp
@@ -0,0 +1,32 @@
1cc_library {
2 name: "libdiskconfig",
3 srcs: [
4 "diskconfig.c",
5 "diskutils.c",
6 "write_lst.c",
7 "config_mbr.c",
8 ],
9
10 shared_libs: [
11 "libcutils",
12 "liblog",
13 ],
14 cflags: ["-Werror"],
15 export_include_dirs: ["include"],
16 local_include_dirs: ["include"],
17
18 target: {
19 darwin: {
20 enabled: false,
21 },
22 linux: {
23 cflags: [
24 "-O2",
25 "-g",
26 "-W",
27 "-Wall",
28 "-D_LARGEFILE64_SOURCE",
29 ],
30 },
31 },
32}
diff --git a/libdiskconfig/Android.mk b/libdiskconfig/Android.mk
deleted file mode 100644
index a49ce5825..000000000
--- a/libdiskconfig/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
1LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
4commonSources := \
5 diskconfig.c \
6 diskutils.c \
7 write_lst.c \
8 config_mbr.c
9
10include $(CLEAR_VARS)
11LOCAL_SRC_FILES := $(commonSources)
12LOCAL_MODULE := libdiskconfig
13LOCAL_MODULE_TAGS := optional
14LOCAL_SYSTEM_SHARED_LIBRARIES := libcutils liblog libc
15LOCAL_CFLAGS := -Werror
16LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
17LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
18include $(BUILD_SHARED_LIBRARY)
19
20ifeq ($(HOST_OS),linux)
21include $(CLEAR_VARS)
22LOCAL_SRC_FILES := $(commonSources)
23LOCAL_MODULE := libdiskconfig_host
24LOCAL_MODULE_TAGS := optional
25LOCAL_CFLAGS := -O2 -g -W -Wall -Werror -D_LARGEFILE64_SOURCE
26LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
27LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
28include $(BUILD_HOST_STATIC_LIBRARY)
29endif # HOST_OS == linux
diff --git a/libion/Android.bp b/libion/Android.bp
new file mode 100644
index 000000000..da98111fc
--- /dev/null
+++ b/libion/Android.bp
@@ -0,0 +1,25 @@
1
2cc_library {
3 name: "libion",
4 srcs: ["ion.c"],
5 shared_libs: ["liblog"],
6 local_include_dirs: [
7 "include",
8 "kernel-headers",
9 ],
10 export_include_dirs: [
11 "include",
12 "kernel-headers",
13 ],
14 cflags: ["-Werror"],
15}
16
17cc_binary {
18 name: "iontest",
19 srcs: ["ion_test.c"],
20 static_libs: ["libion"],
21 shared_libs: ["liblog"],
22 cflags: ["-Werror"],
23}
24
25subdirs = ["tests"]
diff --git a/libion/Android.mk b/libion/Android.mk
deleted file mode 100644
index 6562cd3e9..000000000
--- a/libion/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
1LOCAL_PATH := $(call my-dir)
2
3include $(CLEAR_VARS)
4LOCAL_SRC_FILES := ion.c
5LOCAL_MODULE := libion
6LOCAL_MODULE_TAGS := optional
7LOCAL_SHARED_LIBRARIES := liblog
8LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/kernel-headers
9LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include $(LOCAL_PATH)/kernel-headers
10LOCAL_CFLAGS := -Werror
11include $(BUILD_SHARED_LIBRARY)
12
13include $(CLEAR_VARS)
14LOCAL_SRC_FILES := ion.c ion_test.c
15LOCAL_MODULE := iontest
16LOCAL_MODULE_TAGS := optional tests
17LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/kernel-headers
18LOCAL_SHARED_LIBRARIES := liblog
19LOCAL_CFLAGS := -Werror
20include $(BUILD_EXECUTABLE)
21
22include $(call first-makefiles-under,$(LOCAL_PATH))
diff --git a/libion/tests/Android.bp b/libion/tests/Android.bp
new file mode 100644
index 000000000..4428848e1
--- /dev/null
+++ b/libion/tests/Android.bp
@@ -0,0 +1,36 @@
1//
2// Copyright (C) 2013 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
17cc_test {
18 name: "ion-unit-tests",
19 clang: true,
20 cflags: [
21 "-g",
22 "-Wall",
23 "-Werror",
24 "-Wno-missing-field-initializers",
25 ],
26 shared_libs: ["libion"],
27 srcs: [
28 "ion_test_fixture.cpp",
29 "allocate_test.cpp",
30 "formerly_valid_handle_test.cpp",
31 "invalid_values_test.cpp",
32 "map_test.cpp",
33 "device_test.cpp",
34 "exit_test.cpp",
35 ],
36}
diff --git a/libion/tests/Android.mk b/libion/tests/Android.mk
deleted file mode 100644
index d4d07c232..000000000
--- a/libion/tests/Android.mk
+++ /dev/null
@@ -1,33 +0,0 @@
1#
2# Copyright (C) 2013 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 := ion-unit-tests
22LOCAL_CFLAGS += -g -Wall -Werror -Wno-missing-field-initializers
23LOCAL_SHARED_LIBRARIES += libion
24LOCAL_C_INCLUDES := $(LOCAL_PATH)/../kernel-headers
25LOCAL_SRC_FILES := \
26 ion_test_fixture.cpp \
27 allocate_test.cpp \
28 formerly_valid_handle_test.cpp \
29 invalid_values_test.cpp \
30 map_test.cpp \
31 device_test.cpp \
32 exit_test.cpp
33include $(BUILD_NATIVE_TEST)
diff --git a/libmemtrack/Android.bp b/libmemtrack/Android.bp
new file mode 100644
index 000000000..98413ddcc
--- /dev/null
+++ b/libmemtrack/Android.bp
@@ -0,0 +1,30 @@
1// Copyright 2013 The Android Open Source Project
2
3cc_library_shared {
4 name: "libmemtrack",
5 srcs: ["memtrack.c"],
6 export_include_dirs: ["include"],
7 local_include_dirs: ["include"],
8 include_dirs: ["hardware/libhardware/include"],
9 shared_libs: [
10 "libhardware",
11 "liblog",
12 ],
13 cflags: [
14 "-Wall",
15 "-Werror",
16 ],
17}
18
19cc_binary {
20 name: "memtrack_test",
21 srcs: ["memtrack_test.c"],
22 shared_libs: [
23 "libmemtrack",
24 "libpagemap",
25 ],
26 cflags: [
27 "-Wall",
28 "-Werror",
29 ],
30}
diff --git a/libmemtrack/Android.mk b/libmemtrack/Android.mk
deleted file mode 100644
index ffc7244d3..000000000
--- a/libmemtrack/Android.mk
+++ /dev/null
@@ -1,20 +0,0 @@
1# Copyright 2013 The Android Open Source Project
2
3LOCAL_PATH:= $(call my-dir)
4
5include $(CLEAR_VARS)
6LOCAL_SRC_FILES := memtrack.c
7LOCAL_MODULE := libmemtrack
8LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
9LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
10LOCAL_C_INCLUDES += hardware/libhardware/include
11LOCAL_SHARED_LIBRARIES := libhardware liblog
12LOCAL_CFLAGS := -Wall -Werror
13include $(BUILD_SHARED_LIBRARY)
14
15include $(CLEAR_VARS)
16LOCAL_SRC_FILES := memtrack_test.c
17LOCAL_MODULE := memtrack_test
18LOCAL_SHARED_LIBRARIES := libmemtrack libpagemap
19LOCAL_CFLAGS := -Wall -Werror
20include $(BUILD_EXECUTABLE)
diff --git a/libnativebridge/Android.bp b/libnativebridge/Android.bp
new file mode 100644
index 000000000..598dfcdc9
--- /dev/null
+++ b/libnativebridge/Android.bp
@@ -0,0 +1,25 @@
1
2cc_library {
3 name: "libnativebridge",
4
5 host_supported: true,
6 srcs: ["native_bridge.cc"],
7 shared_libs: ["liblog"],
8 clang: true,
9
10 cflags: [
11 "-Werror",
12 "-Wall",
13 ],
14 cppflags: [
15 "-std=gnu++11",
16 "-fvisibility=protected",
17 ],
18
19 host_ldlibs: ["-ldl"],
20 target: {
21 android: {
22 shared_libs: ["libdl"],
23 },
24 },
25}
diff --git a/libnativebridge/Android.mk b/libnativebridge/Android.mk
index b88621e7d..3887b1b2f 100644
--- a/libnativebridge/Android.mk
+++ b/libnativebridge/Android.mk
@@ -1,57 +1,3 @@
1LOCAL_PATH:= $(call my-dir) 1LOCAL_PATH:= $(call my-dir)
2 2
3NATIVE_BRIDGE_COMMON_SRC_FILES := \
4 native_bridge.cc
5
6# Shared library for target
7# ========================================================
8include $(CLEAR_VARS)
9
10LOCAL_MODULE:= libnativebridge
11
12LOCAL_SRC_FILES:= $(NATIVE_BRIDGE_COMMON_SRC_FILES)
13LOCAL_SHARED_LIBRARIES := liblog libdl
14LOCAL_CLANG := true
15LOCAL_CPP_EXTENSION := .cc
16LOCAL_CFLAGS += -Werror -Wall
17LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected
18LOCAL_MULTILIB := both
19
20include $(BUILD_SHARED_LIBRARY)
21
22# Shared library for host
23# ========================================================
24include $(CLEAR_VARS)
25
26LOCAL_MODULE:= libnativebridge
27
28LOCAL_SRC_FILES:= $(NATIVE_BRIDGE_COMMON_SRC_FILES)
29LOCAL_SHARED_LIBRARIES := liblog
30LOCAL_CLANG := true
31LOCAL_CPP_EXTENSION := .cc
32LOCAL_CFLAGS += -Werror -Wall
33LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected
34LOCAL_LDFLAGS := -ldl
35LOCAL_MULTILIB := both
36
37include $(BUILD_HOST_SHARED_LIBRARY)
38
39# Static library for host
40# ========================================================
41include $(CLEAR_VARS)
42
43LOCAL_MODULE:= libnativebridge
44
45LOCAL_SRC_FILES:= $(NATIVE_BRIDGE_COMMON_SRC_FILES)
46LOCAL_STATIC_LIBRARIES := liblog
47LOCAL_CLANG := true
48LOCAL_CPP_EXTENSION := .cc
49LOCAL_CFLAGS += -Werror -Wall
50LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected
51LOCAL_LDFLAGS := -ldl
52LOCAL_MULTILIB := both
53
54include $(BUILD_HOST_STATIC_LIBRARY)
55
56
57include $(LOCAL_PATH)/tests/Android.mk 3include $(LOCAL_PATH)/tests/Android.mk
diff --git a/libsparse/Android.bp b/libsparse/Android.bp
new file mode 100644
index 000000000..7a6ae8a54
--- /dev/null
+++ b/libsparse/Android.bp
@@ -0,0 +1,78 @@
1// Copyright 2010 The Android Open Source Project
2
3cc_defaults {
4 name: "libsparse_defaults",
5 srcs: [
6 "backed_block.c",
7 "output_file.c",
8 "sparse.c",
9 "sparse_crc32.c",
10 "sparse_err.c",
11 "sparse_read.c",
12 ],
13 cflags: ["-Werror"],
14 local_include_dirs: ["include"],
15 export_include_dirs: ["include"],
16}
17
18cc_library_host_static {
19 name: "libsparse_host",
20 defaults: ["libsparse_defaults"],
21 static_libs: ["libz"],
22 target: {
23 windows: {
24 enabled: true,
25 },
26 },
27}
28
29cc_library_shared {
30 name: "libsparse",
31 defaults: ["libsparse_defaults"],
32 shared_libs: ["libz"],
33}
34
35cc_library_static {
36 name: "libsparse_static",
37 host_supported: true,
38 defaults: ["libsparse_defaults"],
39 static_libs: ["libz"],
40}
41
42cc_binary {
43 name: "simg2img",
44 host_supported: true,
45 srcs: [
46 "simg2img.c",
47 "sparse_crc32.c",
48 ],
49 static_libs: [
50 "libsparse_static",
51 "libz",
52 ],
53
54 cflags: ["-Werror"],
55}
56
57cc_binary {
58 name: "img2simg",
59 host_supported: true,
60 srcs: ["img2simg.c"],
61 static_libs: [
62 "libsparse_static",
63 "libz",
64 ],
65
66 cflags: ["-Werror"],
67}
68
69cc_binary_host {
70 name: "append2simg",
71 srcs: ["append2simg.c"],
72 static_libs: [
73 "libsparse_static",
74 "libz",
75 ],
76
77 cflags: ["-Werror"],
78}
diff --git a/libsparse/Android.mk b/libsparse/Android.mk
index c77eba9d6..05e68bce6 100644
--- a/libsparse/Android.mk
+++ b/libsparse/Android.mk
@@ -2,106 +2,6 @@
2 2
3LOCAL_PATH:= $(call my-dir) 3LOCAL_PATH:= $(call my-dir)
4 4
5libsparse_src_files := \
6 backed_block.c \
7 output_file.c \
8 sparse.c \
9 sparse_crc32.c \
10 sparse_err.c \
11 sparse_read.c
12
13
14include $(CLEAR_VARS)
15LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
16LOCAL_SRC_FILES := $(libsparse_src_files)
17LOCAL_MODULE := libsparse_host
18LOCAL_STATIC_LIBRARIES := libz
19LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
20LOCAL_CFLAGS := -Werror
21LOCAL_MODULE_HOST_OS := darwin linux windows
22include $(BUILD_HOST_STATIC_LIBRARY)
23
24
25include $(CLEAR_VARS)
26LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
27LOCAL_SRC_FILES := $(libsparse_src_files)
28LOCAL_MODULE := libsparse
29LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
30LOCAL_SHARED_LIBRARIES := \
31 libz
32LOCAL_CFLAGS := -Werror
33include $(BUILD_SHARED_LIBRARY)
34
35
36include $(CLEAR_VARS)
37LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
38LOCAL_SRC_FILES := $(libsparse_src_files)
39LOCAL_MODULE := libsparse_static
40LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
41LOCAL_STATIC_LIBRARIES := libz
42LOCAL_CFLAGS := -Werror
43include $(BUILD_STATIC_LIBRARY)
44
45
46include $(CLEAR_VARS)
47LOCAL_SRC_FILES := simg2img.c \
48 sparse_crc32.c
49LOCAL_MODULE := simg2img_host
50# Need a unique module name, but exe should still be called simg2img
51LOCAL_MODULE_STEM := simg2img
52LOCAL_STATIC_LIBRARIES := \
53 libsparse_host \
54 libz
55LOCAL_CFLAGS := -Werror
56include $(BUILD_HOST_EXECUTABLE)
57
58
59include $(CLEAR_VARS)
60LOCAL_SRC_FILES := simg2img.c \
61 sparse_crc32.c
62LOCAL_MODULE := simg2img
63LOCAL_STATIC_LIBRARIES := \
64 libsparse_static \
65 libz
66LOCAL_CFLAGS := -Werror
67include $(BUILD_EXECUTABLE)
68
69
70include $(CLEAR_VARS)
71LOCAL_SRC_FILES := img2simg.c
72LOCAL_MODULE := img2simg_host
73# Need a unique module name, but exe should still be called simg2img
74LOCAL_MODULE_STEM := img2simg
75LOCAL_STATIC_LIBRARIES := \
76 libsparse_host \
77 libz
78LOCAL_CFLAGS := -Werror
79include $(BUILD_HOST_EXECUTABLE)
80
81
82include $(CLEAR_VARS)
83LOCAL_SRC_FILES := img2simg.c
84LOCAL_MODULE := img2simg
85LOCAL_STATIC_LIBRARIES := \
86 libsparse_static \
87 libz
88LOCAL_CFLAGS := -Werror
89include $(BUILD_EXECUTABLE)
90
91
92ifneq ($(HOST_OS),windows)
93
94include $(CLEAR_VARS)
95LOCAL_SRC_FILES := append2simg.c
96LOCAL_MODULE := append2simg
97LOCAL_STATIC_LIBRARIES := \
98 libsparse_host \
99 libz
100LOCAL_CFLAGS := -Werror
101include $(BUILD_HOST_EXECUTABLE)
102
103endif
104
105include $(CLEAR_VARS) 5include $(CLEAR_VARS)
106LOCAL_MODULE := simg_dump.py 6LOCAL_MODULE := simg_dump.py
107LOCAL_SRC_FILES := simg_dump.py 7LOCAL_SRC_FILES := simg_dump.py
diff --git a/libsuspend/Android.bp b/libsuspend/Android.bp
new file mode 100644
index 000000000..d27ceea68
--- /dev/null
+++ b/libsuspend/Android.bp
@@ -0,0 +1,21 @@
1// Copyright 2012 The Android Open Source Project
2
3cc_library {
4 name: "libsuspend",
5 srcs: [
6 "autosuspend.c",
7 "autosuspend_autosleep.c",
8 "autosuspend_earlysuspend.c",
9 "autosuspend_wakeup_count.c",
10 ],
11 export_include_dirs: ["include"],
12 local_include_dirs: ["include"],
13 shared_libs: [
14 "liblog",
15 "libcutils",
16 ],
17 cflags: [
18 "-Werror",
19 // "-DLOG_NDEBUG=0",
20 ],
21}
diff --git a/libsuspend/Android.mk b/libsuspend/Android.mk
deleted file mode 100644
index 1ba2f59a9..000000000
--- a/libsuspend/Android.mk
+++ /dev/null
@@ -1,33 +0,0 @@
1# Copyright 2012 The Android Open Source Project
2
3LOCAL_PATH:= $(call my-dir)
4
5libsuspend_src_files := \
6 autosuspend.c \
7 autosuspend_autosleep.c \
8 autosuspend_earlysuspend.c \
9 autosuspend_wakeup_count.c \
10
11libsuspend_libraries := \
12 liblog libcutils
13
14include $(CLEAR_VARS)
15LOCAL_SRC_FILES := $(libsuspend_src_files)
16LOCAL_MODULE := libsuspend
17LOCAL_MODULE_TAGS := optional
18LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
19LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
20LOCAL_SHARED_LIBRARIES := $(libsuspend_libraries)
21LOCAL_CFLAGS := -Werror
22#LOCAL_CFLAGS += -DLOG_NDEBUG=0
23include $(BUILD_SHARED_LIBRARY)
24
25include $(CLEAR_VARS)
26LOCAL_SRC_FILES := $(libsuspend_src_files)
27LOCAL_MODULE := libsuspend
28LOCAL_MODULE_TAGS := optional
29LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
30LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
31LOCAL_CFLAGS := -Werror
32#LOCAL_CFLAGS += -DLOG_NDEBUG=0
33include $(BUILD_STATIC_LIBRARY)
diff --git a/logwrapper/Android.bp b/logwrapper/Android.bp
new file mode 100644
index 000000000..41f072601
--- /dev/null
+++ b/logwrapper/Android.bp
@@ -0,0 +1,36 @@
1
2
3// ========================================================
4// Static and shared library
5// ========================================================
6cc_library {
7 name: "liblogwrap",
8 srcs: ["logwrap.c"],
9 shared_libs: [
10 "libcutils",
11 "liblog",
12 ],
13 export_include_dirs: ["include"],
14 local_include_dirs: ["include"],
15 cflags: [
16 "-Werror",
17 "-std=gnu99",
18 ],
19}
20
21// ========================================================
22// Executable
23// ========================================================
24cc_binary {
25 name: "logwrapper",
26 srcs: ["logwrapper.c"],
27 static_libs: [
28 "liblog",
29 "liblogwrap",
30 "libcutils",
31 ],
32 cflags: [
33 "-Werror",
34 "-std=gnu99",
35 ],
36}
diff --git a/logwrapper/Android.mk b/logwrapper/Android.mk
deleted file mode 100644
index ad45b2cee..000000000
--- a/logwrapper/Android.mk
+++ /dev/null
@@ -1,37 +0,0 @@
1LOCAL_PATH:= $(call my-dir)
2
3include $(CLEAR_VARS)
4
5# ========================================================
6# Static library
7# ========================================================
8include $(CLEAR_VARS)
9LOCAL_MODULE := liblogwrap
10LOCAL_SRC_FILES := logwrap.c
11LOCAL_SHARED_LIBRARIES := libcutils liblog
12LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
13LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
14LOCAL_CFLAGS := -Werror -std=gnu99
15include $(BUILD_STATIC_LIBRARY)
16
17# ========================================================
18# Shared library
19# ========================================================
20include $(CLEAR_VARS)
21LOCAL_MODULE := liblogwrap
22LOCAL_SHARED_LIBRARIES := libcutils liblog
23LOCAL_WHOLE_STATIC_LIBRARIES := liblogwrap
24LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
25LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
26LOCAL_CFLAGS := -Werror -std=gnu99
27include $(BUILD_SHARED_LIBRARY)
28
29# ========================================================
30# Executable
31# ========================================================
32include $(CLEAR_VARS)
33LOCAL_SRC_FILES:= logwrapper.c
34LOCAL_MODULE := logwrapper
35LOCAL_STATIC_LIBRARIES := liblog liblogwrap libcutils
36LOCAL_CFLAGS := -Werror -std=gnu99
37include $(BUILD_EXECUTABLE)
diff --git a/reboot/Android.bp b/reboot/Android.bp
new file mode 100644
index 000000000..805fd9a1b
--- /dev/null
+++ b/reboot/Android.bp
@@ -0,0 +1,8 @@
1// Copyright 2013 The Android Open Source Project
2
3cc_binary {
4 name: "reboot",
5 srcs: ["reboot.c"],
6 shared_libs: ["libcutils"],
7 cflags: ["-Werror"],
8}
diff --git a/reboot/Android.mk b/reboot/Android.mk
deleted file mode 100644
index 7a24f99b6..000000000
--- a/reboot/Android.mk
+++ /dev/null
@@ -1,14 +0,0 @@
1# Copyright 2013 The Android Open Source Project
2
3LOCAL_PATH := $(call my-dir)
4include $(CLEAR_VARS)
5
6LOCAL_SRC_FILES := reboot.c
7
8LOCAL_SHARED_LIBRARIES := libcutils
9
10LOCAL_MODULE := reboot
11
12LOCAL_CFLAGS := -Werror
13
14include $(BUILD_EXECUTABLE)
diff --git a/tzdatacheck/Android.bp b/tzdatacheck/Android.bp
new file mode 100644
index 000000000..00ad14138
--- /dev/null
+++ b/tzdatacheck/Android.bp
@@ -0,0 +1,14 @@
1// ========================================================
2// Executable
3// ========================================================
4cc_binary {
5 name: "tzdatacheck",
6 host_supported: true,
7 srcs: ["tzdatacheck.cpp"],
8 shared_libs: [
9 "libbase",
10 "libcutils",
11 "liblog",
12 ],
13 cflags: ["-Werror"],
14}
diff --git a/tzdatacheck/Android.mk b/tzdatacheck/Android.mk
deleted file mode 100644
index 0e25f7d0a..000000000
--- a/tzdatacheck/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
1LOCAL_PATH:= $(call my-dir)
2
3include $(CLEAR_VARS)
4
5# ========================================================
6# Executable
7# ========================================================
8include $(CLEAR_VARS)
9LOCAL_SRC_FILES:= tzdatacheck.cpp
10LOCAL_MODULE := tzdatacheck
11LOCAL_SHARED_LIBRARIES := libbase libcutils liblog
12LOCAL_CFLAGS := -Werror
13include $(BUILD_EXECUTABLE)
14
15include $(CLEAR_VARS)
16LOCAL_SRC_FILES:= tzdatacheck.cpp
17LOCAL_MODULE := tzdatacheck
18LOCAL_SHARED_LIBRARIES := libbase libcutils liblog
19LOCAL_CFLAGS := -Werror
20include $(BUILD_HOST_EXECUTABLE)
21