Hooked up the pathfinder so that it seems to work. Animation opcode 0x12.
[scummvm-innocent.git] / ports.mk
blob7000ae75ce8320e602373ecaab54af2996f292a9
1 # This file contains port specific Makefile rules. It is automatically
2 # included by the default (main) Makefile.
4 # $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/trunk/Makefile $
5 # $Id: Makefile 30664 2008-01-27 19:47:41Z jvprat $
9 # UNIX specific
11 install: all
12 $(INSTALL) -d "$(DESTDIR)$(BINDIR)"
13 $(INSTALL) -c -s -m 755 "./$(EXECUTABLE)" "$(DESTDIR)$(BINDIR)/$(EXECUTABLE)"
14 $(INSTALL) -d "$(DESTDIR)$(MANDIR)/man6/"
15 $(INSTALL) -c -m 644 "$(srcdir)/dists/scummvm.6" "$(DESTDIR)$(MANDIR)/man6/scummvm.6"
16 $(INSTALL) -d "$(DESTDIR)$(PREFIX)/share/pixmaps/"
17 $(INSTALL) -c -m 644 "$(srcdir)/icons/scummvm.xpm" "$(DESTDIR)$(PREFIX)/share/pixmaps/scummvm.xpm"
18 $(INSTALL) -d "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
19 $(INSTALL) -c -m 644 $(DIST_FILES_DOCS) "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
20 $(INSTALL) -d "$(DESTDIR)$(DATADIR)/scummvm/"
21 $(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) "$(DESTDIR)$(DATADIR)/scummvm/"
22 ifdef DYNAMIC_MODULES
23 $(INSTALL) -d "$(DESTDIR)$(LIBDIR)/scummvm/"
24 $(INSTALL) -c -s -m 644 $(DIST_FILES_PLUGINS) "$(DESTDIR)$(LIBDIR)/scummvm/"
25 endif
27 uninstall:
28 rm -f "$(DESTDIR)$(BINDIR)/$(EXECUTABLE)"
29 rm -f "$(DESTDIR)$(MANDIR)/man6/scummvm.6"
30 rm -f "$(DESTDIR)$(PREFIX)/share/pixmaps/scummvm.xpm"
31 rm -rf "$(DESTDIR)$(PREFIX)/share/doc/scummvm/"
32 rm -rf "$(DESTDIR)$(DATADIR)/scummvm/"
33 ifdef DYNAMIC_MODULES
34 rm -rf "$(DESTDIR)$(LIBDIR)/scummvm/"
35 endif
37 deb:
38 ln -sf dists/debian;
39 debian/prepare
40 fakeroot debian/rules binary
43 # Special target to create a application wrapper for Mac OS X
44 bundle_name = ScummVM.app
45 bundle: scummvm-static $(srcdir)/dists/macosx/Info.plist
46 mkdir -p $(bundle_name)/Contents/MacOS
47 mkdir -p $(bundle_name)/Contents/Resources
48 echo "APPL????" > $(bundle_name)/Contents/PkgInfo
49 cp $(srcdir)/dists/macosx/Info.plist $(bundle_name)/Contents/
50 cp $(srcdir)/icons/scummvm.icns $(bundle_name)/Contents/Resources/
51 cp $(DIST_FILES_DOCS) $(bundle_name)/
52 cp $(DIST_FILES_THEMES) $(bundle_name)/Contents/Resources/
53 cp $(DIST_FILES_ENGINEDATA) $(bundle_name)/Contents/Resources/
54 $(srcdir)/tools/credits.pl --rtf > $(bundle_name)/Contents/Resources/Credits.rtf
55 chmod 644 $(bundle_name)/Contents/Resources/*
56 cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
57 chmod 755 $(bundle_name)/Contents/MacOS/scummvm
58 $(STRIP) $(bundle_name)/Contents/MacOS/scummvm
60 iphonebundle: iphone $(srcdir)/dists/iphone/Info.plist
61 mkdir -p $(bundle_name)
62 cp $(srcdir)/dists/iphone/Info.plist $(bundle_name)/
63 cp $(DIST_FILES_DOCS) $(bundle_name)/
64 cp $(DIST_FILES_THEMES) $(bundle_name)/
65 cp $(DIST_FILES_ENGINEDATA) $(bundle_name)/
66 cp scummvm $(bundle_name)/ScummVM
67 cp $(srcdir)/dists/iphone/icon.png $(bundle_name)/icon.png
68 cp $(srcdir)/dists/iphone/Default.png $(bundle_name)/Default.png
70 # Location of static libs for the iPhone
71 ifneq ($(BACKEND), iphone)
72 # Static libaries, used for the scummvm-static and iphone targets
73 OSX_STATIC_LIBS := `$(STATICLIBPATH)/bin/sdl-config --static-libs`
74 endif
76 ifdef USE_VORBIS
77 OSX_STATIC_LIBS += \
78 $(STATICLIBPATH)/lib/libvorbisfile.a \
79 $(STATICLIBPATH)/lib/libvorbis.a \
80 $(STATICLIBPATH)/lib/libogg.a
81 endif
83 ifdef USE_TREMOR
84 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libvorbisidec.a
85 endif
87 ifdef USE_FLAC
88 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libFLAC.a
89 endif
91 ifdef USE_MAD
92 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libmad.a
93 endif
95 ifdef USE_MPEG2
96 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libmpeg2.a
97 endif
99 ifdef USE_ZLIB
100 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libz.a
101 endif
103 # Special target to create a static linked binary for Mac OS X.
104 # We use -force_cpusubtype_ALL to ensure the binary runs on every
105 # PowerPC machine.
106 scummvm-static: $(OBJS)
107 $(CXX) $(LDFLAGS) -force_cpusubtype_ALL -o scummvm-static $(OBJS) \
108 -framework CoreMIDI \
109 $(OSX_STATIC_LIBS) \
110 -lSystemStubs
112 # Special target to create a static linked binary for the iPhone
113 iphone: $(OBJS)
114 $(CXX) $(LDFLAGS) -o scummvm $(OBJS) \
115 $(OSX_STATIC_LIBS) \
116 -framework UIKit -framework CoreGraphics -framework OpenGLES \
117 -framework GraphicsServices -framework CoreFoundation -framework QuartzCore \
118 -framework Foundation -framework AudioToolbox -framework CoreAudio \
119 -lobjc -lz
121 # Special target to create a snapshot disk image for Mac OS X
122 # TODO: Replace AUTHORS by Credits.rtf
123 osxsnap: bundle
124 mkdir ScummVM-snapshot
125 $(srcdir)/tools/credits.pl --text > $(srcdir)/AUTHORS
126 cp $(srcdir)/AUTHORS ./ScummVM-snapshot/Authors
127 cp $(srcdir)/COPYING ./ScummVM-snapshot/License\ \(GPL\)
128 cp $(srcdir)/COPYING.LGPL ./ScummVM-snapshot/License\ \(LGPL\)
129 cp $(srcdir)/COPYRIGHT ./ScummVM-snapshot/Copyright\ Holders
130 cp $(srcdir)/NEWS ./ScummVM-snapshot/News
131 cp $(srcdir)/README ./ScummVM-snapshot/ScummVM\ ReadMe
132 /Developer/Tools/SetFile -t ttro -c ttxt ./ScummVM-snapshot/*
133 /Developer/Tools/CpMac -r $(bundle_name) ./ScummVM-snapshot/
134 cp $(srcdir)/dists/macosx/DS_Store ./ScummVM-snapshot/.DS_Store
135 cp $(srcdir)/dists/macosx/background.jpg ./ScummVM-snapshot/background.jpg
136 /Developer/Tools/SetFile -a V ./ScummVM-snapshot/.DS_Store
137 /Developer/Tools/SetFile -a V ./ScummVM-snapshot/background.jpg
138 hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ \
139 -srcfolder ScummVM-snapshot \
140 -volname "ScummVM" \
141 ScummVM-snapshot.dmg
142 rm -rf ScummVM-snapshot
145 # Windows specific
148 scummvmico.o: $(srcdir)/icons/scummvm.ico
149 $(WINDRES) -I$(srcdir) $(srcdir)/dists/scummvm.rc scummvmico.o
151 # Special target to create a win32 snapshot binary
152 win32dist: $(EXECUTABLE)
153 mkdir -p $(WIN32PATH)
154 $(STRIP) $(EXECUTABLE) -o $(WIN32PATH)/$(EXECUTABLE)
155 cp $(DIST_FILES_THEMES) $(WIN32PATH)
156 cp $(DIST_FILES_ENGINEDATA) $(WIN32PATH)
157 cp $(srcdir)/AUTHORS $(WIN32PATH)/AUTHORS.txt
158 cp $(srcdir)/COPYING $(WIN32PATH)/COPYING.txt
159 cp $(srcdir)/COPYING.LGPL $(WIN32PATH)/COPYING.LGPL.txt
160 cp $(srcdir)/COPYRIGHT $(WIN32PATH)/COPYRIGHT.txt
161 cp $(srcdir)/NEWS $(WIN32PATH)/NEWS.txt
162 cp $(srcdir)/README $(WIN32PATH)/README.txt
163 cp /usr/local/README-SDL.txt $(WIN32PATH)
164 cp /usr/local/bin/SDL.dll $(WIN32PATH)
165 u2d $(WIN32PATH)/*.txt
168 # AmigaOS specific
171 # Special target to create an AmigaOS snapshot installation
172 aos4dist: $(EXECUTABLE)
173 mkdir -p $(AOS4PATH)
174 $(STRIP) $(EXECUTABLE) -o $(AOS4PATH)/$(EXECUTABLE)_SVN
175 cp icons/scummvm.info $(AOS4PATH)/$(EXECUTABLE)_SVN.info
176 cp $(DIST_FILES_THEMES) $(AOS4PATH)/themes/
177 cp $(DIST_FILES_ENGINEDATA) $(AOS4PATH)/extras/
178 cp $(srcdir)/AUTHORS $(AOS4PATH)/AUTHORS.txt
179 cp $(srcdir)/COPYING $(AOS4PATH)/COPYING.txt
180 cp $(srcdir)/COPYING.LGPL $(AOS4PATH)/COPYING.LGPL.txt
181 cp $(srcdir)/COPYRIGHT $(AOS4PATH)/COPYRIGHT.txt
182 cp $(srcdir)/NEWS $(AOS4PATH)/NEWS.txt
183 cp $(srcdir)/README $(AOS4PATH)/README.txt
186 # Wii/Gamecube specific
189 # Special target to create a Wii snapshot
190 wiidist: $(EXECUTABLE)
191 $(MKDIR) wiidist/scummvm
192 ifeq ($(GAMECUBE),1)
193 $(DEVKITPPC)/bin/elf2dol $(EXECUTABLE) wiidist/scummvm/scummvm.dol
194 else
195 $(STRIP) $(EXECUTABLE) -o wiidist/scummvm/boot.elf
196 $(CP) $(srcdir)/dists/wii/icon.png wiidist/scummvm/
197 sed "s/@REVISION@/$(VER_SVNREV)/;s/@TIMESTAMP@/`date +%Y%m%d%H%M%S`/" < $(srcdir)/dists/wii/meta.xml > wiidist/scummvm/meta.xml
198 endif
199 sed 's/$$/\r/' < $(srcdir)/dists/wii/READMII > wiidist/scummvm/READMII.txt
200 for i in $(DIST_FILES_DOCS); do sed 's/$$/\r/' < $$i > wiidist/scummvm/`basename $$i`.txt; done
201 $(CP) $(DIST_FILES_THEMES) wiidist/scummvm/
202 ifneq ($(DIST_FILES_ENGINEDATA),)
203 $(CP) $(DIST_FILES_ENGINEDATA) wiidist/scummvm/
204 endif
205 $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip wiidist/scummvm/
207 .PHONY: deb bundle osxsnap win32dist wiidist install uninstall
210 # ARM specific
212 ifdef USE_TREMOLO
213 DEFINES += -DUSE_TREMOR -DUSE_VORBIS -DUSE_TREMOLO
214 LIBS += -ltremolo
215 endif
217 ifdef USE_ARM_SMUSH_ASM
218 DEFINES += -DUSE_ARM_SMUSH_ASM
219 endif
221 ifdef USE_ARM_SOUND_ASM
222 DEFINES += -DUSE_ARM_SOUND_ASM
223 endif
225 ifdef USE_ARM_GFX_ASM
226 DEFINES += -DUSE_ARM_GFX_ASM
227 endif
229 ifdef USE_ARM_COSTUME_ASM
230 DEFINES += -DUSE_ARM_COSTUME_ASM
231 endif
233 ifdef USE_ARM_SCALER_ASM
234 DEFINES += -DUSE_ARM_SCALER_ASM
235 endif