Skip to content
Newer
Older
100644 226 lines (196 sloc) 6.89 KB
0a3364d @lousyphreak svn import #53614
authored Oct 20, 2010
1 # This file contains port specific Makefile rules. It is automatically
2 # included by the default (main) Makefile.
3 #
4 # $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/ports.mk $
5 # $Id: ports.mk 53463 2010-10-15 03:33:54Z mthreepwood $
6
7
8 #
9 # UNIX specific
10 #
11 install:
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)$(datarootdir)/pixmaps/"
17 $(INSTALL) -c -m 644 "$(srcdir)/icons/scummvm.xpm" "$(DESTDIR)$(datarootdir)/pixmaps/scummvm.xpm"
18 $(INSTALL) -d "$(DESTDIR)$(docdir)"
19 $(INSTALL) -c -m 644 $(DIST_FILES_DOCS) "$(DESTDIR)$(docdir)"
20 $(INSTALL) -d "$(DESTDIR)$(datadir)"
21 $(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) "$(DESTDIR)$(datadir)/"
22 ifdef DYNAMIC_MODULES
23 $(INSTALL) -d "$(DESTDIR)$(libdir)/scummvm/"
24 $(INSTALL) -c -s -m 644 $(PLUGINS) "$(DESTDIR)$(libdir)/scummvm/"
25 endif
26
27 uninstall:
28 rm -f "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
29 rm -f "$(DESTDIR)$(mandir)/man6/scummvm.6"
30 rm -f "$(DESTDIR)$(datarootdir)/pixmaps/scummvm.xpm"
31 rm -rf "$(DESTDIR)$(docdir)"
32 rm -rf "$(DESTDIR)$(datadir)"
33 ifdef DYNAMIC_MODULES
34 rm -rf "$(DESTDIR)$(libdir)/scummvm/"
35 endif
36
37 # Special target to create a application wrapper for Mac OS X
38 bundle_name = ScummVM.app
39 bundle: scummvm-static
40 mkdir -p $(bundle_name)/Contents/MacOS
41 mkdir -p $(bundle_name)/Contents/Resources
42 echo "APPL????" > $(bundle_name)/Contents/PkgInfo
43 cp $(srcdir)/dists/macosx/Info.plist $(bundle_name)/Contents/
44 cp $(srcdir)/icons/scummvm.icns $(bundle_name)/Contents/Resources/
45 cp $(DIST_FILES_DOCS) $(bundle_name)/
46 cp $(DIST_FILES_THEMES) $(bundle_name)/Contents/Resources/
47 ifdef DIST_FILES_ENGINEDATA
48 cp $(DIST_FILES_ENGINEDATA) $(bundle_name)/Contents/Resources/
49 endif
50 $(srcdir)/tools/credits.pl --rtf > $(bundle_name)/Contents/Resources/Credits.rtf
51 chmod 644 $(bundle_name)/Contents/Resources/*
52 cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
53 chmod 755 $(bundle_name)/Contents/MacOS/scummvm
54 $(STRIP) $(bundle_name)/Contents/MacOS/scummvm
55
56 iphonebundle: iphone
57 mkdir -p $(bundle_name)
58 cp $(srcdir)/dists/iphone/Info.plist $(bundle_name)/
59 cp $(DIST_FILES_DOCS) $(bundle_name)/
60 cp $(DIST_FILES_THEMES) $(bundle_name)/
61 ifdef DIST_FILES_ENGINEDATA
62 cp $(DIST_FILES_ENGINEDATA) $(bundle_name)/
63 endif
64 $(STRIP) scummvm
65 ldid -S scummvm
66 chmod 755 scummvm
67 cp scummvm $(bundle_name)/ScummVM
68 cp $(srcdir)/dists/iphone/icon.png $(bundle_name)/
69 cp $(srcdir)/dists/iphone/icon-72.png $(bundle_name)/
70 cp $(srcdir)/dists/iphone/Default.png $(bundle_name)/
71
72 # Location of static libs for the iPhone
73 ifneq ($(BACKEND), iphone)
74 # Static libaries, used for the scummvm-static and iphone targets
75 OSX_STATIC_LIBS := `$(STATICLIBPATH)/bin/sdl-config --static-libs`
76 endif
77
78 ifdef USE_VORBIS
79 OSX_STATIC_LIBS += \
80 $(STATICLIBPATH)/lib/libvorbisfile.a \
81 $(STATICLIBPATH)/lib/libvorbis.a \
82 $(STATICLIBPATH)/lib/libogg.a
83 endif
84
85 ifdef USE_TREMOR
86 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libvorbisidec.a
87 endif
88
89 ifdef USE_FLAC
90 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libFLAC.a
91 endif
92
93 ifdef USE_MAD
94 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libmad.a
95 endif
96
97 ifdef USE_MPEG2
98 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libmpeg2.a
99 endif
100
101 ifdef USE_PNG
102 OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libpng.a
103 endif
104
105 ifdef USE_ZLIB
106 OSX_ZLIB ?= -lz
107 endif
108
109 ifdef USE_TERMCONV
110 OSX_ICONV ?= -liconv
111 endif
112
113 # Special target to create a static linked binary for Mac OS X.
114 # We use -force_cpusubtype_ALL to ensure the binary runs on every
115 # PowerPC machine.
116 scummvm-static: $(OBJS)
117 $(CXX) $(LDFLAGS) -force_cpusubtype_ALL -o scummvm-static $(OBJS) \
118 -framework CoreMIDI \
119 $(OSX_STATIC_LIBS) \
120 $(OSX_ZLIB) \
121 $(OSX_ICONV) \
122 -lSystemStubs
123
124 # Special target to create a static linked binary for the iPhone
125 iphone: $(OBJS)
126 $(CXX) $(LDFLAGS) -o scummvm $(OBJS) \
127 $(OSX_STATIC_LIBS) \
128 -framework UIKit -framework CoreGraphics -framework OpenGLES \
129 -framework GraphicsServices -framework CoreFoundation -framework QuartzCore \
130 -framework Foundation -framework AudioToolbox -framework CoreAudio \
131 -lobjc -lz
132
133 # Special target to create a snapshot disk image for Mac OS X
134 # TODO: Replace AUTHORS by Credits.rtf
135 osxsnap: bundle
136 mkdir ScummVM-snapshot
137 $(srcdir)/tools/credits.pl --text > $(srcdir)/AUTHORS
138 cp $(srcdir)/AUTHORS ./ScummVM-snapshot/Authors
139 cp $(srcdir)/COPYING ./ScummVM-snapshot/License\ \(GPL\)
140 cp $(srcdir)/COPYING.LGPL ./ScummVM-snapshot/License\ \(LGPL\)
141 cp $(srcdir)/COPYRIGHT ./ScummVM-snapshot/Copyright\ Holders
142 cp $(srcdir)/NEWS ./ScummVM-snapshot/News
143 cp $(srcdir)/README ./ScummVM-snapshot/ScummVM\ ReadMe
144 /Developer/Tools/SetFile -t ttro -c ttxt ./ScummVM-snapshot/*
145 /Developer/Tools/CpMac -r $(bundle_name) ./ScummVM-snapshot/
146 cp $(srcdir)/dists/macosx/DS_Store ./ScummVM-snapshot/.DS_Store
147 cp $(srcdir)/dists/macosx/background.jpg ./ScummVM-snapshot/background.jpg
148 /Developer/Tools/SetFile -a V ./ScummVM-snapshot/.DS_Store
149 /Developer/Tools/SetFile -a V ./ScummVM-snapshot/background.jpg
150 hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ \
151 -srcfolder ScummVM-snapshot \
152 -volname "ScummVM" \
153 ScummVM-snapshot.dmg
154 rm -rf ScummVM-snapshot
155
156 #
157 # Windows specific
158 #
159
160 scummvmico.o: $(srcdir)/icons/scummvm.ico
161 $(WINDRES) $(WINDRESFLAGS) -I$(srcdir) $(srcdir)/dists/scummvm.rc scummvmico.o
162
163 # Special target to create a win32 snapshot binary
164 win32dist: $(EXECUTABLE)
165 mkdir -p $(WIN32PATH)
166 $(STRIP) $(EXECUTABLE) -o $(WIN32PATH)/$(EXECUTABLE)
167 cp $(DIST_FILES_THEMES) $(WIN32PATH)
168 ifdef DIST_FILES_ENGINEDATA
169 cp $(DIST_FILES_ENGINEDATA) $(WIN32PATH)
170 endif
171 cp $(srcdir)/AUTHORS $(WIN32PATH)/AUTHORS.txt
172 cp $(srcdir)/COPYING $(WIN32PATH)/COPYING.txt
173 cp $(srcdir)/COPYING.LGPL $(WIN32PATH)/COPYING.LGPL.txt
174 cp $(srcdir)/COPYRIGHT $(WIN32PATH)/COPYRIGHT.txt
175 cp $(srcdir)/NEWS $(WIN32PATH)/NEWS.txt
176 cp $(srcdir)/README $(WIN32PATH)/README.txt
177 cp /usr/local/README-SDL.txt $(WIN32PATH)
178 cp /usr/local/bin/SDL.dll $(WIN32PATH)
179 u2d $(WIN32PATH)/*.txt
180
181 #
182 # AmigaOS specific
183 #
184
185 # Special target to create an AmigaOS snapshot installation
186 aos4dist: $(EXECUTABLE)
187 mkdir -p $(AOS4PATH)
188 $(STRIP) $(EXECUTABLE) -o $(AOS4PATH)/$(EXECUTABLE)
189 cp icons/scummvm.info $(AOS4PATH)/$(EXECUTABLE).info
190 cp $(DIST_FILES_THEMES) $(AOS4PATH)/themes/
191 ifdef DIST_FILES_ENGINEDATA
192 cp $(DIST_FILES_ENGINEDATA) $(AOS4PATH)/extras/
193 endif
194 cp $(DIST_FILES_DOCS) $(AOS4PATH)
195
196 # Mark special targets as phony
197 .PHONY: deb bundle osxsnap win32dist install uninstall
198
199 #
200 # ARM specific
201 #
202 ifdef USE_TREMOLO
203 DEFINES += -DUSE_TREMOR -DUSE_VORBIS -DUSE_TREMOLO
204 LIBS += -ltremolo
205 endif
206
207 ifdef USE_ARM_SMUSH_ASM
208 DEFINES += -DUSE_ARM_SMUSH_ASM
209 endif
210
211 ifdef USE_ARM_SOUND_ASM
212 DEFINES += -DUSE_ARM_SOUND_ASM
213 endif
214
215 ifdef USE_ARM_GFX_ASM
216 DEFINES += -DUSE_ARM_GFX_ASM
217 endif
218
219 ifdef USE_ARM_COSTUME_ASM
220 DEFINES += -DUSE_ARM_COSTUME_ASM
221 endif
222
223 ifdef USE_ARM_SCALER_ASM
224 DEFINES += -DUSE_ARM_SCALER_ASM
225 endif
Something went wrong with that request. Please try again.