diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 119 |
1 files changed, 98 insertions, 21 deletions
@@ -850,7 +850,9 @@ Fine tuning of the installation directories: Special configuration feature: --host=HOST cross-compile to target HOST (arm-linux, ...) - special targets: android for Android + special targets: android-arm for Android ARM + android-mips for Android MIPS + android-x86 for Android x86 tizen for Samsung Tizen caanoo for Caanoo dingux for Dingux @@ -965,6 +967,7 @@ Optional Libraries: --with-freetype2-prefix=DIR Prefix where the freetype-config script is installed (optional) + --disable-freetype2 disable freetype2 TTF library usage [autodetect] --with-nasm-prefix=DIR Prefix where nasm executable is installed (optional) --disable-nasm disable assembly language optimizations [autodetect] @@ -1271,11 +1274,21 @@ get_system_exe_extension $guessed_host NATIVEEXEEXT=$_exeext case $_host in -android | android-v7a | ouya) +android | android-arm | android-v7a | android-arm-v7a | ouya) _host_os=android _host_cpu=arm _host_alias=arm-linux-androideabi ;; +android-mips) + _host_os=android + _host_cpu=mipsel + _host_alias=mipsel-linux-android + ;; +android-x86) + _host_os=android + _host_cpu=i686 + _host_alias=i686-linux-android + ;; arm-riscos) _host_os=riscos _host_cpu=arm @@ -1378,6 +1391,9 @@ ps2) _host_os=ps2 _host_cpu=mips64r5900el _host_alias=ee + # PS2 bogus dirs: they actually depend on launch medium + datadir='host:data' + docdir='host:docs' ;; ps3) _host_os=ps3 @@ -1475,8 +1491,16 @@ caanoo | gp2x | gp2xwiz | openpandora | ps2) esac if test "$_debug_build" != no; then - # debug mode not explicitly disabled -> compile with -g - CXXFLAGS="$CXXFLAGS -g" + # debug mode not explicitly disabled -> compile with debug information + case $_host_os in + amigaos*) + # AmigaOS debugger uses plain stabs, with no gdb extensions. + CXXFLAGS="$CXXFLAGS -gstabs" + ;; + *) + # Use the system default format for debug info. + CXXFLAGS="$CXXFLAGS -g" + esac fi if test "$_release_build" = yes; then @@ -2033,27 +2057,49 @@ echo_n "Checking hosttype... " echo $_host_os case $_host_os in amigaos*) - LDFLAGS="$LDFLAGS -use-dynld" + LDFLAGS="$LDFLAGS -use-dynld -Wl,--export-dynamic" LDFLAGS="$LDFLAGS -L/sdk/local/newlib/lib" # We have to use 'long' for our 4 byte typedef because AmigaOS already typedefs (u)int32 # as (unsigned) long, and consequently we'd get a compiler error otherwise. type_4_byte='long' + # Supress format warnings as the long 4 byte causes noisy warnings. + CXXFLAGS="$CXXFLAGS -Wno-format" add_line_to_config_mk 'AMIGAOS = 1' ;; android) case $_host in - android) + android | android-arm) CXXFLAGS="$CXXFLAGS -march=armv5te" CXXFLAGS="$CXXFLAGS -mtune=xscale" CXXFLAGS="$CXXFLAGS -msoft-float" ABI="armeabi" + ANDROID_PLATFORM=4 + ANDROID_PLATFORM_ARCH="arm" ;; - android-v7a) + android-v7a | android-arm-v7a) CXXFLAGS="$CXXFLAGS -march=armv7-a" CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp" CXXFLAGS="$CXXFLAGS -mfpu=vfp" LDFLAGS="$LDFLAGS -Wl,--fix-cortex-a8" ABI="armeabi-v7a" + ANDROID_PLATFORM=4 + ANDROID_PLATFORM_ARCH="arm" + ;; + android-mips) + CXXFLAGS="$CXXFLAGS -march=mips32" + CXXFLAGS="$CXXFLAGS -mtune=mips32" + ABI="mips" + # Platform version 9 is needed as earlier versions of platform do not support this arch. + ANDROID_PLATFORM=9 + ANDROID_PLATFORM_ARCH="mips" + ;; + android-x86) + CXXFLAGS="$CXXFLAGS -march=i686" + CXXFLAGS="$CXXFLAGS -mtune=i686" + ABI="x86" + # Platform version 9 is needed as earlier versions of platform do not support this arch. + ANDROID_PLATFORM=9 + ANDROID_PLATFORM_ARCH="x86" ;; ouya) CXXFLAGS="$CXXFLAGS -march=armv7-a" @@ -2061,9 +2107,15 @@ case $_host_os in CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp" CXXFLAGS="$CXXFLAGS -mfpu=neon" ABI="armeabi-v7a" + ANDROID_PLATFORM=4 + ANDROID_PLATFORM_ARCH="arm" ;; esac - CXXFLAGS="$CXXFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm" + + # Setup platform version and arch + CXXFLAGS="$CXXFLAGS --sysroot=$ANDROID_NDK/platforms/android-$ANDROID_PLATFORM/arch-$ANDROID_PLATFORM_ARCH" + LDFLAGS="$LDFLAGS --sysroot=$ANDROID_NDK/platforms/android-$ANDROID_PLATFORM/arch-$ANDROID_PLATFORM_ARCH" + CXXFLAGS="$CXXFLAGS -fpic" CXXFLAGS="$CXXFLAGS -ffunction-sections" CXXFLAGS="$CXXFLAGS -funwind-tables" @@ -2076,16 +2128,23 @@ case $_host_os in fi CXXFLAGS="$CXXFLAGS -finline-limit=300" _optimization_level=-Os - CXXFLAGS="$CXXFLAGS -mthumb-interwork" - # FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this. - CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5__" - CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5T__" - CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5E__" - CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5TE__" - # supress 'mangling of 'va_list' has changed in GCC 4.4' + + if test "$_host" = android -o "$_host" = android-arm; then + CXXFLAGS="$CXXFLAGS -mthumb-interwork" + # FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this. + CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5__" + CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5T__" + CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5E__" + CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5TE__" + fi + + # surpress 'mangling of 'va_list' has changed in GCC 4.4' warning CXXFLAGS="$CXXFLAGS -Wno-psabi" - LDFLAGS="$LDFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm" - LDFLAGS="$LDFLAGS -mthumb-interwork" + + if test "$_host" = android -o "$_host" = android-arm; then + LDFLAGS="$LDFLAGS -mthumb-interwork" + fi + LDFLAGS="$LDFLAGS -L$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/`$CXX -dumpversion`/libs/$ABI/" LIBS="$LIBS -lsupc++" add_line_to_config_mk "ANDROID_SDK = $ANDROID_SDK" @@ -2257,6 +2316,9 @@ case $_host_os in CXXFLAGS="$CXXFLAGS -G2" DEFINES="$DEFINES -D_EE" DEFINES="$DEFINES -D__PLAYSTATION2__" + if test -z "$PS2SDK_OLD"; then + DEFINES="$DEFINES -D__NEW_PS2SDK__" + fi ;; ps3) # Force use of SDL and freetype from the ps3 toolchain @@ -2352,7 +2414,7 @@ if test -n "$_host"; then # Cross-compiling mode - add your target here if needed echo "Cross-compiling to $_host" case "$_host" in - android | android-v7a | ouya) + android | android-arm | android-v7a | android-arm-v7a | android-mips | android-x86 | ouya) # we link a .so as default LDFLAGS="$LDFLAGS -shared" LDFLAGS="$LDFLAGS -Wl,-Bsymbolic,--no-undefined" @@ -2497,6 +2559,7 @@ if test -n "$_host"; then ;; iphone) DEFINES="$DEFINES -DIPHONE" + ASFLAGS="$ASFLAGS -arch armv6" _backend="iphone" _build_scalers=no _mt32emu=no @@ -2638,6 +2701,8 @@ if test -n "$_host"; then DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" DEFINES="$DEFINES -DDISABLE_SID" DEFINES="$DEFINES -DDISABLE_NES_APU" + CXXFLAGS="$CXXFLAGS -fno-exceptions" + CXXFLAGS="$CXXFLAGS -fno-rtti" _backend="ps2" _build_scalers=no _mt32emu=no @@ -2645,10 +2710,15 @@ if test -n "$_host"; then # This trick doesn't work for tremor right now, as the PS2 port the resulting library # libtremor, while our code later on expects it to be called libvorbisidec. # TODO: Enable tremor, e.g. by adding -ltremor or by renaming the lib. + # Disable this for older SDK as this breaks the build otherwise... + if test -z "$PS2SDK_OLD"; then + _tremor=yes + fi _mad=yes _zlib=yes # HACK to fix compilation of C source files for now. - add_line_to_config_mk 'CC = ee-gcc' + add_line_to_config_mk 'CC := ee-gcc' + add_line_to_config_mk 'CFLAGS := -std=c99 -W -Wno-unused-parameter -Wconversion -pedantic -G2 -s -O2 -Wuninitialized' # HACK to fix linking for now. It seems ee-g++ does not handle linking correctly. LD=ee-gcc @@ -3165,9 +3235,10 @@ POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-im ;; ps2) _elf_loader=yes + DEFINES="$DEFINES -DUNCACHED_PLUGINS" _mak_plugins=' -LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/main_prog.ld -PLUGIN_LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/plugin.ld -lstdc++ -lc +LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/main_prog.ld +PLUGIN_LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/plugin.ld -lstdc++ -lc ' ;; psp) @@ -3303,6 +3374,8 @@ if test "$_tremor" = yes && test "$_vorbis" = no; then if test "$_tremolo" = yes ; then add_line_to_config_h '#define USE_TREMOLO' LIBS="$LIBS $TREMOR_LIBS -ltremolo" + elif test "$_host" = ps2 ; then + LIBS="-ltremor $LIBS" else LIBS="$LIBS $TREMOR_LIBS -lvorbisidec" fi @@ -4065,6 +4138,10 @@ case $_backend in # without a scummvm sub directory. DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"$libdir\\\"" ;; + ps2) + # PS2 bogus dir: it actually depends on launch medium + DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"host:plugins\\\"" + ;; *) DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"$libdir/scummvm\\\"" ;; |