Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Redo the way TouchControlOverlay is included:

-Don't hardcode directories in build_for_playbook.sh, make it a
configure test, but require it to be found on playbook.
-Don't include any paths for TouchControlOverlay - better to install it
first and get it from the ndk stage than to assume it is built using
momentics one directory up from the current directory.
-Don't hardcode the build platform, this can easily be auto-detected by
configure.
-Remove explicit header include paths, library include paths, and
variables that are unnecessary because configure will already set them
up
  • Loading branch information...
commit c2ff46cd9ca78196a78ffd40d2a66219118398fe 1 parent d492015
Aaron Small authored
Showing with 410 additions and 316 deletions.
  1. +3 −13 build_for_playbook.sh
  2. +389 −303 configure
  3. +18 −0 configure.in
View
16 build_for_playbook.sh
@@ -33,17 +33,12 @@ PREFIX=$(pwd)/playbook_prefix
# system has been known to forget that we are cross compiling
# and over-zealously look for x11 headers and find them in /usr/include.
-RANLIB="${QNX_HOST}/usr/bin/ntoarmv7-ranlib " \
-CPP="${QNX_HOST}/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp -E " \
-CC="${QNX_HOST}/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp " \
-LD="${QNX_HOST}/usr/bin/ntoarmv7-ld " \
-CPPFLAGS="-D__PLAYBOOK__ -D__QNXNTO__ -I $(pwd)/../TouchControlOverlay/public " \
+CPPFLAGS="-D__PLAYBOOK__ -D__QNXNTO__ " \
CFLAGS=" -g " \
-LDFLAGS="-L$(pwd)/../TouchControlOverlay/Device-Debug -lTouchControlOverlay -L${QNX_TARGET}/armle-v7/lib -L${PREFIX}/lib -lscreen -lasound -lpps -lm -lpng14 -lbps -lxml2 -lEGL -lGLESv2" \
+LDFLAGS="-lscreen -lasound -lpps -lm -lpng14 -lbps -lxml2 -lEGL -lGLESv2" \
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig \
PKG_CONFIG_LIBDIR=${PREFIX}/lib/pkgconfig \
./configure --prefix="${PREFIX}" \
- --build=i686-pc-linux \
--host=arm-unknown-nto-qnx6.5.0eabi \
--without-x \
--enable-pthreads \
@@ -62,16 +57,11 @@ PREFIX=${PREFIX} make install
cd test
-RANLIB="${QNX_HOST}/usr/bin/ntoarmv7-ranlib " \
-CPP="${QNX_HOST}/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp -E " \
-CC="${QNX_HOST}/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp " \
-LD="${QNX_HOST}/usr/bin/ntoarmv7-ld " \
CFLAGS="-g -D__PLAYBOOK__ -D__QNXNTO__ -I ${PREFIX}/include " \
-LIBS="-L$(pwd)/../../TouchControlOverlay/Device-Debug -lTouchControlOverlay -L${QNX_TARGET}/armle-v7/lib -L${PREFIX}/lib -lscreen -lasound -lpps -lm -lpng14 -lbps -lxml2 -lEGL -lGLESv2 " \
+LIBS="-L${PREFIX}/lib -lscreen -lasound -lpps -lm -lpng14 -lbps -lxml2 -lEGL -lGLESv2 " \
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig \
PKG_CONFIG_LIBDIR=${PREFIX}/lib/pkgconfig \
./configure --prefix="${PREFIX}" \
- --build=i686-pc-linux \
--host=arm-unknown-nto-qnx6.5.0eabi \
--without-x
View
692 configure
389 additions, 303 deletions not shown
View
18 configure.in
@@ -395,6 +395,17 @@ AS_HELP_STRING([--enable-alsa-shared],[dynamically load ALSA audio support [[def
fi
}
+dnl See if TouchControlOverlay is supported
+CheckTouchControlOverlay()
+{
+ AC_CHECK_HEADER(touchcontroloverlay.h, [
+ AC_CHECK_LIB(TouchControlOverlay, tco_initialize,
+ [enable_touchcontroloverlay=yes;
+ EXTRA_LDFLAGS="$LIBS -lTouchControlOverlay"],
+ [enable_touchcontroloverlay=no])
+ ], [enable_touchcontroloverlay=no])
+}
+
dnl Check whether we want to use IRIX 6.5+ native audio or not
CheckDMEDIA()
{
@@ -2440,6 +2451,7 @@ case "$host" in
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
+ CheckTouchControlOverlay
# CheckNASM
CheckDLOPEN
CheckNAS
@@ -2846,6 +2858,12 @@ if test x$SDLMAIN_SOURCES = x; then
SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
fi
+if [[[ "$CPPFLAGS" == *"PLAYBOOK"* ]]]; then
+ if test x$enable_touchcontroloverlay = xno; then
+ AC_MSG_ERROR("TouchControlOverlay (https://github.com/blackberry/TouchControlOverlay) is required on playbook")
+ fi
+fi
+
OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.asm,$(objects)/\1.lo,g'`
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'`
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
Please sign in to comment.
Something went wrong with that request. Please try again.