head	1.7;
access;
symbols
	arelease:1.1.1.2
	avendor:1.1.1;
locks; strict;
comment	@# @;


1.7
date	2004.12.23.11.58.59;	author wonst719;	state Exp;
branches;
next	1.6;

1.6
date	2004.09.05.12.29.03;	author wonst719;	state Exp;
branches;
next	1.5;

1.5
date	2004.08.08.03.24.04;	author wonst719;	state Exp;
branches;
next	1.4;

1.4
date	2004.08.07.11.31.07;	author wonst719;	state Exp;
branches;
next	1.3;

1.3
date	2003.11.22.11.39.07;	author wonst719;	state Exp;
branches;
next	1.2;

1.2
date	2003.02.20.13.07.55;	author wonst719;	state Exp;
branches;
next	1.1;

1.1
date	2003.01.02.00.08.18;	author wonst719;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2003.01.02.00.08.18;	author wonst719;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2004.08.07.10.52.03;	author wonst719;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Synced with 0.7.0 Release
@
text
@# $Header: /cvsroot/scummvm/scummvm/Makefile,v 1.82.2.3 2004/12/20 21:06:22 fingolfin Exp $

#######################################################################
# Default compilation parameters. Normally don't edit these           #
#######################################################################

srcdir      ?= .

DEFINES     := -DHAVE_CONFIG_H
LDFLAGS     :=
INCLUDES    := -I. -I$(srcdir) -I$(srcdir)/common
LIBS	    :=
OBJS	    :=

MODULES     :=
MODULE_DIRS :=

# Load the make rules generated by configure
include config.mak

# Uncomment this for stricter compile time code verification
# CXXFLAGS+= -Werror

CXXFLAGS:= -Wall $(CXXFLAGS)
CXXFLAGS+= -O -Wuninitialized
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
# Even more warnings...
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy 

######################################################################
# Plugin settings
######################################################################

# Plugin prefix. Typically "lib" on Unix, and nothing everywhere else
PLUGIN_PREFIX := lib
# Plugin suffix. For static/shared libs this is typically ".so"/".a" on Unix,
# ".dll"/".lib" on Windows, ".bundle"/".a" on OS X, etc.
PLUGIN_SUFFIX := .so

PLUGIN_EXTRA_DEPS := $(EXECUTABLE)

#######################################################################
# Misc stuff - you should never have to edit this                     #
#######################################################################

EXECUTABLE  := scummvm$(EXEEXT)

include $(srcdir)/Makefile.common

# check if configure has been run or has been changed since last run
config.mak: $(srcdir)/configure
	@@echo "You need to run ./configure before you can run make"
	@@echo "Either you haven't run it before or it has changed."
	@@exit 1

install: all
	$(INSTALL) -d "$(BINDIR)"
	$(INSTALL) -c -s -m 755 "$(srcdir)/scummvm$(EXEEXT)" "$(BINDIR)/scummvm$(EXEEXT)"
	$(INSTALL) -d "$(MANDIR)/man6/"
	$(INSTALL) -c -m 644 "$(srcdir)/scummvm.6" "$(MANDIR)/man6/scummvm.6"
	$(INSTALL) -d "$(PREFIX)/share/pixmaps/"
	$(INSTALL) -c -m 644 "$(srcdir)/scummvm.xpm" "$(PREFIX)/share/pixmaps/scummvm.xpm"
	$(INSTALL) -d "$(PREFIX)/share/doc/scummvm/"
	$(INSTALL) -c -m 644 "$(srcdir)/AUTHORS" "$(srcdir)/COPYING" "$(srcdir)/NEWS" "$(srcdir)/README" "$(PREFIX)/share/doc/scummvm/"

uninstall:
	rm -f "$(BINDIR)/scummvm$(EXEEXT)"
	rm -f "$(MANDIR)/man6/scummvm.6"
	rm -f "$(PREFIX)/share/pixmaps/scummvm.xpm"
	rm -rf "$(PREFIX)/share/doc/scummvm/"

scummvmico.o: scummvm.ico
	windres scummvm.rc scummvmico.o

dist:
	$(RM) $(ZIPFILE)
	$(ZIP) $(ZIPFILE) $(DISTFILES)

deb:
	ln -sf dists/debian;
	debian/prepare
	fakeroot debian/rules binary


#######################################################################
# Unit/regression tests                                               #
# In order to use 'make test' you have to install cxxtest inside the  #
# test/cxxtest dir. Get it from http://cxxtest.sourceforge.net.       #
#######################################################################

CXXTEST := test/cxxtest
TESTS := test/common/*.h
CPPFLAGS += -I$(CXXTEST)
test: runner
	./runner
runner: runner.o common/libcommon.a
	$(CXX) -o $@@ $+
runner.cpp: $(TESTS)
	$(CXXTEST)/cxxtestgen.py --error-printer -o  $@@ $+



# Special target to create a application wrapper for Mac OS X
bundle_name = ScummVM.app
bundle: scummvm-static
	mkdir -p $(bundle_name)/Contents/MacOS
	mkdir -p $(bundle_name)/Contents/Resources
	echo "APPL????" > $(bundle_name)/Contents/PkgInfo
	cp $(srcdir)/Info.plist $(bundle_name)/Contents/
	cp $(srcdir)/scummvm.icns $(bundle_name)/Contents/Resources/
	cp $(srcdir)/scummvm-static $(bundle_name)/Contents/MacOS/scummvm
	strip $(bundle_name)/Contents/MacOS/scummvm

# location of additional libs for OS X usually /sw/ for fink or
# /opt/local/ for darwinports
OSXOPT=/sw
# Special target to create a static linked binary for Mac OS X
scummvm-static: $(OBJS)
	$(CXX) $(LDFLAGS) -o scummvm-static $(OBJS) \
		`sdl-config --static-libs` \
		$(OSXOPT)/lib/libmad.a \
		$(OSXOPT)/lib/libvorbisfile.a \
		$(OSXOPT)/lib/libvorbis.a \
		$(OSXOPT)/lib/libogg.a \
		$(OSXOPT)/lib/libmpeg2.a \
		$(OSXOPT)/lib/libFLAC.a \
		-lz

# Special target to create a snapshot disk image for Mac OS X
osxsnap: bundle
	mkdir ScummVM-snapshot
	cp AUTHORS ./ScummVM-snapshot/ScummVM\ Authors
	cp COPYING ./ScummVM-snapshot/License
	cp NEWS ./ScummVM-snapshot/News
	cp README ./ScummVM-snapshot/ScummVM\ ReadMe
	/Developer/Tools/SetFile -t TEXT -c ttxt ./ScummVM-snapshot/*
	/Developer/Tools/CpMac -r $(bundle_name) ./ScummVM-snapshot/
	hdiutil create -ov -format UDZO -srcfolder ScummVM-snapshot ScummVM-snapshot.dmg
	rm -rf ScummVM-snapshot

# Special target to create a win32 snapshot binary
win32dist: scummvm$(EXEEXT)
	mkdir -p $(WIN32PATH)
	strip scummvm.exe -o $(WIN32PATH)/scummvm$(EXEEXT)
	cp AUTHORS $(WIN32PATH)/AUTHORS.txt
	cp COPYING $(WIN32PATH)/COPYING.txt
	cp NEWS $(WIN32PATH)/NEWS.txt
	cp README $(WIN32PATH)/README.txt
	cp /usr/local/README-SDL.txt $(WIN32PATH)
	cp /usr/local/bin/SDL.dll $(WIN32PATH)
	u2d $(WIN32PATH)/*.txt


.PHONY: deb bundle test osxsnap win32dist dist install uninstall
@


1.6
log
@ CVS .
@
text
@d1 1
a1 1
# $Header: /cvsroot/scummvm/scummvm/Makefile,v 1.82 2004/08/22 21:39:48 marcus_c Exp $
d66 1
a66 1
	$(INSTALL) -c -m 644 "$(srcdir)/README" "$(srcdir)/NEWS" "$(srcdir)/COPYING" "$(PREFIX)/share/doc/scummvm/"
d134 3
a137 2
	cp NEWS ./ScummVM-snapshot/News
	cp COPYING ./ScummVM-snapshot/License
d147 6
a152 5
	cp COPYING $(WIN32PATH)/copying.txt
	cp README $(WIN32PATH)/readme.txt
	cp NEWS $(WIN32PATH)/news.txt
	cp SDL/README-SDL.txt $(WIN32PATH)
	cp SDL/lib/SDL.dll $(WIN32PATH)
@


1.5
log
@Unix style line feed
@
text
@d1 1
a1 1
# $Header: /cvsroot/scummkor/scummvm-kor/Makefile,v 1.4 2004/08/07 11:31:07 wonst719 Exp $
d32 12
a144 2
	mkdir -p $(WIN32PATH)/font
	mkdir -p $(WIN32PATH)/sub
a145 4
	cp font/english.fnt $(WIN32PATH)/font/english.fnt
	cp font/korean.fnt $(WIN32PATH)/font/korean.fnt
	cp sub/*.dat $(WIN32PATH)/sub/
	cp *.fnt $(WIN32PATH)/
@


1.4
log
@0.4.0alpha Ʈ.
@
text
@d1 148
a148 148
# $Header: /cvsroot/scummvm/scummvm/Makefile,v 1.81 2004/07/27 12:16:03 khalek Exp $

#######################################################################
# Default compilation parameters. Normally don't edit these           #
#######################################################################

srcdir      ?= .

DEFINES     := -DHAVE_CONFIG_H
LDFLAGS     :=
INCLUDES    := -I. -I$(srcdir) -I$(srcdir)/common
LIBS	    :=
OBJS	    :=

MODULES     :=
MODULE_DIRS :=

# Load the make rules generated by configure
include config.mak

# Uncomment this for stricter compile time code verification
# CXXFLAGS+= -Werror

CXXFLAGS:= -Wall $(CXXFLAGS)
CXXFLAGS+= -O -Wuninitialized
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
# Even more warnings...
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy 

#######################################################################
# Misc stuff - you should never have to edit this                     #
#######################################################################

EXECUTABLE  := scummvm$(EXEEXT)

include $(srcdir)/Makefile.common

# check if configure has been run or has been changed since last run
config.mak: $(srcdir)/configure
	@@echo "You need to run ./configure before you can run make"
	@@echo "Either you haven't run it before or it has changed."
	@@exit 1

install: all
	$(INSTALL) -d "$(BINDIR)"
	$(INSTALL) -c -s -m 755 "$(srcdir)/scummvm$(EXEEXT)" "$(BINDIR)/scummvm$(EXEEXT)"
	$(INSTALL) -d "$(MANDIR)/man6/"
	$(INSTALL) -c -m 644 "$(srcdir)/scummvm.6" "$(MANDIR)/man6/scummvm.6"
	$(INSTALL) -d "$(PREFIX)/share/pixmaps/"
	$(INSTALL) -c -m 644 "$(srcdir)/scummvm.xpm" "$(PREFIX)/share/pixmaps/scummvm.xpm"
	$(INSTALL) -d "$(PREFIX)/share/doc/scummvm/"
	$(INSTALL) -c -m 644 "$(srcdir)/README" "$(srcdir)/NEWS" "$(srcdir)/COPYING" "$(PREFIX)/share/doc/scummvm/"

uninstall:
	rm -f "$(BINDIR)/scummvm$(EXEEXT)"
	rm -f "$(MANDIR)/man6/scummvm.6"
	rm -f "$(PREFIX)/share/pixmaps/scummvm.xpm"
	rm -rf "$(PREFIX)/share/doc/scummvm/"

scummvmico.o: scummvm.ico
	windres scummvm.rc scummvmico.o

dist:
	$(RM) $(ZIPFILE)
	$(ZIP) $(ZIPFILE) $(DISTFILES)

deb:
	ln -sf dists/debian;
	debian/prepare
	fakeroot debian/rules binary


#######################################################################
# Unit/regression tests                                               #
# In order to use 'make test' you have to install cxxtest inside the  #
# test/cxxtest dir. Get it from http://cxxtest.sourceforge.net.       #
#######################################################################

CXXTEST := test/cxxtest
TESTS := test/common/*.h
CPPFLAGS += -I$(CXXTEST)
test: runner
	./runner
runner: runner.o common/libcommon.a
	$(CXX) -o $@@ $+
runner.cpp: $(TESTS)
	$(CXXTEST)/cxxtestgen.py --error-printer -o  $@@ $+



# Special target to create a application wrapper for Mac OS X
bundle_name = ScummVM.app
bundle: scummvm-static
	mkdir -p $(bundle_name)/Contents/MacOS
	mkdir -p $(bundle_name)/Contents/Resources
	echo "APPL????" > $(bundle_name)/Contents/PkgInfo
	cp $(srcdir)/Info.plist $(bundle_name)/Contents/
	cp $(srcdir)/scummvm.icns $(bundle_name)/Contents/Resources/
	cp $(srcdir)/scummvm-static $(bundle_name)/Contents/MacOS/scummvm
	strip $(bundle_name)/Contents/MacOS/scummvm

# location of additional libs for OS X usually /sw/ for fink or
# /opt/local/ for darwinports
OSXOPT=/sw
# Special target to create a static linked binary for Mac OS X
scummvm-static: $(OBJS)
	$(CXX) $(LDFLAGS) -o scummvm-static $(OBJS) \
		`sdl-config --static-libs` \
		$(OSXOPT)/lib/libmad.a \
		$(OSXOPT)/lib/libvorbisfile.a \
		$(OSXOPT)/lib/libvorbis.a \
		$(OSXOPT)/lib/libogg.a \
		$(OSXOPT)/lib/libmpeg2.a \
		$(OSXOPT)/lib/libFLAC.a \
		-lz

# Special target to create a snapshot disk image for Mac OS X
osxsnap: bundle
	mkdir ScummVM-snapshot
	cp README ./ScummVM-snapshot/ScummVM\ ReadMe
	cp NEWS ./ScummVM-snapshot/News
	cp COPYING ./ScummVM-snapshot/License
	/Developer/Tools/SetFile -t TEXT -c ttxt ./ScummVM-snapshot/*
	/Developer/Tools/CpMac -r $(bundle_name) ./ScummVM-snapshot/
	hdiutil create -ov -format UDZO -srcfolder ScummVM-snapshot ScummVM-snapshot.dmg
	rm -rf ScummVM-snapshot

# Special target to create a win32 snapshot binary
win32dist: scummvm$(EXEEXT)
	mkdir -p $(WIN32PATH)
	mkdir -p $(WIN32PATH)/font
	mkdir -p $(WIN32PATH)/sub
	strip scummvm.exe -o $(WIN32PATH)/scummvm$(EXEEXT)
	cp font/english.fnt $(WIN32PATH)/font/english.fnt
	cp font/korean.fnt $(WIN32PATH)/font/korean.fnt
	cp sub/*.dat $(WIN32PATH)/sub/
	cp *.fnt $(WIN32PATH)/
	cp COPYING $(WIN32PATH)/copying.txt
	cp README $(WIN32PATH)/readme.txt
	cp NEWS $(WIN32PATH)/news.txt
	cp SDL/README-SDL.txt $(WIN32PATH)
	cp SDL/lib/SDL.dll $(WIN32PATH)
	u2d $(WIN32PATH)/*.txt


.PHONY: deb bundle test osxsnap win32dist dist install uninstall
@


1.3
log
@0.5.5cvs  ҽ Ʈ.
@
text
@d1 148
a148 86
# $Header: /cvsroot/scummvm/scummvm/Makefile,v 1.53 2003/09/28 10:44:31 fingolfin Exp $

CXX     := c++
AR      := ar cru
RANLIB  := ranlib
MKDIR   := mkdir -p
ECHO    := echo -n
CAT     := cat
RM      := rm -f
RM_REC  := $(RM) -r
ZIP     := zip -q
CP      := cp

#######################################################################
# Default compilation parameters. Normally don't edit these           #
#######################################################################

DEFINES     := -DHAVE_CONFIG_H
LDFLAGS     :=
INCLUDES    := -I. -Icommon
LIBS	    :=
OBJS	    :=

MODULES     :=
MODULE_DIRS :=

EXECUTABLE := scummvm$(EXEEXT)

# Load the make rules generated by configure
include config.mak

# Uncomment this for stricter compile time code verification
# CXXFLAGS+= -Wshadow -Werror

CXXFLAGS:= -O -Wall -Wuninitialized  $(CXXFLAGS)
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
# Even more warnings...
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy 

#######################################################################
# Misc stuff - you should normally never have to edit this            #
#######################################################################

include Makefile.common

# check if configure has been run or has been changed since last run
config.mak: configure
	@@echo "You need to run ./configure before you can run make"
	@@echo "Either you haven't run it before or it has changed."
	@@echo "If you cannot run configure, use 'make -f Makefile.noconf'"
	@@exit 1

dist:
	$(RM) $(ZIPFILE)
	$(ZIP) $(ZIPFILE) $(DISTFILES)

deb:
	ln -sf dists/debian;
	debian/prepare
	fakeroot debian/rules binary


# Special target to create a application wrapper for Mac OS X
bundle_name = ScummVM.app
bundle: scummvm-static
	mkdir -p $(bundle_name)/Contents/MacOS
	mkdir -p $(bundle_name)/Contents/Resources
	echo "APPL????" > $(bundle_name)/Contents/PkgInfo
	cp Info.plist $(bundle_name)/Contents/
	cp scummvm.icns $(bundle_name)/Contents/Resources/
	cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
	strip $(bundle_name)/Contents/MacOS/scummvm

# Special target to create a static linked binary for Mac OS X
scummvm-static: $(OBJS)
	$(CXX) $(LDFLAGS) -o scummvm-static $(OBJS) \
		/sw/lib/libSDLmain.a /sw/lib/libSDL.a \
		/sw/lib/libmad.a \
		/sw/lib/libvorbisfile.a /sw/lib/libvorbis.a /sw/lib/libogg.a \
		-framework Cocoa -framework Carbon -framework IOKit \
		-framework OpenGL -framework AGL -framework QuickTime \
		-framework AudioUnit -framework AudioToolbox

.PHONY: deb bundle
@


1.2
log
@2003-02-20 CVS , ޸ ħ  ذ, SMUSH ڸ ,  úκ ѱ ...
@
text
@d1 1
a1 1
# $Header: /cvsroot/scummvm/scummvm/Makefile,v 1.28 2003/02/07 19:26:03 ender Exp $
d3 10
a12 12
CXX      = c++
AR        = ar cru
RANLIB = ranlib
RM      = rm -f
MKDIR = mkdir -p
ECHO  = echo -n
CAT    = cat
RM      = rm -f
# recursive version of RM
RM_REC = $(RM) -r
ZIP = zip -q
CP  = cp
d18 5
a22 6
CXXFLAGS:= -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
DEFINES :=
LDFLAGS :=
INCLUDES:= -I. -Icommon
LIBS	:=
OBJS	:=
d24 2
a25 2
# Load the build rules & settings for the chosen backend
-include build.rules
d27 1
a27 3
#######################################################################
# Compile options - you can modify these to tweak ScummVM compilation #
#######################################################################
d29 2
a30 11
# Uncomment this to activate the MAD lib for compressed sound files
DEFINES += -DUSE_MAD
LIBS    += -lmad

# Uncomment this to activate the Ogg Vorbis lib for compressed sound files
# DEFINES += -DUSE_VORBIS
# LIBS    += -lvorbisfile -lvorbis

# Uncomment this to activate the ALSA lib for midi
# DEFINES += -DUSE_ALSA
# LIBS    += -lasound
d35 6
d46 1
a46 2
# Concat DEFINES and INCLUDES to for the CPPFLAGS
CPPFLAGS:= $(DEFINES) $(INCLUDES)
d48 6
a53 1
include Makefile.common
a58 4
# Until we add a nice configure tool, default to the SDL build rules
build.rules:
	$(CP) backends/sdl/build.rules build.rules

d64 1
d78 7
a84 1
	$(CXX) $(LDFLAGS) -o scummvm-static $(OBJS) /sw/lib/libSDLmain.a /sw/lib/libSDL.a /sw/lib/libmad.a -framework OpenGL -framework AGL -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -framework AudioUnit
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
# $Header: /cvsroot/scummvm/scummvm/Makefile,v 1.26 2002/12/31 02:09:56 fingolfin Exp $
@


1.1.1.1
log
@Ʈ 
@
text
@@


1.1.1.2
log
@0.4.0alpha Ʈ.
@
text
@d1 87
a87 148
# $Header: /cvsroot/scummvm/scummvm/Makefile,v 1.81 2004/07/27 12:16:03 khalek Exp $

#######################################################################
# Default compilation parameters. Normally don't edit these           #
#######################################################################

srcdir      ?= .

DEFINES     := -DHAVE_CONFIG_H
LDFLAGS     :=
INCLUDES    := -I. -I$(srcdir) -I$(srcdir)/common
LIBS	    :=
OBJS	    :=

MODULES     :=
MODULE_DIRS :=

# Load the make rules generated by configure
include config.mak

# Uncomment this for stricter compile time code verification
# CXXFLAGS+= -Werror

CXXFLAGS:= -Wall $(CXXFLAGS)
CXXFLAGS+= -O -Wuninitialized
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
# Even more warnings...
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy 

#######################################################################
# Misc stuff - you should never have to edit this                     #
#######################################################################

EXECUTABLE  := scummvm$(EXEEXT)

include $(srcdir)/Makefile.common

# check if configure has been run or has been changed since last run
config.mak: $(srcdir)/configure
	@@echo "You need to run ./configure before you can run make"
	@@echo "Either you haven't run it before or it has changed."
	@@exit 1

install: all
	$(INSTALL) -d "$(BINDIR)"
	$(INSTALL) -c -s -m 755 "$(srcdir)/scummvm$(EXEEXT)" "$(BINDIR)/scummvm$(EXEEXT)"
	$(INSTALL) -d "$(MANDIR)/man6/"
	$(INSTALL) -c -m 644 "$(srcdir)/scummvm.6" "$(MANDIR)/man6/scummvm.6"
	$(INSTALL) -d "$(PREFIX)/share/pixmaps/"
	$(INSTALL) -c -m 644 "$(srcdir)/scummvm.xpm" "$(PREFIX)/share/pixmaps/scummvm.xpm"
	$(INSTALL) -d "$(PREFIX)/share/doc/scummvm/"
	$(INSTALL) -c -m 644 "$(srcdir)/README" "$(srcdir)/NEWS" "$(srcdir)/COPYING" "$(PREFIX)/share/doc/scummvm/"

uninstall:
	rm -f "$(BINDIR)/scummvm$(EXEEXT)"
	rm -f "$(MANDIR)/man6/scummvm.6"
	rm -f "$(PREFIX)/share/pixmaps/scummvm.xpm"
	rm -rf "$(PREFIX)/share/doc/scummvm/"

scummvmico.o: scummvm.ico
	windres scummvm.rc scummvmico.o

dist:
	$(RM) $(ZIPFILE)
	$(ZIP) $(ZIPFILE) $(DISTFILES)

deb:
	ln -sf dists/debian;
	debian/prepare
	fakeroot debian/rules binary


#######################################################################
# Unit/regression tests                                               #
# In order to use 'make test' you have to install cxxtest inside the  #
# test/cxxtest dir. Get it from http://cxxtest.sourceforge.net.       #
#######################################################################

CXXTEST := test/cxxtest
TESTS := test/common/*.h
CPPFLAGS += -I$(CXXTEST)
test: runner
	./runner
runner: runner.o common/libcommon.a
	$(CXX) -o $@@ $+
runner.cpp: $(TESTS)
	$(CXXTEST)/cxxtestgen.py --error-printer -o  $@@ $+



# Special target to create a application wrapper for Mac OS X
bundle_name = ScummVM.app
bundle: scummvm-static
	mkdir -p $(bundle_name)/Contents/MacOS
	mkdir -p $(bundle_name)/Contents/Resources
	echo "APPL????" > $(bundle_name)/Contents/PkgInfo
	cp $(srcdir)/Info.plist $(bundle_name)/Contents/
	cp $(srcdir)/scummvm.icns $(bundle_name)/Contents/Resources/
	cp $(srcdir)/scummvm-static $(bundle_name)/Contents/MacOS/scummvm
	strip $(bundle_name)/Contents/MacOS/scummvm

# location of additional libs for OS X usually /sw/ for fink or
# /opt/local/ for darwinports
OSXOPT=/sw
# Special target to create a static linked binary for Mac OS X
scummvm-static: $(OBJS)
	$(CXX) $(LDFLAGS) -o scummvm-static $(OBJS) \
		`sdl-config --static-libs` \
		$(OSXOPT)/lib/libmad.a \
		$(OSXOPT)/lib/libvorbisfile.a \
		$(OSXOPT)/lib/libvorbis.a \
		$(OSXOPT)/lib/libogg.a \
		$(OSXOPT)/lib/libmpeg2.a \
		$(OSXOPT)/lib/libFLAC.a \
		-lz

# Special target to create a snapshot disk image for Mac OS X
osxsnap: bundle
	mkdir ScummVM-snapshot
	cp README ./ScummVM-snapshot/ScummVM\ ReadMe
	cp NEWS ./ScummVM-snapshot/News
	cp COPYING ./ScummVM-snapshot/License
	/Developer/Tools/SetFile -t TEXT -c ttxt ./ScummVM-snapshot/*
	/Developer/Tools/CpMac -r $(bundle_name) ./ScummVM-snapshot/
	hdiutil create -ov -format UDZO -srcfolder ScummVM-snapshot ScummVM-snapshot.dmg
	rm -rf ScummVM-snapshot

# Special target to create a win32 snapshot binary
win32dist: scummvm$(EXEEXT)
	mkdir -p $(WIN32PATH)
	mkdir -p $(WIN32PATH)/font
	mkdir -p $(WIN32PATH)/sub
	strip scummvm.exe -o $(WIN32PATH)/scummvm$(EXEEXT)
	cp font/english.fnt $(WIN32PATH)/font/english.fnt
	cp font/korean.fnt $(WIN32PATH)/font/korean.fnt
	cp sub/*.dat $(WIN32PATH)/sub/
	cp *.fnt $(WIN32PATH)/
	cp COPYING $(WIN32PATH)/copying.txt
	cp README $(WIN32PATH)/readme.txt
	cp NEWS $(WIN32PATH)/news.txt
	cp SDL/README-SDL.txt $(WIN32PATH)
	cp SDL/lib/SDL.dll $(WIN32PATH)
	u2d $(WIN32PATH)/*.txt


.PHONY: deb bundle test osxsnap win32dist dist install uninstall
@

