Added command-line cross-compile support for iOS - Gabriel Jacobo will be adding iosbuild.sh and documentation for the process.
authorSam Lantinga <slouken@libsdl.org>
Tue, 19 Jun 2012 12:29:53 -0400
changeset 632977dcb8c486e9
parent 6328 9a65b2bd4e01
child 6330 0fa55ca2efdd
Added command-line cross-compile support for iOS - Gabriel Jacobo will be adding iosbuild.sh and documentation for the process.
configure
configure.in
     1.1 --- a/configure	Mon Jun 04 12:31:14 2012 -0400
     1.2 +++ b/configure	Tue Jun 19 12:29:53 2012 -0400
     1.3 @@ -22180,11 +22180,14 @@
     1.4                #include <X11/Xproto.h>
     1.5                #include <X11/extensions/Xext.h>
     1.6                #include <X11/extensions/extutil.h>
     1.7 -
     1.8 -extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
     1.9 -int
    1.10 -main ()
    1.11 -{
    1.12 +              extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
    1.13 +
    1.14 +int
    1.15 +main ()
    1.16 +{
    1.17 +
    1.18 +
    1.19 +  ;
    1.20    return 0;
    1.21  }
    1.22  _ACEOF
    1.23 @@ -27960,6 +27963,54 @@
    1.24          SOURCES="$srcdir/src/main/beos/*.cc $SOURCES"
    1.25          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
    1.26          ;;
    1.27 +    arm*-apple-darwin*)
    1.28 +        # iOS - We are not writing anything to confdefs.h because you have to replace
    1.29 +        # SDL_config.h for SDL_config_iphoneos.h anyway
    1.30 +        ARCH=ios
    1.31 +
    1.32 +        CheckVisibilityHidden
    1.33 +        CheckDummyVideo
    1.34 +        CheckDiskAudio
    1.35 +        CheckDummyAudio
    1.36 +        CheckDLOPEN
    1.37 +        CheckCOCOA
    1.38 +        CheckPTHREAD
    1.39 +
    1.40 +
    1.41 +        # Set up files for the audio library
    1.42 +        if test x$enable_audio = xyes; then
    1.43 +            SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.c"
    1.44 +            have_audio=yes
    1.45 +        fi
    1.46 +        # Set up files for the joystick library
    1.47 +        if test x$enable_joystick = xyes; then
    1.48 +            SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
    1.49 +            have_joystick=yes
    1.50 +        fi
    1.51 +        # Set up files for the haptic library
    1.52 +        #if test x$enable_haptic = xyes; then
    1.53 +        #    SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
    1.54 +        #    have_haptic=yes
    1.55 +        #    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
    1.56 +        #fi
    1.57 +        # Set up files for the power library
    1.58 +        if test x$enable_power = xyes; then
    1.59 +            SOURCES="$SOURCES $srcdir/src/power/uikit/*.m"
    1.60 +            have_power=yes
    1.61 +        fi
    1.62 +        # Set up files for the timer library
    1.63 +        if test x$enable_timers = xyes; then
    1.64 +            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
    1.65 +            have_timers=yes
    1.66 +        fi
    1.67 +        # Set up additional files for the file library
    1.68 +        if test x$enable_file = xyes; then
    1.69 +            SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
    1.70 +        fi
    1.71 +        # The iOS platform requires special setup.
    1.72 +        SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
    1.73 +        SOURCES="$SOURCES $srcdir/src/video/uikit/*.c"
    1.74 +        ;;
    1.75      *-*-darwin* )
    1.76          # This could be either full "Mac OS X", or plain "Darwin" which is
    1.77          # just the OS X kernel sans upper layers like Carbon and Cocoa.
     2.1 --- a/configure.in	Mon Jun 04 12:31:14 2012 -0400
     2.2 +++ b/configure.in	Tue Jun 19 12:29:53 2012 -0400
     2.3 @@ -2439,6 +2439,54 @@
     2.4          SOURCES="$srcdir/src/main/beos/*.cc $SOURCES"
     2.5          EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
     2.6          ;;
     2.7 +    arm*-apple-darwin*)
     2.8 +        # iOS - We are not writing anything to confdefs.h because you have to replace
     2.9 +        # SDL_config.h for SDL_config_iphoneos.h anyway
    2.10 +        ARCH=ios
    2.11 +
    2.12 +        CheckVisibilityHidden
    2.13 +        CheckDummyVideo
    2.14 +        CheckDiskAudio
    2.15 +        CheckDummyAudio
    2.16 +        CheckDLOPEN
    2.17 +        CheckCOCOA
    2.18 +        CheckPTHREAD
    2.19 +
    2.20 +
    2.21 +        # Set up files for the audio library
    2.22 +        if test x$enable_audio = xyes; then
    2.23 +            SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.c"
    2.24 +            have_audio=yes
    2.25 +        fi
    2.26 +        # Set up files for the joystick library
    2.27 +        if test x$enable_joystick = xyes; then
    2.28 +            SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
    2.29 +            have_joystick=yes
    2.30 +        fi
    2.31 +        # Set up files for the haptic library
    2.32 +        #if test x$enable_haptic = xyes; then
    2.33 +        #    SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
    2.34 +        #    have_haptic=yes
    2.35 +        #    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
    2.36 +        #fi
    2.37 +        # Set up files for the power library
    2.38 +        if test x$enable_power = xyes; then
    2.39 +            SOURCES="$SOURCES $srcdir/src/power/uikit/*.m"
    2.40 +            have_power=yes
    2.41 +        fi
    2.42 +        # Set up files for the timer library
    2.43 +        if test x$enable_timers = xyes; then
    2.44 +            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
    2.45 +            have_timers=yes
    2.46 +        fi
    2.47 +        # Set up additional files for the file library
    2.48 +        if test x$enable_file = xyes; then
    2.49 +            SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
    2.50 +        fi
    2.51 +        # The iOS platform requires special setup.
    2.52 +        SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
    2.53 +        SOURCES="$SOURCES $srcdir/src/video/uikit/*.c"
    2.54 +        ;;
    2.55      *-*-darwin* )
    2.56          # This could be either full "Mac OS X", or plain "Darwin" which is
    2.57          # just the OS X kernel sans upper layers like Carbon and Cocoa.