aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2015-02-01 20:44:10 +0100
committerMemphiz <memphis@machzwo.de>2015-02-01 20:44:10 +0100
commit4c37bca07c2eb528e32d7d0969c2960dd4f2bb12 (patch)
tree13af6f4672ec892f338186f7eda584f4a9f69b50
parent4387ea81f6484d4dc099c13bf6d550aa7548796a (diff)
parentf4d890bea8649807bada6795294191104cfd0595 (diff)
Merge pull request #6275 from Memphiz/fixnative
[depends] - fixes which allow building for android on osx mashines
-rw-r--r--docs/README.android51
-rw-r--r--m4/xbmc_arch.m435
-rw-r--r--tools/depends/Makefile.include.in9
-rw-r--r--tools/depends/README4
-rw-r--r--tools/depends/configure.in27
-rw-r--r--tools/depends/native/TexturePacker/Makefile6
-rw-r--r--tools/depends/target/ffmpeg/Makefile2
-rw-r--r--tools/depends/target/libplist/Makefile2
-rw-r--r--tools/depends/target/openssl/Makefile2
-rw-r--r--tools/depends/target/pythonmodule-pil/Makefile2
-rw-r--r--xbmc/android/activity/AndroidExtra.h56
11 files changed, 112 insertions, 84 deletions
diff --git a/docs/README.android b/docs/README.android
index dcb9382b29..ed7689066d 100644
--- a/docs/README.android
+++ b/docs/README.android
@@ -15,7 +15,7 @@ TOC
We currently recommend Ubuntu "Precise Pangolin" (12.04) 64Bit. This is what our continuous
integration system "jenkins" is using.
-Additionally, building from OSX Snow Leopard is working.
+Additionally, building from OSX Snow Leopard or Mavericks (others on your own risk ;) ) is working (see 3.1).
NOTE TO NEW USERS: All lines that are prefixed with the '#'
character are commands that need to be typed into a terminal window /
@@ -53,7 +53,33 @@ JRE: openjre-6-jre (java version "1.6.0_27")
To develop Kodi for Android the Android SDK and NDK are required.
--------------------------------------------------------------------
-3.1. Getting the Android SDK and NDK
+3.1. Prerequesites when compiling on Mac OSX
+--------------------------------------------------------------------
+
+a. When building on Mac OSX you should download the java version from here: http://support.apple.com/kb/DL1572
+Or ensure otherwise that you are using java 1.6 (java -version tells you the version).
+b. The compilation for android needs a case sensitive filesystem. The
+ filesystem used on normal osx installations is case insensitive. So you
+ need to generate a writeable hdd image and format it with hfs+ (case sensitive).
+ The size should be 20GB.
+c. Generate a writable dmg with the following command:
+ # hdiutil create -type UDIF -fs 'Case-sensitive Journaled HFS+' -size 20g -volname android-dev ~/android-dev.dmg
+d. Whenever you want to compile/develop you need to mount it:
+ # open ~/android-dev.dmg
+e. Your workspace can be accessed in /Volumes/android-dev/ then
+f. Once you have your hdd image with case sensitive hfs+ file system do all steps
+ below inside of this filesystem. In the end you need to adapt all pathes in this
+ document so that they match your local environment. As an example here is a
+ configure line from step 5.1 which demonstrates possible pathes. In this
+ example the hdd image is mounted on /Volumes/android-dev.
+ ./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=arm-linux-androideabi \
+ --with-sdk-path=/Volumes/android-dev/android/android-sdk-macosx \
+ --with-ndk=/Volumes/android-dev/android/android-ndk-r10d \
+ --with-toolchain=/Volumes/android-dev/android/android-toolchain-arm/android-14 \
+ --prefix=/Volumes/android-dev/android/xbmc-depends
+
+--------------------------------------------------------------------
+3.2. Getting the Android SDK and NDK
--------------------------------------------------------------------
To get the Android SDK, go to http://developer.android.com/sdk and
@@ -61,7 +87,7 @@ download the latest version for your operating system. The NDK
can be downloaded from http://developer.android.com/tools/sdk/ndk/
[NOTICE] Compiling Kodi for Android requires Android NDK
- Revision r9. For the SDK just use the latest available.
+ Revision at least r9c (10d recommended). For the SDK just use the latest available.
It will work.
After downloading the SDK and NDK extract the files contained in the
@@ -69,7 +95,7 @@ archives to your harddisk. For our example we are extracting in the following
directories (this matches the example from tools/depends/README aswell):
NDK (referenced as <android-ndk> from now on):
-/opt/android-ndk-r9
+/opt/android-ndk-r10d
TOOLCHAIN (arm) (referenced as <android-toolchain-arm> from now on):
/opt/arm-linux-androideabi-4.8-vanilla/android-14
@@ -84,7 +110,7 @@ Make sure you have a recent JRE and JDK installed otherwise the
Android SDK will not work. (see point 2.)
--------------------------------------------------------------------
-3.2. Installing Android SDK packages
+3.3. Installing Android SDK packages
--------------------------------------------------------------------
After having extracted the Android SDK to <android-sdk> you need to
@@ -92,9 +118,9 @@ install some android packages using the Android SDK Manager:
# cd <android-sdk>/tools
# ./android update sdk -u -t platform,platform-tool
-
+ # ./android update sdk -u -t build-tools-20.0.0
--------------------------------------------------------------------
-3.3. Setup the Android toolchain
+3.4. Setup the Android toolchain
--------------------------------------------------------------------
To be able to compile Kodi and the libraries it depends on for the
@@ -125,10 +151,12 @@ Building for x86 architecture:
--install-dir=<android-toolchain-x86>/android-14 --platform=android-14 \
--toolchain=x86-4.8 --arch=x86 --system=linux-x86_64
-Make sure to pick a toolchain for your desired architecture.
+Make sure to pick a toolchain for your desired architecture. If an error about
+the used system is shown - please add proper --system parameter as mentioned
+in the error message.
--------------------------------------------------------------------
-3.4. Create a (new) debug key to sign debug APKs
+3.5. Create a (new) debug key to sign debug APKs
--------------------------------------------------------------------
All packages must be signed. The following command will generate a
@@ -179,7 +207,10 @@ on with the Android toolchain and creating an Android Application Package
Verify that all deps built correctly (it will tell you so) before
continuing. You will get crazy build errors otherwise. If in doubt
run another 'make' (single threaded) until the message
- "Dependencies built successfully." appears.
+ "Dependencies built successfully." appears. If the single make
+ fails keep cleaning the dependend library in charge by issueing
+ make -C target/<name_of_failed_lib> distclean. Then try make again.
+ Rinse and repeat until you are really done and all libs are built.
--------------------------------------------------------------------
5.2. Building Kodi
diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4
index f9ab5cd87c..0b66a8257e 100644
--- a/m4/xbmc_arch.m4
+++ b/m4/xbmc_arch.m4
@@ -1,6 +1,37 @@
AC_DEFUN([XBMC_SETUP_ARCH_DEFINES],[
-# host detection and setup
+# build detection and setup - this is the native arch
+case $build in
+ i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
+ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
+ i386-*-freebsd*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX")
+ ;;
+ amd64-*-freebsd*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX")
+ ;;
+ *86*-apple-darwin*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
+ ;;
+ powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC")
+ ;;
+ powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64")
+ ;;
+ arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
+ *)
+ AC_MSG_ERROR(unsupported native build platform: $build)
+esac
+
+
+# host detection and setup - this is the target arch
case $host in
i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
@@ -39,7 +70,7 @@ case $host in
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID")
;;
*)
- AC_MSG_ERROR(unsupported host ($host))
+ AC_MSG_ERROR(unsupported build target: $host)
esac
if test "$target_platform" = "target_android" ; then
diff --git a/tools/depends/Makefile.include.in b/tools/depends/Makefile.include.in
index bc0ef10000..e1ac05c9af 100644
--- a/tools/depends/Makefile.include.in
+++ b/tools/depends/Makefile.include.in
@@ -2,7 +2,6 @@ abs_top_srcdir=@abs_top_srcdir@
TOOLCHAIN=@use_toolchain@
NDKROOT=@use_ndk@
-NDK_VER=@use_ndk_ver@
SDKROOT=@use_sdk_path@
XBMCROOT=$(abspath $(abs_top_srcdir)/../../)
TARBALLS_LOCATION=@use_tarballs@
@@ -17,8 +16,10 @@ PREFIX=@prefix@/@deps_dir@
NATIVEPREFIX=@prefix@/@tool_dir@
ARCHIVE_TOOL_NATIVE=$(NATIVEPREFIX)/bin/tar
OS=@platform_os@
+NATIVE_OS=@build_os@
CROSS_COMPILING=@cross_compiling@
ARCH_DEFINES=@ARCH_DEFINES@
+NATIVE_ARCH_DEFINES=@NATIVE_ARCH_DEFINES@
TARGET_PLATFORM=@use_platform@
XCODE_VERSION=@use_xcode@
AAPT=@AAPT@
@@ -52,10 +53,10 @@ READELF=@READELF@
OBJDUMP=@OBJDUMP@
CMAKE=@prefix@/@tool_dir@/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$(PREFIX)/share/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=$(PREFIX)
-CFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include -DNDK_VER=@use_ndk_ver@
+CFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include
LDFLAGS=-L@prefix@/@deps_dir@/lib @platform_ldflags@
-CXXFLAGS=@platform_cxxflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include -DNDK_VER=@use_ndk_ver@
-CPPFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include -DNDK_VER=@use_ndk_ver@
+CXXFLAGS=@platform_cxxflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include
+CPPFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include
PATH:=@prefix@/@tool_dir@/bin:$(PATH)
ifneq (@use_build_toolchain@,)
diff --git a/tools/depends/README b/tools/depends/README
index 33e5672dc4..50d32679ec 100644
--- a/tools/depends/README
+++ b/tools/depends/README
@@ -14,9 +14,9 @@ IOS:
Android (the pathes are examples and have to match those of docs/READM.android):
arm:
- ./configure --with-tarballs=/opt/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=/opt/android-sdk-linux --with-ndk=/opt/android-ndk-r9 --with-toolchain=/opt/arm-linux-androideabi-4.8-vanilla/android-14 --prefix=/opt/xbmc-depends
+ ./configure --with-tarballs=/opt/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=/opt/android-sdk-linux --with-ndk=/opt/android-ndk-r10d --with-toolchain=/opt/arm-linux-androideabi-4.8-vanilla/android-14 --prefix=/opt/xbmc-depends
x86:
- ./configure --with-tarballs=/opt/xbmc-tarballs --host=i686-linux-android --with-sdk-path=/opt/android-sdk-linux --with-ndk=/opt/android-ndk-r9 --with-toolchain=/opt/x86-linux-4.8-vanilla/android-14 --prefix=/opt/xbmc-depends
+ ./configure --with-tarballs=/opt/xbmc-tarballs --host=i686-linux-android --with-sdk-path=/opt/android-sdk-linux --with-ndk=/opt/android-ndk-r10d --with-toolchain=/opt/x86-linux-4.8-vanilla/android-14 --prefix=/opt/xbmc-depends
diff --git a/tools/depends/configure.in b/tools/depends/configure.in
index 08a9205987..37be22712c 100644
--- a/tools/depends/configure.in
+++ b/tools/depends/configure.in
@@ -91,6 +91,25 @@ passed_ldflags="$LDFLAGS"
passed_cxxflags="$CXXFLAGS"
platform_cc=gcc
platform_cxx=g++
+
+case $build in
+ arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
+ build_os="linux"
+ ;;
+ *i686*-linux-gnu*|i*86*-*-linux-uclibc*)
+ build_os="linux"
+ ;;
+ x86_64*-linux-gnu*|x86_64-*-linux-uclibc*)
+ build_os="linux"
+ ;;
+ *darwin*)
+ build_os="osx"
+ ;;
+ *)
+ AC_MSG_ERROR(unsupported native build platform: $build)
+esac
+
+
case $host in
arm*-*linux-android*)
if test "x$use_cpu" = "xauto"; then
@@ -383,7 +402,6 @@ if test "$platform_os" == "android"; then
if ! test -f "$use_ndk/RELEASE.TXT" ; then
AC_MSG_ERROR("$use_ndk is not an NDK directory")
fi
- use_ndk_ver=0x`cat $use_ndk/RELEASE.TXT | sed 's/^r\([[0-9a-z]]\+\)\b.*/\1/'`
if test -z $use_sdk_path; then
AC_MSG_ERROR("SDK path is required for android")
@@ -397,7 +415,10 @@ if test "$platform_os" == "android"; then
AC_MSG_ERROR(verify ndk path)
fi
- build_tools_path=$use_sdk_path/tools:$use_sdk_path/platform-tools:$use_sdk_path/build-tools/`ls $use_sdk_path/build-tools | sort -V | tail -n 1`
+ #not all sort versions support -V - probe it...
+ SORT_PARAMS=""
+ sort -V /dev/null > /dev/null 2>&1 && SORT_PARAMS="-V"
+ build_tools_path=$use_sdk_path/tools:$use_sdk_path/platform-tools:$use_sdk_path/build-tools/`ls $use_sdk_path/build-tools | sort $SORT_PARAMS | tail -n 1`
AC_PATH_PROG(AAPT,aapt,"no",$build_tools_path)
if test "x$AAPT" = "xno" ; then
@@ -464,7 +485,6 @@ if test "$platform_os" == "android"; then
echo -e
AC_SUBST(use_sdk_path)
AC_SUBST(use_ndk)
- AC_SUBST(use_ndk_ver)
AC_SUBST(use_sdk)
fi
@@ -482,6 +502,7 @@ AC_SUBST(platform_cxxflags)
AC_SUBST(platform_ldflags)
AC_SUBST(platform_includes)
AC_SUBST(platform_os)
+AC_SUBST(build_os)
AC_SUBST(has_zlib)
AC_SUBST(link_iconv)
AC_SUBST(need_libiconv)
diff --git a/tools/depends/native/TexturePacker/Makefile b/tools/depends/native/TexturePacker/Makefile
index a49b658dcf..26ea13e061 100644
--- a/tools/depends/native/TexturePacker/Makefile
+++ b/tools/depends/native/TexturePacker/Makefile
@@ -14,10 +14,10 @@ else
PLATFORM = $(NATIVEPLATFORM)
endif
-ifeq ($(OS), linux)
+ifeq ($(NATIVE_OS), linux)
EXTRA_CONFIGURE = --enable-static
endif
-ifeq ($(OS), android)
+ifeq ($(NATIVE_OS), android)
EXTRA_CONFIGURE = --enable-static
endif
@@ -36,7 +36,7 @@ $(PLATFORM): ../libsquish-native/.installed-$(PLATFORM)
-rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); cp -a $(SOURCE)/* .
cd $(PLATFORM); ./autogen.sh
- cd $(PLATFORM); ./configure --prefix=$(PREFIX) $(EXTRA_CONFIGURE) EXTRA_DEFINES="$(ARCH_DEFINES)"
+ cd $(PLATFORM); ./configure --prefix=$(PREFIX) $(EXTRA_CONFIGURE) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)"
$(APP): $(PLATFORM)
diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile
index edbf084024..269a0c4df2 100644
--- a/tools/depends/target/ffmpeg/Makefile
+++ b/tools/depends/target/ffmpeg/Makefile
@@ -8,7 +8,7 @@ APPLY_PATCHES=no
# configuration settings
ffmpg_config = --prefix=$(PREFIX) --extra-version="xbmc-$(VERSION)"
-ffmpg_config += --cc=$(CC) --cxx=$(CXX)
+ffmpg_config += --cc=$(CC) --cxx=$(CXX) --ar=$(AR) --ranlib=$(RANLIB)
ffmpg_config += --disable-devices --disable-doc
ffmpg_config += --disable-ffplay --disable-ffmpeg --disable-sdl
ffmpg_config += --disable-ffprobe --disable-ffserver
diff --git a/tools/depends/target/libplist/Makefile b/tools/depends/target/libplist/Makefile
index d830cef3da..3c69e5e49d 100644
--- a/tools/depends/target/libplist/Makefile
+++ b/tools/depends/target/libplist/Makefile
@@ -7,7 +7,7 @@ VERSION=1.6
SOURCE=$(LIBNAME)-$(VERSION)
FILENAME=v$(VERSION)
ARCHIVE=$(SOURCE).tar.gz
-ifeq ($(findstring osx,x86-osx), osx)
+ifeq (darwin, $(findstring darwin, $(HOST)))
LIBDYLIB=$(PLATFORM)/build/src/libplist++.dylib
else
LIBDYLIB=$(PLATFORM)/build/src/libplist++.so
diff --git a/tools/depends/target/openssl/Makefile b/tools/depends/target/openssl/Makefile
index 11a04bd3be..01014ff342 100644
--- a/tools/depends/target/openssl/Makefile
+++ b/tools/depends/target/openssl/Makefile
@@ -37,7 +37,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
#when compiled on darwin it just won't realise that we do crosscompiling
#so it would stick in -arch i386 or -arch x86_64 into the cflags
#that would break the cross compile so we have to get rid of these
- cd $(PLATFORM); CFLAGS="$(CFLAGS)" CC=$(CC) RANLIB=$(RANLIB) $(CONFIGURE)
+ cd $(PLATFORM); AR="$(AR)" CFLAGS="$(CFLAGS)" CC=$(CC) RANLIB=$(RANLIB) $(CONFIGURE)
if test "$(OS)" = "osx"; then \
sed -ie "s|CC= /usr/bin/gcc-4.2|CC= $(CC)|" "$(PLATFORM)/Makefile"; \
sed -ie "s|CFLAG= |CFLAG=$(CFLAGS) |" "$(PLATFORM)/Makefile"; \
diff --git a/tools/depends/target/pythonmodule-pil/Makefile b/tools/depends/target/pythonmodule-pil/Makefile
index ac7a4d3d12..0f1e32f7ed 100644
--- a/tools/depends/target/pythonmodule-pil/Makefile
+++ b/tools/depends/target/pythonmodule-pil/Makefile
@@ -12,7 +12,7 @@ SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.gz
ifeq ($(OS),android)
-CROSSFLAGS=PYTHONXCPREFIX="$(PREFIX)" LDFLAGS="$(LDFLAGS) -L$(PREFIX)/lib/dummy-lib$(APP_NAME)/ -l$(APP_NAME) -lm"
+CROSSFLAGS=PYTHONXCPREFIX="$(PREFIX)" LDSHARED="$(CC) -shared" LDFLAGS="$(LDFLAGS) -L$(PREFIX)/lib/dummy-lib$(APP_NAME)/ -l$(APP_NAME) -lm"
else
CROSSFLAGS=PYTHONXCPREFIX="$(PREFIX)" LDFLAGS="$(LDFLAGS)"
endif
diff --git a/xbmc/android/activity/AndroidExtra.h b/xbmc/android/activity/AndroidExtra.h
index c33b9da013..cd4e8c15c8 100644
--- a/xbmc/android/activity/AndroidExtra.h
+++ b/xbmc/android/activity/AndroidExtra.h
@@ -21,59 +21,3 @@
/*** Extra's not found in the Android NDK ***/
-#if NDK_VER < 0x9b
-// missing in early NDKs, is present in r9b+
-extern float AMotionEvent_getAxisValue(const AInputEvent* motion_event, int32_t axis, size_t pointer_index);
-extern typeof(AMotionEvent_getAxisValue) *p_AMotionEvent_getAxisValue;
-#define AMotionEvent_getAxisValue (*p_AMotionEvent_getAxisValue)
-
-// missing in NDK
-extern int32_t AMotionEvent_getButtonState(const AInputEvent* motion_event);
-extern typeof(AMotionEvent_getButtonState) *p_AMotionEvent_getButtonState;
-#define AMotionEvent_getButtonState (*p_AMotionEvent_getButtonState)
-
- //Additional defines from android.view.KeyEvent (http://developer.android.com/reference/android/view/KeyEvent.html)
-#define AKEYCODE_ESCAPE 111
-#define AKEYCODE_FORWARD_DEL 112
-#define AKEYCODE_CTRL_LEFT 113
-#define AKEYCODE_CTRL_RIGHT 114
-#define AKEYCODE_CAPS_LOCK 115
-#define AKEYCODE_SCROLL_LOCK 116
-#define AKEYCODE_INSERT 124
-#define AKEYCODE_FORWARD 125
-#define AKEYCODE_MEDIA_PLAY 126
-#define AKEYCODE_MEDIA_EJECT 129
-
-#define AMETA_CTRL_LEFT_ON 0x2000
-#define AMETA_CTRL_RIGHT_ON 0x4000
-
-//Additional defines from android.view.MotionEvent (http://developer.android.com/reference/android/view/MotionEvent.html)
-#define AMOTION_EVENT_ACTION_SCROLL 0x08
-
-#define AMOTION_EVENT_BUTTON_PRIMARY 0x00000001
-#define AMOTION_EVENT_BUTTON_SECONDARY 0x00000002
-#define AMOTION_EVENT_BUTTON_TERTIARY 0x00000004
-#define AMOTION_EVENT_BUTTON_BACK 0x00000008
-#define AMOTION_EVENT_BUTTON_FORWARD 0x00000010
-
-#define AINPUT_SOURCE_CLASS_JOYSTICK 0x00000010
-
-#define AINPUT_SOURCE_GAMEPAD (0x00000400 | AINPUT_SOURCE_CLASS_BUTTON)
-#define AINPUT_SOURCE_JOYSTICK (0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK)
-
-// 1st stick X, Y
-#define AMOTION_EVENT_AXIS_X 0
-#define AMOTION_EVENT_AXIS_Y 1
-// 2nd stick X, Y
-#define AMOTION_EVENT_AXIS_Z 11
-#define AMOTION_EVENT_AXIS_RZ 14
-// d-pad X, Y
-#define AMOTION_EVENT_AXIS_HAT_X 15
-#define AMOTION_EVENT_AXIS_HAT_Y 16
-// trigger left, right
-#define AMOTION_EVENT_AXIS_LTRIGGER 17
-#define AMOTION_EVENT_AXIS_RTRIGGER 18
-// mouse vertical wheel
-#define AMOTION_EVENT_AXIS_VSCROLL 0x09
-
-#endif