summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2017-03-26 16:29:55 +0200
committerChristian Beier <dontmind@freeshell.org>2017-03-26 16:29:55 +0200
commitef971860233a9abfe66533381e82ed094815a83f (patch)
tree4f04b7e4843617de02566f161770a68836b83e0c /examples
parent80ad74f7613d7d790a5152ee377af361ecd3ff9b (diff)
downloadlibtdevnc-ef971860233a9abfe66533381e82ed094815a83f.tar.gz
libtdevnc-ef971860233a9abfe66533381e82ed094815a83f.zip
CMake: automatically build androidvncserver when crosscompiling for Android
Diffstat (limited to 'examples')
-rw-r--r--examples/android/README63
-rw-r--r--examples/android/jni/Android.mk65
-rw-r--r--examples/androidvncserver.c (renamed from examples/android/jni/fbvncserver.c)0
3 files changed, 0 insertions, 128 deletions
diff --git a/examples/android/README b/examples/android/README
deleted file mode 100644
index 57e14cf..0000000
--- a/examples/android/README
+++ /dev/null
@@ -1,63 +0,0 @@
-
-This example VNC server for Android is adopted from
-http://code.google.com/p/android-vnc-server/ with some additional
-fixes applied.
-
-To build, you'll need the Android Native Development Kit from
-http://developer.android.com/sdk/ndk/.
-
-
-Building with autotools
------------------------
-
-This has the advantage that the LibVNCServer sources are properly set up
-using the configure script.
-
-1. Read <NDK location>/docs/STANDALONE-TOOLCHAIN.html.
-
-2. Setup your toolchain according to step 3 in the above file.
-
-3. Execute
-
- ./configure --host=arm-eabi CC=arm-linux-androideabi-gcc
-
- in the LibVNCServer root directory.
-
-4. Execute
-
- make
-
- in the LibVNCServer root directory. This will build the whole
- LibVNCServer distribution for Android, including androidvncserver.
-
-
-
-
-Building with the NDK build system
-----------------------------------
-
-This is probably easier than the autotools method, but you'll have to edit
-some files manually.
-
-1. Edit rfb/rfbconfig.h to match your Android target. For instance, comment out
- LIBVNCSERVER_HAVE_LIBJPEG if you don't have libjpeg for Android.
-
-2. Edit the HAVE_X variables in jni/Android.mk accordingly.
-
-3. Execute
-
- ndk-build -C .
-
- in the examples/android directory. The resulting binary will be in libs/.
-
-
-
-Installing && Running
----------------------
-
-This can be done via
-
- adb push androidvncserver /data/local/
- adb shell /data/local/androidvncserver
-
-
diff --git a/examples/android/jni/Android.mk b/examples/android/jni/Android.mk
deleted file mode 100644
index 731a790..0000000
--- a/examples/android/jni/Android.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LIBVNCSERVER_ROOT:=../../..
-
-HAVE_LIBZ=1
-#HAVE_LIBJPEG=1
-
-ifdef HAVE_LIBZ
-ZLIBSRCS := \
- $(LIBVNCSERVER_ROOT)/libvncserver/zlib.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/zrle.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/zrleoutstream.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/zrlepalettehelper.c \
- $(LIBVNCSERVER_ROOT)/common/zywrletemplate.c
-ifdef HAVE_LIBJPEG
-TIGHTSRCS := $(LIBVNCSERVER_ROOT)/libvncserver/tight.c
-endif
-endif
-
-LOCAL_SRC_FILES:= \
- fbvncserver.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/main.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/rfbserver.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/rfbregion.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/auth.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/sockets.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/stats.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/corre.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/hextile.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/rre.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/translate.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/cutpaste.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/httpd.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/cursor.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/font.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/draw.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/selbox.c \
- $(LIBVNCSERVER_ROOT)/common/d3des.c \
- $(LIBVNCSERVER_ROOT)/common/vncauth.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/cargs.c \
- $(LIBVNCSERVER_ROOT)/common/minilzo.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/ultra.c \
- $(LIBVNCSERVER_ROOT)/libvncserver/scale.c \
- $(ZLIBSRCS) \
- $(TIGHTSRCS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/$(LIBVNCSERVER_ROOT)/libvncserver \
- $(LOCAL_PATH)/$(LIBVNCSERVER_ROOT)/common \
- $(LOCAL_PATH)/$(LIBVNCSERVER_ROOT) \
- external/jpeg
-
-ifdef HAVE_LIBZ
-LOCAL_SHARED_LIBRARIES := libz
-LOCAL_LDLIBS := -lz
-endif
-ifdef HAVE_LIBJPEG
-LOCAL_STATIC_LIBRARIES := libjpeg
-endif
-
-LOCAL_MODULE:= androidvncserver
-
-include $(BUILD_EXECUTABLE)
diff --git a/examples/android/jni/fbvncserver.c b/examples/androidvncserver.c
index a8c4827..a8c4827 100644
--- a/examples/android/jni/fbvncserver.c
+++ b/examples/androidvncserver.c