Code changes to make external python work in windows. Changes credit to WiSo
[vuplus_xbmc] / Makefile.in
1 AUTOGENERATED_MAKEFILES=@OUTPUT_FILES@
2 BIN_DIRS=       \
3         xbmc/guilib \
4         lib/tinyXML \
5         xbmc \
6         xbmc/addons \
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/cores/playercorefactory \
26         xbmc/filesystem \
27         xbmc/filesystem/MusicDatabaseDirectory \
28         xbmc/filesystem/VideoDatabaseDirectory \
29         xbmc/dialogs \
30         xbmc/music \
31         xbmc/music/dialogs \
32         xbmc/music/infoscanner \
33         xbmc/music/karaoke \
34         xbmc/music/tags \
35         xbmc/music/windows \
36         xbmc/pictures \
37         xbmc/programs \
38         xbmc/video \
39         xbmc/video/dialogs \
40         xbmc/video/windows \
41         xbmc/windows \
42         xbmc/network \
43         xbmc/playlists \
44         xbmc/powermanagement \
45         xbmc/powermanagement/linux \
46         xbmc/storage \
47         xbmc/storage/linux \
48         xbmc/storage/osx \
49         lib/libhts \
50         xbmc/interfaces \
51         xbmc/interfaces/http-api \
52         xbmc/interfaces/json-rpc \
53         xbmc/interfaces/python \
54         xbmc/interfaces/python/xbmcmodule \
55         lib/libRTV \
56         xbmc/network/libscrobbler \
57         lib/libUPnP \
58         lib/libXBMS \
59         lib/libXDAAP \
60         xbmc/dbwrappers \
61         lib/UnrarXLib \
62         lib/libsquish \
63         xbmc/visualizations \
64         xbmc/screensavers \
65         xbmc/utils \
66         xbmc/settings \
67         xbmc/linux \
68         xbmc/input \
69         xbmc/input/linux \
70         xbmc/osx \
71         xbmc/threads \
72         xbmc/threads/posix \
73         xbmc/windowing \
74
75 ifeq (@USE_OPENGL@,1)
76 BIN_DIRS += xbmc/rendering/gl
77 endif
78 ifeq (@USE_OPENGLES@,1)
79 BIN_DIRS += xbmc/rendering/gles
80 BIN_DIRS += xbmc/windowing/egl
81 endif
82
83 ifeq ($(findstring osx,@ARCH@),osx)
84 BIN_DIRS += xbmc/windowing/osx
85 BIN_DIRS += xbmc/network/osx
86 BIN_DIRS += xbmc/storage/osx
87 BIN_DIRS += xbmc/powermanagement/osx
88 else
89 BIN_DIRS += xbmc/windowing/X11
90 endif
91
92 EC_DIRS= \
93         tools/EventClients
94
95 XBMCTEX_DIRS= \
96         tools/TexturePacker
97
98 DVDPCODECS_DIRS= \
99         lib \
100         lib/libdvd \
101
102 PAPCODECS_DIRS= \
103         lib/xbadpcm \
104         lib/nosefart \
105         lib/timidity \
106         lib/libsidplay2 \
107         lib/stsound/StSoundLibrary \
108         lib/snesapu/SNES/SNESAPU \
109         lib/vgmstream \
110
111 ifeq (@USE_ASAP_CODEC@,1)
112 PAPCODEC_DIRS+= \
113         lib/asap
114 endif
115
116 LIB_DIRS=\
117         lib/cximage-6.0 \
118         lib/libexif \
119         lib/cmyth \
120         lib/libhdhomerun \
121         lib/libid3tag \
122         lib/libapetag \
123         lib/cpluff \
124         lib/xbmc-dll-symbols \
125         lib/jsoncpp/src/lib_json
126
127 ifneq (@USE_EXTERNAL_PYTHON@,1)
128 LIB_DIRS+=xbmc/interfaces/python/linux
129 endif
130
131 SS_DIRS=\
132         xbmc/screensavers/rsxs-0.9/xbmc
133
134 VIS_DIRS=
135 ifeq (@USE_OPENGL@,1)
136 VIS_DIRS+=\
137         xbmc/visualizations/OpenGLSpectrum \
138         xbmc/visualizations/WaveForm \
139         xbmc/visualizations/XBMCProjectM \
140
141 endif
142 ifeq ($(findstring osx,@ARCH@), osx)
143 VIS_DIRS+=xbmc/visualizations/iTunes \
144
145 endif
146 ifneq (@BUILD_GOOM@,1)
147 VIS_DIRS+=xbmc/visualizations/Goom \
148
149 endif
150
151 CONFLUENCE_MEDIA=addons/skin.confluence/media
152
153 SKIN_DIRS=\
154         $(CONFLUENCE_MEDIA)
155
156 DIRS= $(BIN_DIRS) $(EC_DIRS) $(XBMCTEX_DIRS) $(DVDPCODECS_DIRS) $(PAPCODECS_DIRS) \
157         $(LIB_DIRS) $(SS_DIRS) $(VIS_DIRS) $(SKIN_DIRS)
158
159 LIBS=@LIBS@
160 CFLAGS=@CFLAGS@
161 CXXFLAGS=@CXXFLAGS@
162 LDFLAGS=@LDFLAGS@
163 INCLUDES=$(sort @INCLUDES@)
164
165 CLEAN_FILES=xbmc.bin xbmc-xrandr
166
167 DISTCLEAN_FILES=config.h config.log config.status tools/Linux/xbmc.sh \
168         tools/Linux/xbmc-standalone.sh autom4te.cache config.h.in~ \
169         lib/python/Include/pyconfig.h \
170         lib/python/configure.lineno \
171         lib/python/libpython2.4.so.1.0 \
172         system/libcpluff-@ARCH@.so
173
174 ifneq (@USE_EXTERNAL_PYTHON@,1)
175         PYTHON_TARGET=python
176 else
177         PYTHON_TARGET=
178 endif
179
180 all : Makefile externals xbmc.bin xbmc-xrandr skins
181
182 include Makefile.include
183
184 .PHONY : dllloader exports visualizations screensavers eventclients papcodecs \
185         dvdpcodecs imagelib codecs externals force skins
186
187 # hack targets to keep build system up to date
188 Makefile : config.status $(addsuffix .in, $(AUTOGENERATED_MAKEFILES))
189         @echo "Regenerating Makefiles..."
190         @./config.status &> /dev/null
191         @echo "done"
192
193 config.status: configure
194         @echo "Build system configuration is stale."
195         @echo "Please (re)run configure."
196         @test -n "$$XBMC_IGNORE_STALE"
197
198 configure: configure.in
199         @echo 'configure is outdated, regenerating...'
200         @./bootstrap
201
202 # skin textures
203 ifneq ($(findstring arm,@ARCH@), arm)
204 skins: tools/TexturePacker/TexturePacker force
205          $(MAKE) -C $(CONFLUENCE_MEDIA)
206 else
207 skins:
208 endif
209
210
211 xbmc/guilib/guilib.a: force
212         $(MAKE) -C xbmc/guilib
213 lib/tinyXML/tinyxml.a: force
214         $(MAKE) -C lib/tinyXML
215 xbmc/xbmc.a: force
216         $(MAKE) -C xbmc
217 xbmc/cdrip/cdrip.a: force
218         $(MAKE) -C xbmc/cdrip
219 xbmc/cores/cores.a: force
220         $(MAKE) -C xbmc/cores
221 xbmc/cores/DllLoader/dllloader.a: force
222         $(MAKE) -C xbmc/cores/DllLoader/
223 xbmc/cores/DllLoader/exports/exports.a: force
224         $(MAKE) -C xbmc/cores/DllLoader/exports
225 xbmc/cores/DllLoader/exports/util/exports_utils.a: force
226         $(MAKE) -C xbmc/cores/DllLoader/exports/util
227 xbmc/cores/dvdplayer/DVDPlayer.a: force
228         $(MAKE) -C xbmc/cores/dvdplayer
229 xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a: force
230         $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs
231 xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a: force
232         $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs/Audio
233 xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a: force
234         $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs/Overlay
235 xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a: force
236         $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs/Video
237 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a: force
238         $(MAKE) -C xbmc/cores/dvdplayer/DVDDemuxers
239 xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a: force
240         $(MAKE) -C xbmc/cores/dvdplayer/DVDInputStreams
241 xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a: force
242         $(MAKE) -C xbmc/cores/dvdplayer/DVDSubtitles
243 xbmc/cores/paplayer/paplayer.a: force papcodecs
244         $(MAKE) -C xbmc/cores/paplayer
245 xbmc/cores/AudioRenderers/audiorenderers.a: force
246         $(MAKE) -C xbmc/cores/AudioRenderers
247 xbmc/cores/VideoRenderers/VideoRenderer.a: force
248         $(MAKE) -C xbmc/cores/VideoRenderers
249 xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a: force
250         $(MAKE) -C xbmc/cores/VideoRenderers/VideoShaders
251 xbmc/cores/ExternalPlayer/ExternalPlayer.a: force
252         $(MAKE) -C xbmc/cores/ExternalPlayer
253 xbmc/cores/playercorefactory/playercorefactory.a: force
254         $(MAKE) -C xbmc/cores/playercorefactory
255 xbmc/filesystem/filesystem.a: force
256         $(MAKE) -C xbmc/filesystem
257 xbmc/filesystem/MusicDatabaseDirectory/musicdatabasedirectory.a: force
258         $(MAKE) -C xbmc/filesystem/MusicDatabaseDirectory
259 xbmc/filesystem/VideoDatabaseDirectory/videodatabasedirectory.a: force
260         $(MAKE) -C xbmc/filesystem/VideoDatabaseDirectory
261 xbmc/input/input.a: force
262         $(MAKE) -C xbmc/input
263 xbmc/input/linux/input_linux.a: force
264         $(MAKE) -C xbmc/input/linux
265 xbmc/music/karaoke/karaoke.a: force
266         $(MAKE) -C xbmc/music/karaoke
267 xbmc/network/network.a: force
268         $(MAKE) -C xbmc/network
269 xbmc/network/osx/network.a: force
270         $(MAKE) -C xbmc/network/osx
271 xbmc/pictures/pictures.a: force
272         $(MAKE) -C xbmc/pictures
273 xbmc/programs/programs.a: force
274         $(MAKE) -C xbmc/programs
275 xbmc/network/linux/network_linux.a: force
276         $(MAKE) -C xbmc/network/linux
277 xbmc/playlists/playlists.a: force
278         $(MAKE) -C xbmc/playlists
279 xbmc/powermanagement/powermanagement.a: force
280         $(MAKE) -C xbmc/powermanagement
281 xbmc/powermanagement/linux/powermanagement_linux.a: force
282         $(MAKE) -C xbmc/powermanagement/linux
283 xbmc/powermanagement/osx/powermanagement.a: force
284         $(MAKE) -C xbmc/powermanagement/osx
285 xbmc/windowing/X11/windowing_X11.a: force
286         $(MAKE) -C xbmc/windowing/X11
287 xbmc/rendering/rendering.a: force
288         $(MAKE) -C xbmc/rendering
289 xbmc/rendering/gl/rendering_gl.a: force
290         $(MAKE) -C xbmc/rendering/gl
291 xbmc/rendering/gles/rendering_gles.a: force
292         $(MAKE) -C xbmc/rendering/gles
293 xbmc/windowing/windowing.a: force
294         $(MAKE) -C xbmc/windowing
295 xbmc/windowing/egl/windowing_egl.a: force
296         $(MAKE) -C xbmc/windowing/egl
297 xbmc/windowing/osx/windowing_osx.a: force
298         $(MAKE) -C xbmc/windowing/osx
299 xbmc/storage/storage.a: force
300         $(MAKE) -C xbmc/storage
301 xbmc/storage/linux/storage_linux.a: force
302         $(MAKE) -C xbmc/storage/linux
303 xbmc/storage/osx/storage.a: force
304         $(MAKE) -C xbmc/storage/osx
305 xbmc/threads/threads.a: force
306         $(MAKE) -C xbmc/threads
307 xbmc/music/music.a: force
308         $(MAKE) -C xbmc/music
309 xbmc/music/tags/musictags.a: force
310         $(MAKE) -C xbmc/music/tags
311 xbmc/music/dialogs/musicdialogs.a: force
312         $(MAKE) -C xbmc/music/dialogs
313 xbmc/music/windows/musicwindows.a: force
314         $(MAKE) -C xbmc/music/windows
315 xbmc/music/infoscanner/musicscanner.a: force
316         $(MAKE) -C xbmc/music/infoscanner
317 xbmc/video/video.a: force
318         $(MAKE) -C xbmc/video
319 xbmc/video/dialogs/videodialogs.a: force
320         $(MAKE) -C xbmc/video/dialogs
321 xbmc/video/windows/videowindows.a: force
322         $(MAKE) -C xbmc/video/windows
323 xbmc/dialogs/dialogs.a: force
324         $(MAKE) -C xbmc/dialogs
325 xbmc/windows/windows.a: force
326         $(MAKE) -C xbmc/windows
327 lib/libhts/libhts.a: force
328         $(MAKE) -C lib/libhts
329 xbmc/interfaces/interfaces.a: force
330         $(MAKE) -C xbmc/interfaces
331 xbmc/interfaces/python/python.a: force
332         $(MAKE) -C xbmc/interfaces/python
333 xbmc/interfaces/python/xbmcmodule/xbmcmodule.a: force
334         $(MAKE) -C xbmc/interfaces/python/xbmcmodule
335 xbmc/network/libscrobbler/scrobbler.a: force
336         $(MAKE) -C xbmc/network/libscrobbler
337 lib/libRTV/librtv.a: force
338         $(MAKE) -C lib/libRTV
339 lib/libUPnP/libupnp.a: force
340         $(MAKE) -C lib/libUPnP
341 lib/libXBMS/libxbms.a: force
342         $(MAKE) -C lib/libXBMS
343 lib/libXDAAP/libxdaap.a: force
344         $(MAKE) -C lib/libXDAAP
345 lib/jsoncpp/src/lib_json/libjsoncpp.a: force
346         $(MAKE) -C lib/jsoncpp/src/lib_json
347 xbmc/interfaces/http-api/http-api.a: force
348         $(MAKE) -C xbmc/interfaces/http-api
349 xbmc/interfaces/json-rpc/json-rpc.a: force
350         $(MAKE) -C xbmc/interfaces/json-rpc
351 xbmc/dbwrappers/dbwrappers.a: force
352         $(MAKE) -C xbmc/dbwrappers
353 lib/UnrarXLib/UnrarXLib.a: force
354         $(MAKE) -C lib/UnrarXLib
355 lib/libsquish/libsquish.a: force
356         $(MAKE) -C lib/libsquish
357 xbmc/linux/linux.a: force
358         $(MAKE) -C xbmc/linux
359 xbmc/threads/posix/threads_posix.a: force
360         $(MAKE) -C xbmc/threads/posix
361 xbmc/threads/darwin/threads_darwin.a: force
362         $(MAKE) -C xbmc/threads/darwin
363 xbmc/addons/addons.a: force
364         $(MAKE) -C xbmc/addons
365 xbmc/settings/settings.a: force
366         $(MAKE) -C xbmc/settings
367 xbmc/utils/utils.a: force
368         $(MAKE) -C xbmc/utils
369 xbmc/osx/osx.a: force
370         $(MAKE) -C xbmc/osx
371 lib/libapetag/.libs/libapetag.a: force
372         $(MAKE) -C lib/libapetag
373 lib/cpluff/libcpluff/.libs/libcpluff.a: force
374         $(MAKE) -C lib/cpluff/libcpluff
375 system/libcpluff-@ARCH@.so: lib/cpluff/libcpluff/.libs/libcpluff.a
376 ifeq ($(findstring osx,@ARCH@), osx)
377   ifeq (@ARCH@, powerpc-osx)
378         $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -arch @ARCHTYPE@ -lexpat -lbundle1.o -o $@ $<
379   endif
380   ifeq (@ARCH@, x86-osx)
381         $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -arch @ARCHTYPE@ -lexpat -o $@ $<
382   endif
383   ifeq (@ARCH@, arm-osx)
384         $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -read_only_relocs suppress -arch armv7 -o $@ $<
385   endif
386 else
387         cp lib/cpluff/libcpluff/.libs/libcpluff.so $@
388 endif
389 lib/xbmc-dll-symbols/dll-symbols.a: force
390         $(MAKE) -C lib/xbmc-dll-symbols
391
392 exports:
393         $(MAKE) xbmc/cores/DllLoader/exports/exports.a
394         $(MAKE) xbmc/cores/DllLoader/exports/util/exports_utils.a
395         $(MAKE) -C xbmc/cores/DllLoader/exports wrapper.def
396 dllloader: exports
397         $(MAKE) xbmc/cores/DllLoader/dllloader.a
398 visualizations: exports
399 ifneq ($(findstring arm,@ARCH@), arm)
400         $(MAKE) -C xbmc/visualizations/OpenGLSpectrum
401         $(MAKE) -C xbmc/visualizations/WaveForm
402         $(MAKE) -C xbmc/visualizations/XBMCProjectM
403 ifeq ($(findstring osx,@ARCH@), osx)
404         $(MAKE) -C xbmc/visualizations/iTunes
405 endif
406 ifneq (@BUILD_GOOM@,1)
407 ifeq ($(or $(findstring powerpc-linux,@ARCH@),$(findstring powerpc64-linux,@ARCH@)),)
408         $(MAKE) -C xbmc/visualizations/Goom
409 endif
410 endif
411 endif
412 screensavers: exports
413 ifneq ($(findstring arm,@ARCH@), arm)
414         $(MAKE) -C xbmc/screensavers/rsxs-0.9/xbmc
415 endif
416 libpython: dllloader
417         $(MAKE) -C xbmc/interfaces/python
418         $(MAKE) -C xbmc/interfaces/python/xbmcmodule
419 ifneq (@USE_EXTERNAL_PYTHON@,1)
420 python: dllloader
421         $(MAKE) -C xbmc/interfaces/python/linux
422 endif
423 dvdpcodecs: dllloader
424         $(MAKE) -C lib 
425         $(MAKE) -C lib/libdvd
426 eventclients:
427 ifeq ($(findstring osx,@ARCH@), osx)
428 ifneq ($(findstring arm,@ARCH@), arm)
429         $(MAKE) -C tools/EventClients/Clients/OSXRemote
430 endif
431 else
432         $(MAKE) -C tools/EventClients
433 endif
434 libexif: dllloader
435         $(MAKE) -C lib/libexif
436 cmyth: dllloader
437         $(MAKE) -C lib/cmyth
438 libhdhomerun: dllloader
439         $(MAKE) -C lib/libhdhomerun
440 libid3tag: dllloader
441         $(MAKE) -C lib/libid3tag
442 papcodecs: dllloader dvdpcodecs
443         test -d system/players/paplayer || mkdir system/players/paplayer
444         $(MAKE) -C lib/xbadpcm
445         $(MAKE) -C lib/vgmstream
446         $(MAKE) -C lib/timidity
447         $(MAKE) -C lib/nosefart 
448 ifneq ($(findstring arm-osx,@ARCH@), arm-osx)
449         $(MAKE) -C lib/libsidplay2 
450 endif
451 ifeq (@USE_ASAP_CODEC@,1)
452   ifneq ($(findstring osx,@ARCH@), osx)
453         $(MAKE) -C lib/asap asap-xbmc
454   endif
455 endif
456         $(MAKE) -C lib/stsound/StSoundLibrary   
457 ifeq ($(or $(findstring powerpc,@ARCH@),$(findstring x86_64-linux,@ARCH@),$(findstring arm, @ARCH@)),)
458         $(MAKE) -C lib/snesapu/SNES/SNESAPU
459 endif
460 imagelib: dllloader
461         $(MAKE) -C lib/cximage-6.0
462
463 codecs: papcodecs dvdpcodecs
464 libs: cmyth libhdhomerun libid3tag imagelib libexif  $(PYTHON_TARGET) system/libcpluff-@ARCH@.so
465 externals: codecs libs $(PYTHON_TARGET) visualizations screensavers
466
467 xcode_depends: \
468         codecs libs $(PYTHON_TARGET) visualizations screensavers eventclients skins \
469         lib/libsquish/libsquish.a \
470         lib/libapetag/.libs/libapetag.a \
471         lib/libXBMS/libxbms.a \
472         lib/libRTV/librtv.a \
473         lib/libXDAAP/libxdaap.a \
474         lib/jsoncpp/src/lib_json/libjsoncpp.a
475
476 # platform independend objects
477 OBJSXBMC=       \
478         xbmc/xbmc.a \
479         xbmc/addons/addons.a \
480         xbmc/cores/playercorefactory/playercorefactory.a \
481         xbmc/cores/dvdplayer/DVDPlayer.a \
482         xbmc/cores/paplayer/paplayer.a \
483         xbmc/cores/VideoRenderers/VideoRenderer.a \
484         xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a \
485         lib/tinyXML/tinyxml.a \
486         xbmc/cores/cores.a \
487         xbmc/interfaces/python/python.a \
488         xbmc/cores/DllLoader/dllloader.a \
489         xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a \
490         xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a \
491         xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a \
492         xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a \
493         xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a \
494         xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a \
495         xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a \
496         xbmc/cores/AudioRenderers/audiorenderers.a \
497         xbmc/cores/ExternalPlayer/ExternalPlayer.a \
498         xbmc/filesystem/filesystem.a \
499         xbmc/filesystem/MusicDatabaseDirectory/musicdatabasedirectory.a \
500         xbmc/filesystem/VideoDatabaseDirectory/videodatabasedirectory.a \
501         xbmc/input/input.a \
502         xbmc/dialogs/dialogs.a \
503         xbmc/music/karaoke/karaoke.a \
504         xbmc/music/music.a \
505         xbmc/music/dialogs/musicdialogs.a \
506         xbmc/music/infoscanner/musicscanner.a \
507         xbmc/music/tags/musictags.a \
508         xbmc/music/windows/musicwindows.a \
509         xbmc/video/dialogs/videodialogs.a \
510         xbmc/pictures/pictures.a \
511         xbmc/playlists/playlists.a \
512         xbmc/programs/programs.a \
513         xbmc/powermanagement/powermanagement.a \
514         xbmc/storage/storage.a \
515         xbmc/threads/threads.a \
516         xbmc/windows/windows.a \
517         xbmc/interfaces/python/xbmcmodule/xbmcmodule.a \
518         xbmc/network/libscrobbler/scrobbler.a \
519         lib/libRTV/librtv.a \
520         lib/libUPnP/libupnp.a \
521         lib/libXDAAP/libxdaap.a \
522         xbmc/interfaces/interfaces.a \
523         xbmc/cdrip/cdrip.a \
524         xbmc/interfaces/json-rpc/json-rpc.a \
525         lib/jsoncpp/src/lib_json/libjsoncpp.a \
526         xbmc/interfaces/http-api/http-api.a \
527         xbmc/dbwrappers/dbwrappers.a \
528         lib/libsquish/libsquish.a \
529         lib/libapetag/.libs/libapetag.a \
530         lib/xbmc-dll-symbols/dll-symbols.a \
531         xbmc/rendering/rendering.a \
532         xbmc/windowing/windowing.a \
533
534 ifeq (@USE_OPENGL@,1)
535 OBJSXBMC+= \
536         xbmc/rendering/gl/rendering_gl.a
537 endif
538 ifeq (@USE_OPENGLES@,1)
539 OBJSXBMC+= \
540         xbmc/rendering/gles/rendering_gles.a \
541         xbmc/windowing/egl/windowing_egl.a
542 endif
543
544 ifeq (@HAVE_XBMC_NONFREE@,1)
545 OBJSXBMC+= \
546         lib/libXBMS/libxbms.a \
547         lib/UnrarXLib/UnrarXLib.a
548 endif
549
550 OBJSXBMC+= \
551         lib/libhts/libhts.a
552
553 # platform dependend objects
554 ifeq ($(findstring osx,@ARCH@), osx)
555 OBJSXBMC += \
556         xbmc/osx/osx.a \
557         xbmc/windowing/osx/windowing_osx.a \
558         xbmc/threads/darwin/threads_darwin.a \
559         xbmc/powermanagement/osx/powermanagement.a \
560         xbmc/network/osx/network.a \
561         xbmc/storage/osx/storage.a \
562         xbmc/network/linux/network_linux.a \
563
564 else
565 OBJSXBMC += \
566         xbmc/threads/posix/threads_posix.a \
567         xbmc/input/linux/input_linux.a \
568         xbmc/network/linux/network_linux.a \
569         xbmc/powermanagement/linux/powermanagement_linux.a \
570         xbmc/storage/linux/storage_linux.a
571 ifeq (@USE_OPENGL@,1)
572 OBJSXBMC+= \
573         xbmc/windowing/X11/windowing_X11.a
574 endif
575 endif
576
577 DYNOBJSXBMC= \
578         xbmc/linux/linux.a \
579         xbmc/network/network.a \
580         xbmc/video/windows/videowindows.a \
581         xbmc/utils/utils.a \
582         xbmc/cores/DllLoader/exports/util/exports_utils.a \
583         xbmc/cores/DllLoader/exports/exports.a \
584         xbmc/settings/settings.a \
585         xbmc/video/video.a \
586         xbmc/guilib/guilib.a # must be dynamic to avoid linker errors
587
588 ifeq ($(findstring arm,@ARCH@), arm)
589 # Force external python2.6 for now!
590 LIBS +=-lpython2.6
591 endif
592
593 ifeq (@USE_EXTERNAL_PYTHON@,1)
594 LIBS += @PYTHON_LDFLAGS@
595 endif
596
597 xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC)
598 ifeq ($(findstring osx,@ARCH@), osx)
599         $(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
600 else
601         $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--no-whole-archive $(LIBS) -rdynamic
602 endif
603
604 xbmc-xrandr: xbmc-xrandr.c
605 ifeq ($(findstring osx,@ARCH@), osx)
606         # xbmc-xrandr.c gets picked up by the default make rules
607         #  so only exclude it for osx builds
608         @echo "excluding xbmc-xrandr"
609 else
610         $(CC) $(CFLAGS) $(LDFLAGS) -o xbmc-xrandr xbmc-xrandr.c -lXrandr -lX11 
611 endif
612
613 tools/XBMCTex/XBMCTex:
614 ifeq ($(findstring osx,@ARCH@), osx)
615         # hack this for now
616         $(MAKE) -C tools/XBMCTex -f Makefile.osx
617 else
618         $(MAKE) -C tools/XBMCTex/
619 endif
620
621 tools/TexturePacker/TexturePacker: xbmc/guilib/guilib.a lib/libsquish/libsquish.a
622         $(MAKE) -C tools/TexturePacker/
623
624
625 install-bin: xbmc.bin # developement convenience target
626         sudo install -d $(DESTDIR)$(libdir)
627         sudo install xbmc.bin $(DESTDIR)$(libdir)/xbmc
628
629 ifeq ($(findstring osx,@ARCH@), osx)
630         # TODO: add osx install
631 else
632 install: install-binaries install-arch install-datas
633
634 install-binaries: install-scripts
635         @echo "Copying XBMC binary to $(DESTDIR)$(libdir)/xbmc/xbmc.bin"
636         @install -d $(DESTDIR)$(libdir)/xbmc
637         @install xbmc.bin $(DESTDIR)$(libdir)/xbmc/xbmc.bin
638         @install xbmc-xrandr $(DESTDIR)$(libdir)/xbmc/xbmc-xrandr
639         @echo "You can run XBMC with the command 'xbmc'"
640 endif
641
642 install-arch:
643         @# Arch dependent files
644 ifeq ($(findstring freebsd,@ARCH@), freebsd)
645         @find -E system addons -type f -not -iregex ".*svn.*|.*script\.module\..*" \
646                 -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*python.*\.zip" \
647                 -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \
648                 -and \
649                 -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \
650                 -exec printf " -- %-75.75s\r" "{}" \;
651 else
652         @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"
653 endif
654         @cp -r addons/script.module.pil $(DESTDIR)$(libdir)/xbmc/addons/
655         @cp -r addons/script.module.pysqlite $(DESTDIR)$(libdir)/xbmc/addons/
656
657 install-scripts:
658         @install -d $(DESTDIR)$(bindir)
659         @install tools/Linux/xbmc.sh $(DESTDIR)$(bindir)/xbmc
660         @install tools/Linux/xbmc-standalone.sh $(DESTDIR)$(bindir)/xbmc-standalone
661         @install -d $(DESTDIR)$(datarootdir)/xbmc
662         @install -m 0644 tools/Linux/FEH.py $(DESTDIR)$(datarootdir)/xbmc/FEH.py
663         @install -d $(DESTDIR)$(datarootdir)/xsessions
664         @install -m 0644 tools/Linux/xbmc-xsession.desktop $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop
665
666 install-datas: install-scripts
667         @echo "Copying support and legal files..."
668         @install -d $(DESTDIR)$(docdir)
669         @for FILE in `ls README.linux LICENSE.GPL *.txt`; do \
670                 install -m 0644 "$$FILE" "$(DESTDIR)$(docdir)/$$FILE"; done
671         @echo "Done!"
672         @echo "Copying system files to $(DESTDIR)$(datarootdir)/xbmc"
673         @install -d $(DESTDIR)$(datarootdir)/xbmc
674         @# Arch independent files
675 ifeq ($(findstring bsd,@ARCH@), bsd)
676         @find -E addons language media sounds userdata system -type f \
677                 -not -iregex ".*script\.module\..*|.*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|.*\.pyd|.*python.*\.zip" \
678                 -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \
679                 -and \
680                 -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \
681                 -exec printf " -- %-75.75s\r" "{}" \;
682 else
683         @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"
684 endif   
685         @# Icons and links
686         @install -d $(DESTDIR)$(datarootdir)/applications
687         @install tools/Linux/xbmc.desktop $(DESTDIR)$(datarootdir)/applications/xbmc.desktop
688         @install -d $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps
689         @install -m 0644 tools/Linux/xbmc-48x48.png $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/xbmc.png
690         @install -d $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps
691         @install -m 0644 media/icon.png $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps/xbmc.png
692         @test -z "$(DESTDIR)" && gtk-update-icon-cache -f -q -t $(datadir)/icons/hicolor || :
693
694 uninstall:
695         @echo "Removing XBMC..."
696         @rm -rf $(DESTDIR)$(libdir)/xbmc
697         @rm -rf $(DESTDIR)$(datarootdir)/xbmc $(DESTDIR)$(bindir)/xbmc
698         @rm -rf $(DESTDIR)$(bindir)/xbmc-standalone
699         @rm -rf $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop
700         @echo "Done!"
701
702 reallyclean:
703         @echo " This will delete ALL unversioned files in"; \
704          echo " your XBMC source tree. If you aren't sure"; \
705          echo " you want to do this, answer anything but"; \
706          echo " 'Y' (case sensitive) to the following."; \
707          echo " DISCLAIMER: Team XBMC is NOT responsible"; \
708          echo " for ANYTHING lost if you execute this command!"; \
709          echo -n " Damnserious? (Y/*) "; \
710          read -n1 PROMPT; \
711          if [[ "$$PROMPT" = "Y" ]]; then \
712                 SVNV=$$(svnversion -n | cut -d':' -f1); _IFS=$$IFS; IFS=$$'\t\n'; \
713                 for i in `svn st --no-ignore | grep ^[I\?] | cut -d' ' -f7-`; do \
714                         if [[ $${i:(-4)} != "diff" && $${i:(-5)} != "patch" ]]; then \
715                                 echo "  Deleting $$i"; \
716                                 rm -rf "$$i"; \
717                         fi; \
718                 done; \
719                 IFS=$$_IFS; \
720                 echo " Recovering any missing files."; \
721                 svn up -r $${SVNV/M/} | sed -e "s/.*'\(.*\)'/  \1/p" -e d; \
722                 echo " Done."; \
723                 echo " The following files may need reverted (svn revert <file>)"; \
724                 svn st | sed -e "s/^M */  /p" -e d; \
725          else \
726                 echo; \
727          fi
728
729 clean-xbmc.bin:
730         rm -f xbmc.bin
731         for d in $(BIN_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
732 clean-eventclients:
733         for d in $(EC_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
734 clean-xbmctex:
735         for d in $(XBMCTEX_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
736 clean-dvdpcodecs: 
737         for d in $(DVDPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
738 clean-papcodecs:
739         for d in $(PAPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
740 clean-libs: 
741         for d in $(LIB_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
742 clean-screensavers: 
743         for d in $(SS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
744 clean-visualisations:
745         for d in $(VIS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
746
747 clean-codecs: clean-dvdpcodecs clean-papcodecs
748
749 clean-externals: clean-codecs clean-eventclients clean-xbmctex clean-libs \
750         clean-screensavers clean-visualisations
751
752