aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOystein Eftevaag2007-12-02 11:05:29 +0000
committerOystein Eftevaag2007-12-02 11:05:29 +0000
commit82e27486501f927eddc8a9963ea835439be000ff (patch)
treead666c955efceec77c904b819ee6c7033ba06dd6
parentbf3d5579f5c2e6695061df1883ddeb4b5629911f (diff)
downloadscummvm-rg350-82e27486501f927eddc8a9963ea835439be000ff.tar.gz
scummvm-rg350-82e27486501f927eddc8a9963ea835439be000ff.tar.bz2
scummvm-rg350-82e27486501f927eddc8a9963ea835439be000ff.zip
Cleaned up the iPhone configure stuff, and added a new make target for statically linking a binary with the external libs
svn-id: r29697
-rwxr-xr-xconfigure16
-rw-r--r--ports.mk18
2 files changed, 26 insertions, 8 deletions
diff --git a/configure b/configure
index 5e38015ef2..b526869e39 100755
--- a/configure
+++ b/configure
@@ -517,7 +517,7 @@ Usage: $0 [OPTIONS]...
Configuration:
-h, --help display this help and exit
- --backend=BACKEND backend to build (sdl, x11, morphos, dc, gp32, gp2x, null) [sdl]
+ --backend=BACKEND backend to build (sdl, x11, morphos, dc, gp32, gp2x, iphone, null) [sdl]
Installation directories:
--prefix=DIR use this prefix for installing ScummVM [/usr/local]
@@ -981,12 +981,6 @@ case $_host_os in
mint*)
DEFINES="$DEFINES -DUNIX -DSYSTEM_NOT_SUPPORTING_D_TYPE"
;;
- iphone*)
- DEFINES="$DEFINES -DUNIX -DIPHONE"
- LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework CoreSurface \
- -framework LayerKit -framework GraphicsServices -framework CoreFoundation \
- -framework Foundation -framework AudioToolbox -framework CoreAudio"
- ;;
amigaos*)
# TODO: anything to be added here?
;;
@@ -1075,13 +1069,17 @@ if test -n "$_host"; then
LIBS="$LIBS -lmingw32 -lwinmm"
OBJS="$OBJS scummvmico.o"
;;
- arm-iphone)
+ iphone)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
+ DEFINES="$DEFINES -DIPHONE -DUNIX"
_endian=little
_need_memalign=yes
type_1_byte='char'
type_2_byte='short'
type_4_byte='int'
+ _backend="iphone"
+ _mak_hq_scalers='DISABLE_HQ_SCALERS = 1'
+ _build_hq_scalers="no"
;;
*)
echo "Continuing with auto-detected values ... if you have problems, please add your target to configure."
@@ -1565,6 +1563,8 @@ case $_backend in
MODULES="$MODULES backends/platform/x11"
;;
iphone)
+ OBJCFLAGS="$OBJCFLAGS --std=c99"
+ LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework CoreSurface -framework LayerKit -framework GraphicsServices -framework CoreFoundation -framework Foundation -framework AudioToolbox -framework CoreAudio"
DEFINES="$DEFINES -DIPHONE_BACKEND"
MODULES="$MODULES backends/platform/iphone"
;;
diff --git a/ports.mk b/ports.mk
index 24d09db1f3..ce97a184ec 100644
--- a/ports.mk
+++ b/ports.mk
@@ -65,8 +65,13 @@ iphonebundle:
# /opt/local/ for darwinports
OSXOPT=/sw
+# Location of static libs for the iPhone
+ifeq ($(BACKEND), iphone)
+OSXOPT=/usr/local/arm-apple-darwin
+else
# Static libaries, used for the scummvm-static target
OSX_STATIC_LIBS := `sdl-config --static-libs`
+endif
ifdef USE_VORBIS
OSX_STATIC_LIBS += \
@@ -75,6 +80,10 @@ OSX_STATIC_LIBS += \
$(OSXOPT)/lib/libogg.a
endif
+ifdef USE_TREMOR
+OSX_STATIC_LIBS += $(OSXOPT)/lib/libvorbisidec.a
+endif
+
ifdef USE_FLAC
OSX_STATIC_LIBS += $(OSXOPT)/lib/libFLAC.a
endif
@@ -97,6 +106,15 @@ scummvm-static: $(OBJS)
-lSystemStubs \
-lz
+# Special target to create a static linked binary for the iPhone
+iphone: $(OBJS)
+ $(CXX) $(LDFLAGS) -o scummvm $(OBJS) \
+ $(OSX_STATIC_LIBS) \
+ -framework UIKit -framework CoreGraphics -framework CoreSurface \
+ -framework LayerKit -framework GraphicsServices -framework CoreFoundation \
+ -framework Foundation -framework AudioToolbox -framework CoreAudio \
+ -lobjc -lz
+
# Special target to create a snapshot disk image for Mac OS X
# TODO: Replace AUTHORS by Credits.rtf
osxsnap: bundle credits