[WIN32] fixed some _WIN32PC leftovers.
[xbmc:xbmc.git] / Makefile.in
1 BUILDSYS_DEPS=@OUTPUT_FILES@
2 BIN_DIRS=       \
3         guilib \
4         guilib/common \
5         guilib/tinyXML \
6         xbmc \
7         xbmc/cdrip \
8         xbmc/cores \
9         xbmc/cores/DllLoader \
10         xbmc/cores/DllLoader/exports \
11         xbmc/cores/DllLoader/exports/util \
12         xbmc/cores/dvdplayer \
13         xbmc/cores/dvdplayer/DVDCodecs \
14         xbmc/cores/dvdplayer/DVDCodecs/Audio \
15         xbmc/cores/dvdplayer/DVDCodecs/Overlay \
16         xbmc/cores/dvdplayer/DVDCodecs/Video \
17         xbmc/cores/dvdplayer/DVDDemuxers/ \
18         xbmc/cores/dvdplayer/DVDInputStreams/ \
19         xbmc/cores/dvdplayer/DVDSubtitles/ \
20         xbmc/cores/paplayer \
21         xbmc/cores/AudioRenderers \
22         xbmc/cores/VideoRenderers \
23         xbmc/cores/VideoRenderers/VideoShaders \
24         xbmc/cores/ExternalPlayer \
25         xbmc/FileSystem \
26         xbmc/FileSystem/MusicDatabaseDirectory \
27         xbmc/FileSystem/VideoDatabaseDirectory \
28         xbmc/karaoke \
29         xbmc/lib/libcmyth \
30         xbmc/lib/libhts \
31         xbmc/lib/libGoAhead \
32         xbmc/lib/libPython \
33         xbmc/lib/libPython/xbmcmodule \
34         xbmc/lib/libRTMP \
35         xbmc/lib/libRTV \
36         xbmc/lib/libscrobbler \
37         xbmc/lib/libshout \
38         xbmc/lib/libUPnP \
39         xbmc/lib/libXBMS \
40         xbmc/lib/libXDAAP \
41         xbmc/lib/sqLite \
42         xbmc/lib/UnrarXLib \
43         xbmc/visualizations \
44         xbmc/screensavers \
45         xbmc/utils \
46         xbmc/settings \
47         xbmc/linux \
48         xbmc/xbox \
49         xbmc/osx
50
51 EC_DIRS= \
52         tools/EventClients
53
54 XBMCTEX_DIRS= \
55         tools/XBMCTex
56
57 DVDPCODECS_DIRS= \
58         xbmc/cores/dvdplayer/Codecs \
59         xbmc/cores/dvdplayer/Codecs/libdvd
60 ifneq (@USE_EXTERNAL_LIBASS@,1)
61   DVDPCODECS_DIRS+=xbmc/lib/libass/xbmc
62 endif
63
64 PAPCODECS_DIRS= \
65         xbmc/cores/paplayer/AC3Codec \
66         xbmc/cores/paplayer/ADPCMCodec \
67         xbmc/cores/paplayer/AACCodec \
68         xbmc/cores/paplayer/NSFCodec \
69         xbmc/cores/paplayer/timidity \
70         xbmc/cores/paplayer/SIDCodec \
71         xbmc/cores/paplayer/WavPackCodec \
72         xbmc/cores/paplayer/GYMCodec \
73         xbmc/cores/paplayer/YMCodec/StSoundLibrary \
74         xbmc/cores/paplayer/ModuleCodec \
75         xbmc/cores/paplayer/MPCCodec/xbmc \
76         xbmc/cores/paplayer/SPCCodec/SNES/SNESAPU \
77         xbmc/cores/paplayer/vgmstream \
78         xbmc/cores/paplayer/FLACCodec \
79         xbmc/cores/paplayer/MACDll \
80         xbmc/cores/paplayer/vorbisfile
81
82 LIB_DIRS=\
83         xbmc/lib/cximage-6.0 \
84         xbmc/lib/libexif \
85         xbmc/lib/libhdhomerun \
86         xbmc/lib/libid3tag \
87         xbmc/lib/libPython/linux
88
89 SS_DIRS=\
90         xbmc/screensavers/rsxs-0.9/xbmc
91
92 VIS_DIRS=\
93         xbmc/visualizations/OpenGLSpectrum \
94         xbmc/visualizations/WaveForm \
95         xbmc/visualizations/XBMCProjectM \
96         xbmc/visualizations/Goom
97
98 PM3_MEDIA=skin/Project\ Mayhem\ III/media
99 PM3HD_MEDIA=skin/PM3.HD/media
100
101 SKIN_DIRS=\
102         $(PM3_MEDIA) \
103         $(PM3HD_MEDIA)
104
105 DIRS= $(BIN_DIRS) $(EC_DIRS) $(XBMCTEX_DIRS) $(DVDPCODECS_DIRS) $(PAPCODECS_DIRS) \
106         $(LIB_DIRS) $(SS_DIRS) $(VIS_DIRS) $(SKIN_DIRS)
107
108 LIBS=@LIBS@
109 CFLAGS=@CFLAGS@
110 CXXFLAGS=@CXXFLAGS@
111 LDFLAGS=@LDFLAGS@
112 INCLUDES=@INCLUDES@
113
114 CLEAN_FILES=xbmc.bin xbmc-xrandr
115
116 DISTCLEAN_FILES=config.h config.log config.status tools/Linux/xbmc.sh \
117         autom4te.cache config.h.in~
118
119 AUTOGENERATED_MAKEFILES = guilib/common/Makefile \
120         tools/EventClients/Clients/OSXRemote/Makefile \
121         tools/XBMCTex/Makefile \
122         xbmc/cores/AudioRenderers/Makefile \
123         xbmc/cores/dvdplayer/Codecs/Makefile \
124         xbmc/cores/dvdplayer/Codecs/libdvd/Makefile \
125         xbmc/cores/paplayer/AACCodec/Makefile \
126         xbmc/cores/paplayer/AC3Codec/Makefile \
127         xbmc/cores/paplayer/ADPCMCodec/Makefile \
128         xbmc/cores/paplayer/FLACCodec/Makefile \
129         xbmc/cores/paplayer/GYMCodec/Makefile \
130         xbmc/cores/paplayer/MACDll/Makefile \
131         xbmc/cores/paplayer/MPCCodec/xbmc/Makefile \
132         xbmc/cores/paplayer/Makefile \
133         xbmc/cores/paplayer/ModuleCodec/Makefile \
134         xbmc/cores/paplayer/NSFCodec/Makefile \
135         xbmc/cores/paplayer/SIDCodec/Makefile \
136         xbmc/cores/paplayer/SPCCodec/SNES/SNESAPU/Makefile \
137         xbmc/cores/paplayer/WavPackCodec/Makefile \
138         xbmc/cores/paplayer/YMCodec/StSoundLibrary/Makefile \
139         xbmc/cores/paplayer/timidity/Makefile \
140         xbmc/cores/paplayer/vgmstream/Makefile \
141         xbmc/cores/paplayer/vorbisfile/Makefile \
142         xbmc/lib/cximage-6.0/Makefile \
143         xbmc/lib/libGoAhead/Makefile \
144         xbmc/lib/libPython/linux/Makefile \
145         xbmc/lib/libRTV/Makefile \
146         xbmc/lib/libUPnP/Makefile \
147         xbmc/lib/libXBMS/Makefile \
148         xbmc/lib/libXDAAP/Makefile \
149         xbmc/lib/libass/xbmc/Makefile \
150         xbmc/lib/libexif/Makefile \
151         xbmc/lib/libhdhomerun/Makefile \
152         xbmc/lib/libid3tag/Makefile \
153         xbmc/lib/libshout/Makefile \
154         xbmc/linux/Makefile \
155         xbmc/screensavers/Makefile \
156         xbmc/screensavers/rsxs-0.9/xbmc/Makefile \
157         xbmc/visualizations/Goom/Makefile \
158         xbmc/visualizations/OpenGLSpectrum/Makefile \
159         xbmc/visualizations/WaveForm/Makefile \
160         xbmc/visualizations/XBMCProjectM/Makefile \
161         xbmc/visualizations/iTunes/Makefile
162
163 all : Makefile externals xbmc.bin xbmc-xrandr skins
164
165 include Makefile.include
166
167 .PHONY : dllloader exports visualizations screensavers eventclients papcodecs \
168         dvdpcodecs imagelib codecs externals force skins
169
170 # hack targets to keep build system up to date
171 Makefile : configure $(addsuffix .in, $(BUILDSYS_DEPS))
172         @echo 'The build system is stale'
173         @echo 'ATTN: Please (re)run configure...'
174         @echo "The following line isn't really an error!"
175         @false
176
177 configure: configure.in
178         @echo 'configure is outdated, regenerating...'
179         @./bootstrap
180         @echo "The following line isn't really an error!"
181         @false
182
183 # skin textures
184 skins: tools/XBMCTex/XBMCTex force
185          $(MAKE) -C $(PM3_MEDIA)
186          $(MAKE) -C $(PM3HD_MEDIA)
187
188 guilib/guilib.a: force
189         $(MAKE) -C guilib
190 guilib/common/gui_common.a: force
191         $(MAKE) -C guilib/common
192 guilib/tinyXML/tinyxml.a: force
193         $(MAKE) -C guilib/tinyXML
194 xbmc/xbmc.a: force
195         $(MAKE) -C xbmc
196 xbmc/cdrip/cdrip.a: force
197         $(MAKE) -C xbmc/cdrip
198 xbmc/cores/cores.a: force
199         $(MAKE) -C xbmc/cores
200 xbmc/cores/DllLoader/dllloader.a: force
201         $(MAKE) -C xbmc/cores/DllLoader/
202 xbmc/cores/DllLoader/exports/exports.a: force
203         $(MAKE) -C xbmc/cores/DllLoader/exports
204 xbmc/cores/DllLoader/exports/util/exports_utils.a: force
205         $(MAKE) -C xbmc/cores/DllLoader/exports/util
206 xbmc/cores/dvdplayer/DVDPlayer.a: force
207         $(MAKE) -C xbmc/cores/dvdplayer
208 xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a: force
209         $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs
210 xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a: force
211         $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs/Audio
212 xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a: force
213         $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs/Overlay
214 xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a: force
215         $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs/Video
216 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a: force
217         $(MAKE) -C xbmc/cores/dvdplayer/DVDDemuxers
218 xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a: force
219         $(MAKE) -C xbmc/cores/dvdplayer/DVDInputStreams
220 xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a: force
221         $(MAKE) -C xbmc/cores/dvdplayer/DVDSubtitles
222 xbmc/cores/paplayer/paplayer.a: force papcodecs
223         $(MAKE) -C xbmc/cores/paplayer
224 xbmc/cores/AudioRenderers/audiorenderers.a: force
225         $(MAKE) -C xbmc/cores/AudioRenderers
226 xbmc/cores/VideoRenderers/VideoRenderer.a: force
227         $(MAKE) -C xbmc/cores/VideoRenderers
228 xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a: force
229         $(MAKE) -C xbmc/cores/VideoRenderers/VideoShaders
230 xbmc/cores/ExternalPlayer/ExternalPlayer.a: force
231         $(MAKE) -C xbmc/cores/ExternalPlayer
232 xbmc/FileSystem/filesystem.a: force
233         $(MAKE) -C xbmc/FileSystem
234 xbmc/FileSystem/MusicDatabaseDirectory/musicdatabasedirectory.a: force
235         $(MAKE) -C xbmc/FileSystem/MusicDatabaseDirectory
236 xbmc/FileSystem/VideoDatabaseDirectory/videodatabasedirectory.a: force
237         $(MAKE) -C xbmc/FileSystem/VideoDatabaseDirectory
238 xbmc/karaoke/karaoke.a: force
239         $(MAKE) -C xbmc/karaoke
240 xbmc/lib/libcmyth/libcmyth.a: force
241         $(MAKE) -C xbmc/lib/libcmyth
242 xbmc/lib/libhts/libhts.a: force
243         $(MAKE) -C xbmc/lib/libhts
244 xbmc/lib/libPython/python.a: force
245         $(MAKE) -C xbmc/lib/libPython
246 xbmc/lib/libPython/xbmcmodule/xbmcmodule.a: force
247         $(MAKE) -C xbmc/lib/libPython/xbmcmodule
248 xbmc/lib/libRTMP/librtmp.a: force
249         $(MAKE) -C xbmc/lib/libRTMP
250 xbmc/lib/libscrobbler/scrobbler.a: force
251         $(MAKE) -C xbmc/lib/libscrobbler
252 xbmc/lib/libRTV/librtv-@ARCH@.a: force
253         $(MAKE) -C xbmc/lib/libRTV
254 xbmc/lib/libshout/libshout-@ARCH@.a: force
255         $(MAKE) -C xbmc/lib/libshout
256 xbmc/lib/libUPnP/libupnp-@ARCH@.a: force
257         $(MAKE) -C xbmc/lib/libUPnP
258 xbmc/lib/libXBMS/libxbms-@ARCH@.a: force
259         $(MAKE) -C xbmc/lib/libXBMS
260 xbmc/lib/libXDAAP/libxdaap-@ARCH@.a: force
261         $(MAKE) -C xbmc/lib/libXDAAP
262 xbmc/lib/libGoAhead/libGoAhead-@ARCH@.a: force
263         $(MAKE) -C xbmc/lib/libGoAhead
264 xbmc/lib/sqLite/sqllite.a: force
265         $(MAKE) -C xbmc/lib/sqLite
266 xbmc/lib/UnrarXLib/UnrarXLib.a: force
267         $(MAKE) -C xbmc/lib/UnrarXLib
268 xbmc/linux/linux.a: force
269         $(MAKE) -C xbmc/linux
270 xbmc/screensavers/screensaver.a: force
271         $(MAKE) -C xbmc/screensavers
272 xbmc/settings/settings.a: force
273         $(MAKE) -C xbmc/settings
274 xbmc/utils/utils.a: force
275         $(MAKE) -C xbmc/utils
276 xbmc/visualizations/visualization.a: force
277         $(MAKE) -C xbmc/visualizations
278 xbmc/xbox/xbox.a: force
279         $(MAKE) -C xbmc/xbox
280 xbmc/osx/osx.a: force
281         $(MAKE) -C xbmc/osx
282 xbmc/cores/paplayer/MPCCodec/xbmc/libmpcdec-@ARCH@.a: force
283         $(MAKE) -C xbmc/cores/paplayer/MPCCodec/xbmc
284
285 exports:
286         $(MAKE) xbmc/cores/DllLoader/exports/exports.a
287         $(MAKE) xbmc/cores/DllLoader/exports/util/exports_utils.a
288         $(MAKE) -C xbmc/cores/DllLoader/exports wrapper.def
289 dllloader: exports
290         $(MAKE) xbmc/cores/DllLoader/dllloader.a
291 visualizations: exports
292         $(MAKE) -C xbmc/visualizations/OpenGLSpectrum
293         $(MAKE) -C xbmc/visualizations/WaveForm
294         $(MAKE) -C xbmc/visualizations/XBMCProjectM
295 ifeq ($(or $(findstring powerpc-linux,$(ARCH)),$(findstring powerpc64-linux,$(ARCH))),)
296         $(MAKE) -C xbmc/visualizations/Goom
297 endif
298 screensavers: exports
299         $(MAKE) -C xbmc/screensavers/rsxs-0.9/xbmc
300 libpython: dllloader
301         $(MAKE) -C xbmc/lib/libPython
302         $(MAKE) -C xbmc/lib/libPython/xbmcmodule
303 python: dllloader
304         $(MAKE) -C xbmc/lib/libPython/linux
305 dvdpcodecs: dllloader
306         $(MAKE) -C xbmc/cores/dvdplayer/Codecs
307         $(MAKE) -C xbmc/cores/dvdplayer/Codecs/libdvd
308 ifneq (@USE_EXTERNAL_LIBASS@,1)
309         $(MAKE) -C xbmc/lib/libass/xbmc
310 endif
311 eventclients:
312 ifeq ($(findstring osx,$(ARCH)), osx)
313         $(MAKE) -C tools/EventClients/Clients/OSXRemote
314 else
315         $(MAKE) -C tools/EventClients
316 endif
317 libexif: dllloader
318         $(MAKE) -C xbmc/lib/libexif
319 libhdhomerun: dllloader
320         $(MAKE) -C xbmc/lib/libhdhomerun
321 libid3tag: dllloader
322         $(MAKE) -C xbmc/lib/libid3tag
323 papcodecs: dllloader dvdpcodecs
324         $(MAKE) -C xbmc/cores/paplayer/AACCodec
325         $(MAKE) -C xbmc/cores/paplayer/AC3Codec
326         $(MAKE) -C xbmc/cores/paplayer/ADPCMCodec
327         $(MAKE) -C xbmc/cores/paplayer/FLACCodec
328         $(MAKE) -C xbmc/cores/paplayer/GYMCodec
329         $(MAKE) -C xbmc/cores/paplayer/vgmstream
330         $(MAKE) -C xbmc/cores/paplayer/timidity
331         $(MAKE) -C xbmc/cores/paplayer/MPCCodec/xbmc
332         $(MAKE) -C xbmc/cores/paplayer/NSFCodec
333         $(MAKE) -C xbmc/cores/paplayer/SIDCodec
334         $(MAKE) -C xbmc/cores/paplayer/vorbisfile
335         $(MAKE) -C xbmc/cores/paplayer/ModuleCodec
336 ifneq (@USE_EXTERNAL_LIBWAVPACK@,1)
337         $(MAKE) -C xbmc/cores/paplayer/WavPackCodec
338 endif
339         $(MAKE) -C xbmc/cores/paplayer/YMCodec/StSoundLibrary   
340 ifeq ($(findstring powerpc,$(ARCH)),)
341         $(MAKE) -C xbmc/cores/paplayer/MACDll
342 endif
343 ifeq ($(or $(findstring powerpc,$(ARCH)),$(findstring x86_64-linux,$(ARCH))),)
344         $(MAKE) -C xbmc/cores/paplayer/SPCCodec/SNES/SNESAPU
345 endif
346 imagelib: dllloader
347         $(MAKE) -C xbmc/lib/cximage-6.0
348
349 codecs: papcodecs dvdpcodecs
350 libs: libhdhomerun libid3tag imagelib libexif python
351 externals: codecs libs python visualizations screensavers
352
353 xcode_depends: \
354         codecs libs python visualizations screensavers eventclients skins \
355         xbmc/lib/libRTMP/librtmp.a \
356         xbmc/lib/libXBMS/libxbms-@ARCH@.a \
357         xbmc/lib/libRTV/librtv-@ARCH@.a \
358         xbmc/lib/libXDAAP/libxdaap-@ARCH@.a \
359         xbmc/lib/libshout/libshout-@ARCH@.a \
360         xbmc/lib/libGoAhead/libGoAhead-@ARCH@.a
361
362 # platform independend objects
363 OBJSXBMC=       \
364         guilib/guilib.a \
365         guilib/common/gui_common.a \
366         guilib/tinyXML/tinyxml.a \
367         xbmc/xbmc.a \
368         xbmc/cdrip/cdrip.a \
369         xbmc/cores/cores.a \
370         xbmc/cores/DllLoader/dllloader.a \
371         xbmc/cores/DllLoader/exports/exports.a \
372         xbmc/cores/DllLoader/exports/util/exports_utils.a \
373         xbmc/cores/dvdplayer/DVDPlayer.a \
374         xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a \
375         xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a \
376         xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a \
377         xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a \
378         xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a \
379         xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a \
380         xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a \
381         xbmc/cores/paplayer/paplayer.a \
382         xbmc/cores/AudioRenderers/audiorenderers.a \
383         xbmc/cores/VideoRenderers/VideoRenderer.a \
384         xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a \
385         xbmc/cores/ExternalPlayer/ExternalPlayer.a \
386         xbmc/FileSystem/filesystem.a \
387         xbmc/FileSystem/MusicDatabaseDirectory/musicdatabasedirectory.a \
388         xbmc/FileSystem/VideoDatabaseDirectory/videodatabasedirectory.a \
389         xbmc/karaoke/karaoke.a \
390         xbmc/lib/libcmyth/libcmyth.a \
391         xbmc/lib/libhts/libhts.a \
392         xbmc/lib/libPython/python.a \
393         xbmc/lib/libPython/xbmcmodule/xbmcmodule.a \
394         xbmc/lib/libRTMP/librtmp.a \
395         xbmc/lib/libscrobbler/scrobbler.a \
396         xbmc/lib/libRTV/librtv-@ARCH@.a \
397         xbmc/lib/libshout/libshout-@ARCH@.a \
398         xbmc/lib/libUPnP/libupnp-@ARCH@.a \
399         xbmc/lib/libXBMS/libxbms-@ARCH@.a \
400         xbmc/lib/libXDAAP/libxdaap-@ARCH@.a \
401         xbmc/lib/libGoAhead/libGoAhead-@ARCH@.a \
402         xbmc/lib/sqLite/sqllite.a \
403         xbmc/lib/UnrarXLib/UnrarXLib.a \
404         xbmc/linux/linux.a \
405         xbmc/screensavers/screensaver.a \
406         xbmc/settings/settings.a \
407         xbmc/utils/utils.a \
408         xbmc/visualizations/visualization.a \
409         xbmc/xbox/xbox.a
410
411 # platform dependend objects
412 ifeq ($(findstring osx,$(ARCH)), osx)
413 OBJSXBMC += \
414         xbmc/osx/osx.a \
415         xbmc/lib/libSDL-OSX/libSDL-@ARCH@.a \
416         xbmc/lib/libSDL-OSX/libSDL_mixer-@ARCH@.a
417 endif
418
419 # TODO: XBPythonDLLFuncs.S not implemented on PowerPC
420 ifeq ($(ARCH), powerpc64-linux)
421         # For some reason the XBMC version of libpython gets linker errors - use system version instead
422         #OBJSXBMC += xbmc/lib/libPython/Python/libpython2.4.a
423         LIBS += -lpython2.4
424 endif
425
426 # If using external libmpcdec
427 ifeq (@USE_EXTERNAL_LIBMPCDEC@,1)
428         OBJSXBMC += xbmc/cores/paplayer/MPCCodec/xbmc/libmpcdec-@ARCH@.a
429 endif
430
431 xbmc.bin: $(OBJSXBMC)
432 ifeq ($(findstring osx,$(ARCH)), osx)
433         $(CXX) $(CXXFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(OBJSXBMC) $(LIBS) $(LDFLAGS) -rdynamic
434 else
435         $(CXX) $(CXXFLAGS) -o xbmc.bin -Wl,--whole-archive $(OBJSXBMC) -Wl,--no-whole-archive $(LIBS) $(LDFLAGS) -rdynamic
436 endif
437
438 xbmc-xrandr: xbmc-xrandr.c
439 ifeq ($(findstring osx,$(ARCH)), osx)
440         # xbmc-xrandr.c gets picked up by the default make rules
441         #  so only exclude it for osx builds
442         @echo "excluding xbmc-xrandr"
443 else
444         $(CC) $(CFLAGS) -o xbmc-xrandr xbmc-xrandr.c -lXrandr -lXrender -lX11 
445 endif
446
447 tools/XBMCTex/XBMCTex:
448 ifeq ($(findstring osx,$(ARCH)), osx)
449         # hack this for now
450         $(MAKE) -C tools/XBMCTex -f Makefile.osx
451 else
452         $(MAKE) -C tools/XBMCTex/
453 endif
454
455 install-bin: xbmc.bin # developement convenience target
456         sudo install -D xbmc.bin $(prefix)/share/xbmc
457
458 ifeq ($(findstring osx,$(ARCH)), osx)
459         # TODO: add osx install
460 else
461 install:
462         @echo "Copying XBMC binary to $(prefix)/share/xbmc/xbmc.bin"
463         @install -D xbmc.bin $(prefix)/share/xbmc/xbmc.bin
464         @install -D xbmc-xrandr $(prefix)/share/xbmc/xbmc-xrandr
465         @install -D tools/Linux/xbmc.sh $(prefix)/bin/xbmc
466         @install -D tools/Linux/xbmc-standalone.sh $(prefix)/bin/xbmc-standalone
467         @install -D -m 0644 tools/Linux/FEH.py $(prefix)/share/xbmc/FEH.py
468         @install -D -m 0644 tools/Linux/xbmc-xsession.desktop $(prefix)/share/xsessions/XBMC.desktop
469         @echo "Copying support and legal files..."
470         @for FILE in `ls README.linux LICENSE.GPL *.txt`; do \
471                 install -D -m 0644 "$$FILE" $(prefix)/share/xbmc/; done
472         @echo "Done!"
473         @echo "You can run XBMC with the command 'xbmc'"
474         @$(MAKE) install-datas
475         @$(MAKE) install-web
476 endif
477
478 install-datas:
479         @echo "Copying system files to $(prefix)/share/xbmc"
480         @# Arch independent files
481         @find language media scripts sounds userdata visualisations system -regextype posix-extended -type f -not -iregex ".*svn.*|.*\.so|.*\.dll|.*\.pyd|.*python/.*\.zlib|.*\.vis" -exec install -D -m 0644 "{}" $(prefix)/share/xbmc/"{}" \; -printf " -- %-75.75f\r"
482         @# Arch dependent files
483         @find system screensavers visualisations -regextype posix-extended -type f -not -iregex ".*svn.*|.*win32\.vis|.*osx\.vis" -iregex ".*$(ARCH).*|.*\.vis|.*\.xbs" -exec install -D "{}" $(prefix)/share/xbmc/"{}" \; -printf " -- %-75.75f\r"
484         @# Skins
485         @find skin -regextype posix-extended -type f -not -iregex ".*svn.*|.*\.png|.*\.gif" -exec install -D -m 0644 '{}' $(prefix)/share/xbmc/'{}' \; -printf " -- %-75.75f\r"
486
487 install-livedatas:
488         @echo "Install Live CD datas in $(prefix) ..."
489         @install -D tools/XBMCLive/diskmounter $(prefix)/bin
490         @install -D tools/XBMCLive/installXBMC $(prefix)/bin
491         @install -D tools/XBMCLive/runXBMC $(prefix)/bin
492         @install -D tools/XBMCLive/setAlsaVolumes $(prefix)/bin
493
494 install-web:
495         @mkdir -p $(prefix)/share/xbmc/web
496         @cp -r web/Project_Mayhem_III/* $(prefix)/share/xbmc/web
497         @find $(prefix)/share/xbmc/web -depth -name .svn -exec rm -rf {} \;
498
499 uninstall:
500         @echo "Removing XBMC..."
501         @rm -rf $(prefix)/share/xbmc $(prefix)/bin/xbmc
502         @rm -rf $(prefix)/bin/xbmc-standalone
503         @rm -rf $(prefix)/share/xsessions/XBMC.desktop
504         @echo "Done!"
505
506 reallyclean:
507         @echo " This will delete ALL unversioned files in"; \
508          echo " your XBMC source tree. If you aren't sure"; \
509          echo " you want to do this, answer anything but"; \
510          echo " 'Y' (case sensitive) to the following."; \
511          echo " DISCLAIMER: Team XBMC is NOT responsible"; \
512          echo " for ANYTHING lost if you execute this command!"; \
513          echo -n " Damnserious? (Y/*) "; \
514          read -n1 PROMPT; \
515          if [[ "$$PROMPT" = "Y" ]]; then \
516                 SVNV=$$(svnversion -n | cut -d':' -f1); _IFS=$$IFS; IFS=$$'\t\n'; \
517                 for i in `svn st --no-ignore | grep ^[I\?] | cut -d' ' -f7-`; do \
518                         if [[ $${i:(-4)} != "diff" && $${i:(-5)} != "patch" ]]; then \
519                                 echo "  Deleting $$i"; \
520                                 rm -rf "$$i"; \
521                         fi; \
522                 done; \
523                 IFS=$$_IFS; \
524                 echo " Recovering any missing files."; \
525                 svn up -r $${SVNV/M/} | cut -d' ' -f7- | awk '{print "  "$$0}'; \
526                 echo " Done."; \
527                 echo " The following files may need reverted (svn revert <file>)"; \
528                 svn st | grep ^M | cut -d' ' -f7- | awk '{print "  "$$0}'; \
529          else \
530                 echo; \
531          fi
532
533 clean-xbmc.bin:
534         rm -f xbmc.bin
535         for d in $(BIN_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
536 clean-eventclients:
537         for d in $(EC_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
538 clean-xbmctex:
539         for d in $(XBMCTEX_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
540 clean-dvdpcodecs: 
541         for d in $(DVDPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
542 clean-papcodecs:
543         for d in $(PAPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
544 clean-libs: 
545         for d in $(LIB_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
546 clean-screensavers: 
547         for d in $(SS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
548 clean-visualisations:
549         for d in $(VIS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
550
551 clean-codecs: clean-dvdpcodecs clean-papcodecs
552
553 clean-externals: clean-codecs clean-eventclients clean-xbmctex clean-libs \
554         clean-screensavers clean-visualisations
555
556