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