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