Convert libRScpp to Android.bp
See build/soong/README.md for more information
Test: m -j checkbuild
Change-Id: I95650a36af2d4457c00184432792602096d2cc32
diff --git a/cpp/Android.bp b/cpp/Android.bp
index 3055fd4..e25e39a 100644
--- a/cpp/Android.bp
+++ b/cpp/Android.bp
@@ -18,3 +18,71 @@
},
stl: "none",
}
+
+cc_defaults {
+ name: "libRScpp-defaults",
+ defaults: ["rs-version"],
+
+ srcs: [
+ "RenderScript.cpp",
+ "BaseObj.cpp",
+ "Element.cpp",
+ "Type.cpp",
+ "Allocation.cpp",
+ "Script.cpp",
+ "ScriptC.cpp",
+ "ScriptIntrinsics.cpp",
+ "ScriptIntrinsicBLAS.cpp",
+ "Sampler.cpp",
+
+ // TODO: make this not a symlink
+ "rsCppUtils.cpp",
+ ],
+
+ cflags: [
+ "-Werror",
+ "-Wall",
+ "-Wextra",
+ "-Wno-unused-parameter",
+ "-Wno-unused-variable",
+ ],
+
+ // We need to export not just rs/cpp but also rs. This is because
+ // RenderScript.h includes rsCppStructs.h, which includes rs/rsDefines.h.
+ header_libs: ["rs-headers"],
+ export_header_lib_headers: ["rs-headers"],
+ export_include_dirs: ["."],
+
+ shared_libs: [
+ "libdl",
+ "liblog",
+ "libz",
+ ],
+}
+
+cc_library {
+ name: "libRScpp",
+ defaults: ["libRScpp-defaults"],
+
+ shared_libs: [
+ "libgui",
+ "libutils",
+ ],
+
+ static_libs: ["libRSDispatch"],
+}
+
+cc_library_static {
+ name: "libRScpp_static",
+ defaults: ["libRScpp-defaults"],
+
+ cflags: ["-DRS_COMPATIBILITY_LIB"],
+
+ sdk_version: "9",
+ whole_static_libs: ["libRSDispatch"],
+
+ ldflags: [
+ "-Wl,--exclude-libs,libc++_static.a",
+ ],
+ stl: "c++_static",
+}