2006-02-11 13:27:07 +00:00
|
|
|
# $Id$
|
2001-11-06 22:59:59 +00:00
|
|
|
|
2002-10-23 00:20:11 +00:00
|
|
|
#######################################################################
|
|
|
|
# Default compilation parameters. Normally don't edit these #
|
|
|
|
#######################################################################
|
|
|
|
|
2004-01-30 21:54:28 +00:00
|
|
|
srcdir ?= .
|
|
|
|
|
2003-09-28 10:44:31 +00:00
|
|
|
DEFINES := -DHAVE_CONFIG_H
|
|
|
|
LDFLAGS :=
|
2006-02-11 22:45:04 +00:00
|
|
|
INCLUDES := -I. -I$(srcdir) -I$(srcdir)/engines
|
2003-09-28 10:44:31 +00:00
|
|
|
LIBS :=
|
|
|
|
OBJS :=
|
2002-08-21 17:35:46 +00:00
|
|
|
|
2003-09-28 10:44:31 +00:00
|
|
|
MODULES :=
|
2003-09-17 21:53:13 +00:00
|
|
|
MODULE_DIRS :=
|
|
|
|
|
2003-08-10 06:56:53 +00:00
|
|
|
# Load the make rules generated by configure
|
2006-06-24 08:48:11 +00:00
|
|
|
include config.mk
|
2003-07-16 20:36:38 +00:00
|
|
|
|
2003-12-24 16:17:13 +00:00
|
|
|
CXXFLAGS:= -Wall $(CXXFLAGS)
|
2003-09-21 18:39:38 +00:00
|
|
|
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
|
2003-08-10 06:56:53 +00:00
|
|
|
# Even more warnings...
|
2003-09-21 18:39:38 +00:00
|
|
|
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
|
2003-08-10 06:56:53 +00:00
|
|
|
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
|
2006-04-15 00:12:14 +00:00
|
|
|
CXXFLAGS+= -Wno-reorder -Wwrite-strings
|
|
|
|
|
|
|
|
# Disable RTTI and exceptions, and enabled checking of pointers returned by "new"
|
|
|
|
CXXFLAGS+= -fno-rtti -fno-exceptions -fcheck-new
|
2003-04-26 11:44:13 +00:00
|
|
|
|
2006-08-04 20:24:49 +00:00
|
|
|
# There is a nice extra warning that flags variables that are potentially
|
|
|
|
# used before being initialized. Very handy to catch a certain kind of
|
|
|
|
# bugs. Unfortunately, it only works when optimizations are turned on,
|
|
|
|
# which is why we normally don't use it.
|
|
|
|
#CXXFLAGS+= -O -Wuninitialized
|
|
|
|
|
2003-04-26 11:44:13 +00:00
|
|
|
#######################################################################
|
2004-02-01 01:32:43 +00:00
|
|
|
# Misc stuff - you should never have to edit this #
|
2003-04-26 11:44:13 +00:00
|
|
|
#######################################################################
|
2001-10-09 14:30:12 +00:00
|
|
|
|
2004-02-01 01:32:43 +00:00
|
|
|
EXECUTABLE := scummvm$(EXEEXT)
|
|
|
|
|
2004-01-30 21:54:28 +00:00
|
|
|
include $(srcdir)/Makefile.common
|
2002-04-27 11:06:27 +00:00
|
|
|
|
2003-08-10 07:47:47 +00:00
|
|
|
# check if configure has been run or has been changed since last run
|
2006-06-24 08:48:11 +00:00
|
|
|
config.mk: $(srcdir)/configure
|
2003-08-10 07:52:23 +00:00
|
|
|
@echo "You need to run ./configure before you can run make"
|
|
|
|
@echo "Either you haven't run it before or it has changed."
|
2003-08-10 07:34:58 +00:00
|
|
|
@exit 1
|
|
|
|
|
2004-04-16 08:30:57 +00:00
|
|
|
install: all
|
2005-05-08 12:36:12 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)$(BINDIR)"
|
|
|
|
$(INSTALL) -c -s -m 755 "$(srcdir)/scummvm$(EXEEXT)" "$(DESTDIR)$(BINDIR)/scummvm$(EXEEXT)"
|
|
|
|
$(INSTALL) -d "$(DESTDIR)$(MANDIR)/man6/"
|
2006-04-14 00:55:37 +00:00
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/dists/scummvm.6" "$(DESTDIR)$(MANDIR)/man6/scummvm.6"
|
2005-05-08 12:36:12 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)$(PREFIX)/share/pixmaps/"
|
2006-04-14 00:55:37 +00:00
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/icons/scummvm.xpm" "$(DESTDIR)$(PREFIX)/share/pixmaps/scummvm.xpm"
|
2005-05-08 12:36:12 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
|
2007-06-10 18:15:27 +00:00
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/AUTHORS" "$(srcdir)/COPYING" "$(srcdir)/COPYRIGHT" "$(srcdir)/NEWS" "$(srcdir)/README" "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
|
2007-05-30 16:54:01 +00:00
|
|
|
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/scummvm/"
|
|
|
|
$(INSTALL) -c -m 644 "$(srcdir)/gui/themes/modern.ini" "$(srcdir)/gui/themes/modern.zip" "$(srcdir)/gui/themes/classic080.ini" "$(DESTDIR)$(DATADIR)/scummvm/"
|
2004-04-16 08:30:57 +00:00
|
|
|
|
|
|
|
uninstall:
|
2005-05-08 12:36:12 +00:00
|
|
|
rm -f "$(DESTDIR)$(BINDIR)/scummvm$(EXEEXT)"
|
|
|
|
rm -f "$(DESTDIR)$(MANDIR)/man6/scummvm.6"
|
|
|
|
rm -f "$(DESTDIR)$(PREFIX)/share/pixmaps/scummvm.xpm"
|
|
|
|
rm -rf "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
|
2007-05-30 16:54:01 +00:00
|
|
|
rm -rf "$(DESTDIR)$(DATADIR)/scummvm/"
|
2004-04-16 08:30:57 +00:00
|
|
|
|
2006-04-14 00:55:37 +00:00
|
|
|
scummvmico.o: icons/scummvm.ico
|
2007-03-18 22:56:56 +00:00
|
|
|
$(WINDRES) dists/scummvm.rc scummvmico.o
|
2004-03-17 09:14:41 +00:00
|
|
|
|
2002-04-27 11:06:27 +00:00
|
|
|
dist:
|
2002-08-21 20:47:12 +00:00
|
|
|
$(RM) $(ZIPFILE)
|
|
|
|
$(ZIP) $(ZIPFILE) $(DISTFILES)
|
2002-08-21 17:35:46 +00:00
|
|
|
|
2002-11-01 18:05:06 +00:00
|
|
|
deb:
|
|
|
|
ln -sf dists/debian;
|
|
|
|
debian/prepare
|
|
|
|
fakeroot debian/rules binary
|
2002-11-10 22:07:06 +00:00
|
|
|
|
2003-12-24 16:17:13 +00:00
|
|
|
|
2002-11-10 22:07:06 +00:00
|
|
|
# Special target to create a application wrapper for Mac OS X
|
|
|
|
bundle_name = ScummVM.app
|
2002-12-01 20:29:20 +00:00
|
|
|
bundle: scummvm-static
|
2002-11-10 22:07:06 +00:00
|
|
|
mkdir -p $(bundle_name)/Contents/MacOS
|
|
|
|
mkdir -p $(bundle_name)/Contents/Resources
|
|
|
|
echo "APPL????" > $(bundle_name)/Contents/PkgInfo
|
2006-01-25 20:53:25 +00:00
|
|
|
cp $(srcdir)/dists/macosx/Info.plist $(bundle_name)/Contents/
|
2006-04-14 00:55:37 +00:00
|
|
|
cp $(srcdir)/icons/scummvm.icns $(bundle_name)/Contents/Resources/
|
2006-04-15 22:01:03 +00:00
|
|
|
cp $(srcdir)/gui/themes/modern.ini $(bundle_name)/Contents/Resources/
|
|
|
|
cp $(srcdir)/gui/themes/modern.zip $(bundle_name)/Contents/Resources/
|
2007-06-23 09:29:06 +00:00
|
|
|
cp $(srcdir)/dists/pred.dic $(bundle_name)/Contents/Resources/
|
|
|
|
cp $(srcdir)/../../engine-data/trunk/kyra.dat $(bundle_name)/Contents/Resources/KYRA.DAT
|
|
|
|
cp $(srcdir)/../../engine-data/trunk/queen.tbl $(bundle_name)/Contents/Resources/
|
|
|
|
cp $(srcdir)/../../engine-data/trunk/sky.cpt $(bundle_name)/Contents/Resources/
|
2005-03-22 20:16:27 +00:00
|
|
|
cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
|
|
|
|
$(srcdir)/tools/credits.pl --rtf > $(bundle_name)/Contents/Resources/Credits.rtf
|
2002-12-01 20:29:20 +00:00
|
|
|
strip $(bundle_name)/Contents/MacOS/scummvm
|
|
|
|
|
2004-03-29 11:59:09 +00:00
|
|
|
# location of additional libs for OS X usually /sw/ for fink or
|
|
|
|
# /opt/local/ for darwinports
|
|
|
|
OSXOPT=/sw
|
2007-04-28 13:43:51 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2005-11-07 23:52:09 +00:00
|
|
|
# Special target to create a static linked binary for Mac OS X.
|
|
|
|
# We use -force_cpusubtype_ALL to ensure the binary runs on every
|
2006-04-17 08:38:26 +00:00
|
|
|
# PowerPC machine.
|
2002-12-01 20:29:20 +00:00
|
|
|
scummvm-static: $(OBJS)
|
2005-11-07 23:52:09 +00:00
|
|
|
$(CXX) $(LDFLAGS) -force_cpusubtype_ALL -o scummvm-static $(OBJS) \
|
2005-10-14 11:24:46 +00:00
|
|
|
-framework CoreMIDI \
|
2007-04-28 13:43:51 +00:00
|
|
|
$(OSX_STATIC_LIBS) \
|
2005-12-30 15:20:27 +00:00
|
|
|
-lSystemStubs \
|
2004-03-03 23:39:23 +00:00
|
|
|
-lz
|
2002-12-01 20:29:20 +00:00
|
|
|
|
2004-03-29 12:22:03 +00:00
|
|
|
# Special target to create a snapshot disk image for Mac OS X
|
2007-04-10 15:10:18 +00:00
|
|
|
# TODO: Replace AUTHORS by Credits.rtf
|
|
|
|
osxsnap: bundle credits
|
2004-03-29 12:22:03 +00:00
|
|
|
mkdir ScummVM-snapshot
|
2007-04-10 15:10:18 +00:00
|
|
|
cp AUTHORS ./ScummVM-snapshot/Authors
|
2004-03-29 12:22:03 +00:00
|
|
|
cp COPYING ./ScummVM-snapshot/License
|
2007-06-10 18:15:27 +00:00
|
|
|
cp COPYRIGHT ./ScummVM-snapshot/Copyright\ Holders
|
2004-12-20 21:06:08 +00:00
|
|
|
cp NEWS ./ScummVM-snapshot/News
|
2007-04-10 15:10:18 +00:00
|
|
|
cp README ./ScummVM-snapshot/ScummVM\ ReadMe
|
2005-11-08 00:18:18 +00:00
|
|
|
/Developer/Tools/SetFile -t ttro -c ttxt ./ScummVM-snapshot/*
|
2004-03-29 12:22:03 +00:00
|
|
|
/Developer/Tools/CpMac -r $(bundle_name) ./ScummVM-snapshot/
|
2005-11-08 00:18:18 +00:00
|
|
|
cp dists/macosx/DS_Store ./ScummVM-snapshot/.DS_Store
|
|
|
|
cp dists/macosx/background.jpg ./ScummVM-snapshot/background.jpg
|
|
|
|
/Developer/Tools/SetFile -a V ./ScummVM-snapshot/.DS_Store
|
|
|
|
/Developer/Tools/SetFile -a V ./ScummVM-snapshot/background.jpg
|
2006-07-11 07:58:54 +00:00
|
|
|
hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ \
|
2005-11-08 00:18:18 +00:00
|
|
|
-srcfolder ScummVM-snapshot \
|
|
|
|
-volname "ScummVM snapshot" \
|
|
|
|
ScummVM-snapshot.dmg
|
2004-03-29 12:22:03 +00:00
|
|
|
rm -rf ScummVM-snapshot
|
|
|
|
|
2004-03-21 00:26:23 +00:00
|
|
|
# Special target to create a win32 snapshot binary
|
2004-04-09 01:43:51 +00:00
|
|
|
win32dist: scummvm$(EXEEXT)
|
2004-03-21 00:26:23 +00:00
|
|
|
mkdir -p $(WIN32PATH)
|
2004-04-09 01:43:51 +00:00
|
|
|
strip scummvm.exe -o $(WIN32PATH)/scummvm$(EXEEXT)
|
2007-06-17 01:35:28 +00:00
|
|
|
cp dists/pred.dic $(WIN32PATH)
|
2006-04-14 22:03:44 +00:00
|
|
|
cp gui/themes/modern.ini $(WIN32PATH)
|
|
|
|
cp gui/themes/modern.zip $(WIN32PATH)
|
2004-12-20 12:00:21 +00:00
|
|
|
cp AUTHORS $(WIN32PATH)/AUTHORS.txt
|
2004-12-20 21:06:08 +00:00
|
|
|
cp COPYING $(WIN32PATH)/COPYING.txt
|
2007-06-10 18:15:27 +00:00
|
|
|
cp COPYRIGHT $(WIN32PATH)/COPYRIGHT.txt
|
2004-12-20 12:00:21 +00:00
|
|
|
cp NEWS $(WIN32PATH)/NEWS.txt
|
2004-12-20 21:06:08 +00:00
|
|
|
cp README $(WIN32PATH)/README.txt
|
2004-12-16 03:13:00 +00:00
|
|
|
cp /usr/local/README-SDL.txt $(WIN32PATH)
|
|
|
|
cp /usr/local/bin/SDL.dll $(WIN32PATH)
|
2004-03-21 00:26:23 +00:00
|
|
|
u2d $(WIN32PATH)/*.txt
|
|
|
|
|
2006-04-14 01:11:10 +00:00
|
|
|
# Special target to create an AmigaOS snapshot installation
|
|
|
|
aos4dist: scummvm
|
|
|
|
mkdir -p $(AOS4PATH)
|
|
|
|
strip -R.comment $< -o $(AOS4PATH)/$<
|
|
|
|
cp icons/scummvm.info $(AOS4PATH)/$<.info
|
2006-04-15 22:01:03 +00:00
|
|
|
cp gui/themes/modern.ini $(AOS4PATH)
|
|
|
|
cp gui/themes/modern.zip $(AOS4PATH)
|
2006-04-14 01:11:10 +00:00
|
|
|
cp AUTHORS $(AOS4PATH)/AUTHORS.txt
|
|
|
|
cp COPYING $(AOS4PATH)/COPYING.txt
|
2007-06-10 18:15:27 +00:00
|
|
|
cp COPYRIGHT $(AOS4PATH)/COPYRIGHT.txt
|
2006-04-14 01:11:10 +00:00
|
|
|
cp NEWS $(AOS4PATH)/NEWS.txt
|
|
|
|
cp README $(AOS4PATH)/README.txt
|
|
|
|
cp /sdk/local/documentation/SDL-1.2.9/README-SDL.txt $(AOS4PATH)
|
2004-03-21 00:26:23 +00:00
|
|
|
|
2006-03-29 10:35:45 +00:00
|
|
|
.PHONY: deb bundle osxsnap win32dist dist install uninstall
|