aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMax Horn2007-04-28 13:43:51 +0000
committerMax Horn2007-04-28 13:43:51 +0000
commit9bf84a30ef5c55f72a9a7df0ed9b359be9e124e8 (patch)
tree323a69495e1932e0989df5d361e2bcacb811ae43 /Makefile
parent343f624143c279d412bc0059f690761c5d898638 (diff)
downloadscummvm-rg350-9bf84a30ef5c55f72a9a7df0ed9b359be9e124e8.tar.gz
scummvm-rg350-9bf84a30ef5c55f72a9a7df0ed9b359be9e124e8.tar.bz2
scummvm-rg350-9bf84a30ef5c55f72a9a7df0ed9b359be9e124e8.zip
Updated configure to generate flags in config.mk for MAD, FLAC, MPEG2 and Vorbis; updated scummvm-static Makefile target to only static link those libs which are actually used
svn-id: r26651
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 24 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 454130f17d..81c84ed5e5 100644
--- a/Makefile
+++ b/Makefile
@@ -94,19 +94,36 @@ bundle: scummvm-static
# location of additional libs for OS X usually /sw/ for fink or
# /opt/local/ for darwinports
OSXOPT=/sw
+
+# Static libaries, used for the scummvm-static target
+OSX_STATIC_LIBS := `sdl-config --static-libs`
+
+ifdef USE_VORBIS
+OSX_STATIC_LIBS += \
+ $(OSXOPT)/lib/libvorbisfile.a \
+ $(OSXOPT)/lib/libvorbis.a \
+ $(OSXOPT)/lib/libogg.a
+endif
+
+ifdef USE_FLAC
+OSX_STATIC_LIBS += $(OSXOPT)/lib/libFLAC.a
+endif
+
+ifdef USE_MAD
+OSX_STATIC_LIBS += $(OSXOPT)/lib/libmad.a
+endif
+
+ifdef USE_MPEG2
+OSX_STATIC_LIBS += $(OSXOPT)/lib/libmpeg2.a
+endif
+
# Special target to create a static linked binary for Mac OS X.
# We use -force_cpusubtype_ALL to ensure the binary runs on every
# PowerPC machine.
scummvm-static: $(OBJS)
$(CXX) $(LDFLAGS) -force_cpusubtype_ALL -o scummvm-static $(OBJS) \
- `sdl-config --static-libs` \
-framework CoreMIDI \
- $(OSXOPT)/lib/libmad.a \
- $(OSXOPT)/lib/libvorbisfile.a \
- $(OSXOPT)/lib/libvorbis.a \
- $(OSXOPT)/lib/libogg.a \
- $(OSXOPT)/lib/libmpeg2.a \
- $(OSXOPT)/lib/libFLAC.a \
+ $(OSX_STATIC_LIBS) \
-lSystemStubs \
-lz