tigervnc: Android.mk > bp
Change-Id: Ifd24bf8ba4549f15bea3e2e3f981cc7eed5743cd
Signed-off-by: micky387 <mickaelsaibi@free.fr>
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index ea7451c..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(call first-makefiles-under,$(LOCAL_PATH))
diff --git a/common/Android.bp b/common/Android.bp
new file mode 100644
index 0000000..866a87e
--- /dev/null
+++ b/common/Android.bp
@@ -0,0 +1,114 @@
+cc_library_static {
+ name: "libtigervnc",
+
+ srcs: [
+ "os/Mutex.cxx",
+ "os/Thread.cxx",
+ "os/os.cxx",
+ "rdr/Exception.cxx",
+ "rdr/FdInStream.cxx",
+ "rdr/FdOutStream.cxx",
+ "rdr/FileInStream.cxx",
+ "rdr/HexInStream.cxx",
+ "rdr/HexOutStream.cxx",
+ "rdr/InStream.cxx",
+ "rdr/RandomStream.cxx",
+ "rdr/TLSException.cxx",
+ "rdr/TLSInStream.cxx",
+ "rdr/TLSOutStream.cxx",
+ "rdr/ZlibInStream.cxx",
+ "rdr/ZlibOutStream.cxx",
+ "network/Socket.cxx",
+ "network/TcpSocket.cxx",
+ "Xregion/Region.c",
+ ] + [
+ "rfb/Blacklist.cxx",
+ "rfb/CConnection.cxx",
+ "rfb/ClientParams.cxx",
+ "rfb/CMsgHandler.cxx",
+ "rfb/CMsgReader.cxx",
+ "rfb/CMsgWriter.cxx",
+ "rfb/CSecurityPlain.cxx",
+ "rfb/CSecurityStack.cxx",
+ "rfb/CSecurityVeNCrypt.cxx",
+ "rfb/CSecurityVncAuth.cxx",
+ "rfb/ComparingUpdateTracker.cxx",
+ "rfb/Configuration.cxx",
+ "rfb/Congestion.cxx",
+ "rfb/CopyRectDecoder.cxx",
+ "rfb/Cursor.cxx",
+ "rfb/DecodeManager.cxx",
+ "rfb/Decoder.cxx",
+ "rfb/d3des.c",
+ "rfb/EncodeManager.cxx",
+ "rfb/Encoder.cxx",
+ "rfb/HextileDecoder.cxx",
+ "rfb/HextileEncoder.cxx",
+ "rfb/JpegCompressor.cxx",
+ "rfb/JpegDecompressor.cxx",
+ "rfb/KeyRemapper.cxx",
+ "rfb/LogWriter.cxx",
+ "rfb/Logger.cxx",
+ "rfb/Logger_file.cxx",
+ "rfb/Logger_stdio.cxx",
+ "rfb/Password.cxx",
+ "rfb/PixelBuffer.cxx",
+ "rfb/PixelFormat.cxx",
+ "rfb/RREEncoder.cxx",
+ "rfb/RREDecoder.cxx",
+ "rfb/RawDecoder.cxx",
+ "rfb/RawEncoder.cxx",
+ "rfb/Region.cxx",
+ "rfb/SConnection.cxx",
+ "rfb/SMsgHandler.cxx",
+ "rfb/SMsgReader.cxx",
+ "rfb/SMsgWriter.cxx",
+ "rfb/ServerCore.cxx",
+ "rfb/Security.cxx",
+ "rfb/SecurityServer.cxx",
+ "rfb/SecurityClient.cxx",
+ "rfb/SSecurityPlain.cxx",
+ "rfb/SSecurityStack.cxx",
+ "rfb/SSecurityVncAuth.cxx",
+ "rfb/SSecurityVeNCrypt.cxx",
+ "rfb/ScaleFilters.cxx",
+ "rfb/Timer.cxx",
+ "rfb/TightDecoder.cxx",
+ "rfb/TightEncoder.cxx",
+ "rfb/TightJPEGEncoder.cxx",
+ "rfb/UpdateTracker.cxx",
+ "rfb/VNCSConnectionST.cxx",
+ "rfb/VNCServerST.cxx",
+ "rfb/ZRLEEncoder.cxx",
+ "rfb/ZRLEDecoder.cxx",
+ "rfb/encodings.cxx",
+ "rfb/util.cxx",
+ "rfb/Logger_android.cxx",
+ ],
+
+ local_include_dirs: ["."],
+
+ cflags: [
+ "-Ofast",
+ "-Wall",
+ "-Wformat=2",
+ "-DNDEBUG",
+ "-UNDEBUG",
+ "-Werror",
+ ] + [
+ "-Wno-unused-parameter",
+ "-Wno-implicit-fallthrough",
+ ],
+
+ cppflags: [
+ "-std=c++11",
+ "-fexceptions",
+ "-frtti",
+ ],
+
+ shared_libs: [
+ "libjpeg",
+ "libz",
+ ],
+
+}
diff --git a/common/Android.mk b/common/Android.mk
deleted file mode 100644
index a50afae..0000000
--- a/common/Android.mk
+++ /dev/null
@@ -1,107 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_CPP_EXTENSION := cxx
-
-LOCAL_SRC_FILES := \
- os/Mutex.cxx \
- os/Thread.cxx \
- os/os.cxx \
- rdr/Exception.cxx \
- rdr/FdInStream.cxx \
- rdr/FdOutStream.cxx \
- rdr/FileInStream.cxx \
- rdr/HexInStream.cxx \
- rdr/HexOutStream.cxx \
- rdr/InStream.cxx \
- rdr/RandomStream.cxx \
- rdr/TLSException.cxx \
- rdr/TLSInStream.cxx \
- rdr/TLSOutStream.cxx \
- rdr/ZlibInStream.cxx \
- rdr/ZlibOutStream.cxx \
- network/Socket.cxx \
- network/TcpSocket.cxx \
- Xregion/Region.c
-
-LOCAL_SRC_FILES += \
- rfb/Blacklist.cxx \
- rfb/CConnection.cxx \
- rfb/ClientParams.cxx \
- rfb/CMsgHandler.cxx \
- rfb/CMsgReader.cxx \
- rfb/CMsgWriter.cxx \
- rfb/CSecurityPlain.cxx \
- rfb/CSecurityStack.cxx \
- rfb/CSecurityVeNCrypt.cxx \
- rfb/CSecurityVncAuth.cxx \
- rfb/ComparingUpdateTracker.cxx \
- rfb/Configuration.cxx \
- rfb/Congestion.cxx \
- rfb/CopyRectDecoder.cxx \
- rfb/Cursor.cxx \
- rfb/DecodeManager.cxx \
- rfb/Decoder.cxx \
- rfb/d3des.c \
- rfb/EncodeManager.cxx \
- rfb/Encoder.cxx \
- rfb/HextileDecoder.cxx \
- rfb/HextileEncoder.cxx \
- rfb/JpegCompressor.cxx \
- rfb/JpegDecompressor.cxx \
- rfb/KeyRemapper.cxx \
- rfb/LogWriter.cxx \
- rfb/Logger.cxx \
- rfb/Logger_file.cxx \
- rfb/Logger_stdio.cxx \
- rfb/Password.cxx \
- rfb/PixelBuffer.cxx \
- rfb/PixelFormat.cxx \
- rfb/RREEncoder.cxx \
- rfb/RREDecoder.cxx \
- rfb/RawDecoder.cxx \
- rfb/RawEncoder.cxx \
- rfb/Region.cxx \
- rfb/SConnection.cxx \
- rfb/SMsgHandler.cxx \
- rfb/SMsgReader.cxx \
- rfb/SMsgWriter.cxx \
- rfb/ServerCore.cxx \
- rfb/Security.cxx \
- rfb/SecurityServer.cxx \
- rfb/SecurityClient.cxx \
- rfb/SSecurityPlain.cxx \
- rfb/SSecurityStack.cxx \
- rfb/SSecurityVncAuth.cxx \
- rfb/SSecurityVeNCrypt.cxx \
- rfb/ScaleFilters.cxx \
- rfb/Timer.cxx \
- rfb/TightDecoder.cxx \
- rfb/TightEncoder.cxx \
- rfb/TightJPEGEncoder.cxx \
- rfb/UpdateTracker.cxx \
- rfb/VNCSConnectionST.cxx \
- rfb/VNCServerST.cxx \
- rfb/ZRLEEncoder.cxx \
- rfb/ZRLEDecoder.cxx \
- rfb/encodings.cxx \
- rfb/util.cxx \
- rfb/Logger_android.cxx
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)
-
-LOCAL_CFLAGS := -Ofast -Wall -Wformat=2 -DNDEBUG -UNDEBUG -Werror
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-implicit-fallthrough
-
-LOCAL_CPPFLAGS := -std=c++11 -fexceptions -frtti
-
-LOCAL_SHARED_LIBRARIES := \
- libjpeg \
- libz
-
-LOCAL_MODULE := libtigervnc
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/unix/Android.mk b/unix/Android.mk
deleted file mode 100644
index ea7451c..0000000
--- a/unix/Android.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(call first-makefiles-under,$(LOCAL_PATH))
diff --git a/unix/vncpasswd/Android.bp b/unix/vncpasswd/Android.bp
new file mode 100644
index 0000000..fbf7518
--- /dev/null
+++ b/unix/vncpasswd/Android.bp
@@ -0,0 +1,38 @@
+cc_binary {
+ name: "vncpasswd",
+
+ srcs: ["vncpasswd.cxx"],
+
+ cflags: [
+ "-Ofast",
+ "-Wall",
+ "-Wformat=2",
+ "-DNDEBUG",
+ "-UNDEBUG",
+ ] + ["-Wno-unused-parameter"],
+
+ cppflags: [
+ "-std=c++11",
+ "-fexceptions",
+ "-frtti",
+ ],
+
+ shared_libs: [
+ "libbinder",
+ "libcrypto",
+ "libcutils",
+ "libgui",
+ "libjpeg",
+ "libssl",
+ "libui",
+ "libutils",
+ "libz",
+ ],
+
+ static_libs: ["libtigervnc"],
+
+ include_dirs: ["external/tigervnc/common"],
+
+ system_ext_specific: true,
+
+}
diff --git a/unix/vncpasswd/Android.mk b/unix/vncpasswd/Android.mk
deleted file mode 100644
index 6052ab2..0000000
--- a/unix/vncpasswd/Android.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_CPP_EXTENSION := cxx
-
-LOCAL_SRC_FILES := \
- vncpasswd.cxx
-
-LOCAL_CFLAGS := -Ofast -Wall -Wformat=2 -DNDEBUG -UNDEBUG
-LOCAL_CFLAGS += -Wno-unused-parameter
-
-LOCAL_CPPFLAGS := -std=c++11 -fexceptions -frtti
-
-LOCAL_SHARED_LIBRARIES := \
- libbinder \
- libcrypto \
- libcutils \
- libgui \
- libjpeg \
- libssl \
- libui \
- libutils \
- libz
-
-LOCAL_STATIC_LIBRARIES += \
- libtigervnc
-
-LOCAL_C_INCLUDES += \
- external/tigervnc/common
-
-LOCAL_MODULE := vncpasswd
-LOCAL_MODULE_TAGS := optional
-LOCAL_SYSTEM_EXT_MODULE := true
-
-include $(BUILD_EXECUTABLE)