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 /libsparse
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
Diffstat (limited to 'libsparse')
-rw-r--r--libsparse/Android.bp78
-rw-r--r--libsparse/Android.mk100
2 files changed, 78 insertions, 100 deletions
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