FIX: don't crash on buggy keymap xml
[vuplus_xbmc] / Makefile.in
1 include bootstrap.mk
2
3 AUTOGENERATED_MAKEFILES=@OUTPUT_FILES@
4
5 EC_DIRS= \
6         tools/EventClients
7
8 XBMCTEX_DIRS= \
9         tools/TexturePacker
10
11 DVDPCODECS_DIRS= \
12         lib \
13         lib/libdvd
14
15 DVDPLAYER_ARCHIVES=xbmc/cores/dvdplayer/DVDPlayer.a \
16                    xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a \
17                    xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a \
18                    xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a \
19                    xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a \
20                    xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a \
21                    xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a \
22                    xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a
23
24 DIRECTORY_ARCHIVES=$(DVDPLAYER_ARCHIVES) \
25                    lib/SlingboxLib/SlingboxLib.a \
26                    lib/libRTV/librtv.a \
27                    lib/libXDAAP/libxdaap.a \
28                    lib/libhts/libhts.a \
29                    lib/libsquish/libsquish.a \
30                    lib/xbmc-dll-symbols/dll-symbols.a \
31                    xbmc/addons/addons.a \
32                    xbmc/cdrip/cdrip.a \
33                    xbmc/cores/AudioEngine/audioengine.a \
34                    xbmc/cores/DllLoader/dllloader.a \
35                    xbmc/cores/DllLoader/exports/exports.a \
36                    xbmc/cores/DllLoader/exports/util/exports_utils.a \
37                    xbmc/cores/ExternalPlayer/ExternalPlayer.a \
38                    xbmc/cores/VideoRenderers/VideoRenderer.a \
39                    xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a \
40                    xbmc/cores/cores.a \
41                    xbmc/cores/paplayer/paplayer.a \
42                    xbmc/cores/playercorefactory/playercorefactory.a \
43                    xbmc/dbwrappers/dbwrappers.a \
44                    xbmc/dialogs/dialogs.a \
45                    xbmc/epg/epg.a \
46                    xbmc/filesystem/MusicDatabaseDirectory/musicdatabasedirectory.a \
47                    xbmc/filesystem/VideoDatabaseDirectory/videodatabasedirectory.a \
48                    xbmc/filesystem/filesystem.a \
49                    xbmc/guilib/guilib.a \
50                    xbmc/input/input.a \
51                    xbmc/interfaces/info/info.a \
52                    xbmc/interfaces/interfaces.a \
53                    xbmc/interfaces/json-rpc/json-rpc.a \
54                    xbmc/linux/linux.a \
55                    xbmc/music/dialogs/musicdialogs.a \
56                    xbmc/music/infoscanner/musicscanner.a \
57                    xbmc/music/karaoke/karaoke.a \
58                    xbmc/music/music.a \
59                    xbmc/music/tags/musictags.a \
60                    xbmc/music/windows/musicwindows.a \
61                    xbmc/network/libscrobbler/scrobbler.a \
62                    xbmc/network/websocket/websocket.a \
63                    xbmc/network/network.a \
64                    xbmc/peripherals/bus/peripheral-bus.a \
65                    xbmc/peripherals/devices/peripheral-devices.a \
66                    xbmc/peripherals/dialogs/peripheral-dialogs.a \
67                    xbmc/peripherals/peripherals.a \
68                    xbmc/pictures/pictures.a \
69                    xbmc/playlists/playlists.a \
70                    xbmc/powermanagement/powermanagement.a \
71                    xbmc/programs/programs.a \
72                    xbmc/pvr/addons/pvraddons.a \
73                    xbmc/pvr/channels/pvrchannels.a \
74                    xbmc/pvr/dialogs/pvrdialogs.a \
75                    xbmc/pvr/pvr.a \
76                    xbmc/pvr/recordings/pvrrecordings.a \
77                    xbmc/pvr/timers/pvrtimers.a \
78                    xbmc/pvr/windows/pvrwindows.a \
79                    xbmc/rendering/rendering.a \
80                    xbmc/settings/settings.a \
81                    xbmc/storage/storage.a \
82                    xbmc/utils/utils.a \
83                    xbmc/video/dialogs/videodialogs.a \
84                    xbmc/video/video.a \
85                    xbmc/video/windows/videowindows.a \
86                    xbmc/view/view.a \
87                    xbmc/windowing/windowing.a \
88                    xbmc/windows/windows.a \
89                    xbmc/xbmc.a \
90
91
92 NWAOBJSXBMC=    xbmc/threads/threads.a \
93                 xbmc/commons/commons.a
94
95
96 ifeq (@USE_WEB_SERVER@,1)
97 DIRECTORY_ARCHIVES += xbmc/network/httprequesthandler/httprequesthandlers.a
98 endif
99
100 DIRECTORY_ARCHIVES += xbmc/interfaces/legacy/legacy.a
101 DIRECTORY_ARCHIVES += xbmc/interfaces/python/python_binding.a
102
103 ifeq (@USE_OPENGL@,1)
104 DIRECTORY_ARCHIVES += xbmc/rendering/gl/rendering_gl.a
105 endif
106
107 ifeq (@USE_OPENGLES@,1)
108 DIRECTORY_ARCHIVES += xbmc/rendering/gles/rendering_gles.a
109 DIRECTORY_ARCHIVES += xbmc/windowing/egl/windowing_egl.a
110 DIRECTORY_ARCHIVES += xbmc/visualizations/EGLHelpers/eglhelpers.a
111 endif
112
113 ifeq (@USE_UPNP@,1)
114 DIRECTORY_ARCHIVES += lib/libUPnP/libupnp.a \
115                       xbmc/network/upnp/upnp.a
116 endif
117
118 ifeq ($(findstring osx,@ARCH@),osx)
119 DIRECTORY_ARCHIVES += xbmc/osx/osx.a
120 DIRECTORY_ARCHIVES += xbmc/network/osx/network.a
121 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
122 DIRECTORY_ARCHIVES += xbmc/powermanagement/osx/powermanagement.a
123 DIRECTORY_ARCHIVES += xbmc/storage/osx/storage.a
124 DIRECTORY_ARCHIVES += xbmc/windowing/osx/windowing_osx.a
125 else
126 ifeq (@USE_ANDROID@,1)
127 DIRECTORY_ARCHIVES += xbmc/input/linux/input_linux.a
128 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
129 DIRECTORY_ARCHIVES += xbmc/powermanagement/android/powermanagement_android.a
130 DIRECTORY_ARCHIVES += xbmc/storage/android/storage_android.a
131 DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a
132 else
133 DIRECTORY_ARCHIVES += xbmc/input/linux/input_linux.a
134 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
135 DIRECTORY_ARCHIVES += xbmc/powermanagement/linux/powermanagement_linux.a
136 DIRECTORY_ARCHIVES += xbmc/storage/linux/storage_linux.a
137 DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a
138 endif
139 endif
140
141 ifeq ($(findstring freebsd,@ARCH@),freebsd)
142 DIRECTORY_ARCHIVES += xbmc/freebsd/freebsd.a
143 endif
144
145 ifeq (@HAVE_XBMC_NONFREE@,1)
146 DIRECTORY_ARCHIVES += lib/UnrarXLib/UnrarXLib.a
147 endif
148
149 BIN_DIRS = $(dir $(DIRECTORY_ARCHIVES)) $(dir $(NWAOBJSXBMC))
150
151 ifeq (@USE_ANDROID@,1)
152 DIRECTORY_ARCHIVES += xbmc/android/loader/AndroidDyload.a
153 DIRECTORY_ARCHIVES += xbmc/windowing/android/windowing_android.a
154 DIRECTORY_ARCHIVES += xbmc/android/activity/activity.a
155 DIRECTORY_ARCHIVES += xbmc/android/bionic_supplement/bionic_supplement.a
156 endif
157
158 ifeq (@USE_AMLPLAYER@,1)
159 DIRECTORY_ARCHIVES += xbmc/cores/amlplayer/amlplayer.a
160 endif
161
162 ifeq (@USE_OMXPLAYER@,1)
163 DIRECTORY_ARCHIVES += xbmc/cores/omxplayer/omxplayer.a
164 endif
165
166 PAPCODECS_DIRS= \
167         lib/xbadpcm \
168         lib/nosefart \
169         lib/timidity \
170         lib/libsidplay2 \
171         lib/stsound/StSoundLibrary \
172         lib/snesapu/SNES/SNESAPU \
173         lib/vgmstream
174
175 ifeq (@USE_ASAP_CODEC@,1)
176 PAPCODECS_DIRS+= \
177         lib/asap
178 endif
179
180 LIB_DIRS=\
181         lib/cximage-6.0 \
182         lib/libexif \
183         lib/libhdhomerun \
184         lib/cpluff \
185         lib/xbmc-dll-symbols
186
187 ifeq (@USE_MYSQL@,1)
188 LIB_DIRS += lib/cmyth
189 CMYTH=cmyth
190 endif
191
192 SS_DIRS=
193 ifneq (@DISABLE_RSXS@,1)
194   SS_DIRS+= xbmc/screensavers/rsxs-0.9/xbmc
195 endif
196
197 VIS_DIRS=xbmc/visualizations/OpenGLSpectrum \
198          xbmc/visualizations/WaveForm
199
200 ifneq (@DISABLE_FISHBMC@,1)
201   VIS_DIRS+= xbmc/visualizations/fishBMC
202 endif
203
204 ifneq (@DISABLE_PROJECTM@,1)
205   VIS_DIRS+= xbmc/visualizations/XBMCProjectM
206 endif
207
208 ifneq (@DISABLE_GOOM@,1)
209   VIS_DIRS+=xbmc/visualizations/Goom
210 endif
211
212 LIBADDON_DIRS=\
213         lib/addons/library.xbmc.addon \
214         lib/addons/library.xbmc.pvr \
215         lib/addons/library.xbmc.gui \
216
217 CONFLUENCE_MEDIA=addons/skin.confluence/media
218 SKIN_DIRS=$(CONFLUENCE_MEDIA)
219
220 ifeq (@USE_SKIN_TOUCHED@,1)
221 TOUCHED_MEDIA=addons/skin.touched/media
222 SKIN_DIRS+=$(TOUCHED_MEDIA)
223 endif
224
225 DIRS= $(BIN_DIRS) $(EC_DIRS) $(XBMCTEX_DIRS) $(DVDPCODECS_DIRS) $(PAPCODECS_DIRS) \
226         $(LIB_DIRS) $(SS_DIRS) $(VIS_DIRS) $(LIBADDON_DIRS) $(SKIN_DIRS)
227
228 LIBS=@LIBS@
229 CFLAGS=@CFLAGS@
230 CXXFLAGS=@CXXFLAGS@
231 LDFLAGS=@LDFLAGS@
232 INCLUDES=$(sort @INCLUDES@)
233
234 CLEAN_FILES=xbmc.bin xbmc-xrandr libxbmc.so
235
236 DISTCLEAN_FILES=config.h config.log config.status tools/Linux/xbmc.sh \
237         tools/Linux/xbmc-standalone.sh autom4te.cache config.h.in~ \
238         system/libcpluff-@ARCH@.so
239
240 ifeq (@USE_LIBXBMC@,1)
241 FINAL_TARGETS+=libxbmc.so
242 ifeq (@USE_ANDROID@,1)
243 FINAL_TARGETS+=skins
244 endif
245 else
246 FINAL_TARGETS=xbmc.bin skins xbmc-xrandr
247 endif
248 FINAL_TARGETS+=Makefile externals
249
250 GTEST_DIR = lib/gtest
251 GTEST_INCLUDES = -I$(GTEST_DIR)/include
252 GTEST_LIBS = $(GTEST_DIR)/lib/.libs/libgtest.a
253
254 CHECK_DIRS = xbmc/filesystem/test \
255              xbmc/utils/test \
256              xbmc/threads/test \
257              xbmc/interfaces/python/test \
258              xbmc/test
259 CHECK_LIBS = xbmc/filesystem/test/filesystemTest.a \
260              xbmc/utils/test/utilsTest.a \
261              xbmc/threads/test/threadTest.a \
262              xbmc/interfaces/python/test/pythonSwigTest.a \
263              xbmc/test/xbmc-test.a
264 CHECK_PROGRAMS = xbmc-test
265
266 CLEAN_FILES += $(CHECK_PROGRAMS)
267
268 all : $(FINAL_TARGETS)
269         @echo '-----------------------'
270         @echo 'XBMC built successfully'
271         @echo '-----------------------'
272
273 include Makefile.include
274
275 .PHONY : dllloader exports visualizations screensavers eventclients papcodecs \
276         dvdpcodecs imagelib codecs externals force skins libaddon check \
277         testframework testsuite
278
279 # hack targets to keep build system up to date
280 Makefile : config.status $(addsuffix .in, $(AUTOGENERATED_MAKEFILES))
281         @echo "Regenerating Makefiles..."
282         @./config.status &> /dev/null
283         @echo "done"
284
285 config.status: configure
286
287 # skin textures
288 ifeq (@USE_TEXTUREPACKER@,1)
289 skins: tools/TexturePacker/TexturePacker force
290          $(MAKE) -C $(CONFLUENCE_MEDIA)
291 ifeq (@USE_SKIN_TOUCHED@,1)
292          $(MAKE) -C $(TOUCHED_MEDIA)
293 endif
294 else
295 skins:
296 endif
297
298 # Setup some dependencies for subdir makes
299 xbmc/cores/paplayer/paplayer.a: papcodecs
300 $(DVDPLAYER_ARCHIVES)         : dvdpcodecs
301
302 $(NWAOBJSXBMC): force
303         @$(MAKE) $(if $(V),,-s) -C $(@D)
304
305 $(DIRECTORY_ARCHIVES): force
306         @$(MAKE) $(if $(V),,-s) -C $(@D)
307
308 lib/cpluff/libcpluff/.libs/libcpluff.a: force
309         $(MAKE) -C lib/cpluff/libcpluff
310 system/libcpluff-@ARCH@.so: lib/cpluff/libcpluff/.libs/libcpluff.a exports
311 ifeq ($(findstring osx,@ARCH@), osx)
312   ifeq (@ARCH@, arm-osx)
313         $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -read_only_relocs suppress -o $@ $<
314   else
315         $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -lexpat $(BUNDLE1_O) -o $@ $<
316   endif
317 else
318         $(CXX) $(LDFLAGS) -shared -o $@ -Wl,--whole-archive $< \
319                 -Wl,--no-whole-archive  \
320                 `cat xbmc/cores/DllLoader/exports/wrapper.def` xbmc/cores/DllLoader/exports/wrapper.o -lexpat
321 endif
322
323 exports: xbmc/cores/DllLoader/exports/exports.a xbmc/cores/DllLoader/exports/util/exports_utils.a
324         $(MAKE) -C xbmc/cores/DllLoader/exports wrapper.def
325 dllloader: exports xbmc/cores/DllLoader/dllloader.a
326
327 ifeq (@USE_OPENGLES@,1)
328 EGLHELPERS=xbmc/visualizations/EGLHelpers/eglhelpers.a
329 endif
330
331 $(VIS_DIRS): force exports $(EGLHELPERS)
332         $(MAKE) -C $@
333
334 $(SS_DIRS): force exports
335         $(MAKE) -C $@
336
337 visualizations: $(VIS_DIRS)
338
339 screensavers: $(SS_DIRS)
340
341 libaddon: exports
342         $(MAKE) -C lib/addons/library.xbmc.addon
343         $(MAKE) -C lib/addons/library.xbmc.gui
344         $(MAKE) -C lib/addons/library.xbmc.pvr
345 dvdpcodecs: dllloader
346         $(MAKE) -C lib
347         $(MAKE) -C lib/libdvd
348 eventclients:
349 ifeq ($(findstring osx,@ARCH@), osx)
350 ifneq ($(findstring arm,@ARCH@), arm)
351         $(MAKE) -C tools/EventClients/Clients/OSXRemote
352 endif
353 else
354         $(MAKE) -C tools/EventClients
355 endif
356 libexif: dllloader
357         $(MAKE) -C lib/libexif
358 cmyth: dllloader
359         $(MAKE) -C lib/cmyth
360 libhdhomerun: dllloader
361         $(MAKE) -C lib/libhdhomerun
362 papcodecs: dllloader dvdpcodecs
363         test -d system/players/paplayer || mkdir system/players/paplayer
364         $(MAKE) -C lib/xbadpcm
365         $(MAKE) -C lib/vgmstream
366         $(MAKE) -C lib/timidity
367         $(MAKE) -C lib/nosefart
368 ifneq ($(findstring arm-osx,@ARCH@), arm-osx)
369         $(MAKE) -C lib/libsidplay2
370 endif
371 ifeq (@USE_ASAP_CODEC@,1)
372   ifneq ($(findstring osx,@ARCH@), osx)
373         $(MAKE) -C lib/asap asap-xbmc
374   endif
375 endif
376         $(MAKE) -C lib/stsound/StSoundLibrary
377 ifeq ($(or $(findstring powerpc,@ARCH@),$(findstring x86_64-linux,@ARCH@),$(findstring arm, @ARCH@),$(findstring freebsd,@ARCH@)),)
378         $(MAKE) -C lib/snesapu/SNES/SNESAPU
379 endif
380 imagelib: dllloader
381         $(MAKE) -C lib/cximage-6.0
382
383 pvraddons: exports
384 ifeq (@USE_PVR_ADDONS@,1)
385         $(MAKE) -C pvr-addons
386 endif
387
388 codecs: papcodecs dvdpcodecs
389
390 libs: libhdhomerun imagelib libexif system/libcpluff-@ARCH@.so $(CMYTH)
391
392 externals: codecs libs visualizations screensavers libaddon pvraddons
393
394 xcode_depends: \
395         codecs libs visualizations screensavers eventclients skins libaddon \
396         lib/libsquish/libsquish.a \
397         lib/libRTV/librtv.a \
398         lib/libXDAAP/libxdaap.a \
399         lib/SlingboxLib/SlingboxLib.a
400
401 OBJSXBMC =$(DIRECTORY_ARCHIVES)
402
403 DYNOBJSXBMC= \
404         xbmc/linux/linux.a \
405         xbmc/network/network.a \
406         xbmc/video/windows/videowindows.a \
407         xbmc/utils/utils.a \
408         xbmc/cores/DllLoader/exports/util/exports_utils.a \
409         xbmc/cores/DllLoader/exports/exports.a \
410         xbmc/settings/settings.a \
411         xbmc/video/video.a \
412         xbmc/pvr/addons/pvraddons.a \
413         xbmc/pvr/windows/pvrwindows.a \
414         xbmc/guilib/guilib.a # must be dynamic to avoid linker errors
415
416 ifeq ($(findstring freebsd,@ARCH@),freebsd)
417 DYNOBJSXBMC+= xbmc/freebsd/freebsd.a
418 endif
419
420 OBJSXBMC:=$(filter-out $(DYNOBJSXBMC), $(OBJSXBMC))
421
422 libxbmc.so: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC)
423 ifeq ($(findstring osx,@ARCH@), osx)
424         $(SILENT_LD) $(CXX) $(LDFLAGS) -bundle -o $@ -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS)
425 else
426         $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--no-whole-archive -Wl,--no-undefined $(NWAOBJSXBMC) $(LIBS)
427 endif
428
429 xbmc.bin: xbmc/main/main.a $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC)
430
431 ifeq ($(findstring osx,@ARCH@), osx)
432         $(SILENT_LD) $(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) xbmc/main/main.a $(LIBS) -rdynamic
433 else
434         $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) xbmc/main/main.a -Wl,--no-whole-archive $(NWAOBJSXBMC) $(LIBS) -rdynamic
435 endif
436
437 xbmc/main/main.a: force
438         $(MAKE) -C xbmc/main
439
440 xbmc-xrandr: xbmc-xrandr.c
441 ifneq (1,@USE_XRANDR@)
442         # xbmc-xrandr.c gets picked up by the default make rules
443         @echo "excluding xbmc-xrandr"
444 else
445         $(SILENT_LD) $(CC) $(CFLAGS) $(LDFLAGS) -o xbmc-xrandr xbmc-xrandr.c -lXrandr -lX11 -lm
446 endif
447
448 tools/TexturePacker/TexturePacker: lib/libsquish/libsquish.a xbmc/guilib/XBTF.h
449         $(MAKE) -C tools/TexturePacker/
450
451
452 install-bin: xbmc.bin # developement convenience target
453         sudo install -d $(DESTDIR)$(libdir)
454         sudo install xbmc.bin $(DESTDIR)$(libdir)/xbmc
455
456 ifeq ($(findstring osx,@ARCH@), osx)
457         # TODO: add osx install
458 else
459 install: install-binaries install-arch install-datas
460
461 apk: install
462         make -C tools/android/packaging
463
464 install-binaries: install-scripts
465         @echo "Copying XBMC binary to $(DESTDIR)$(libdir)/xbmc/"
466         @install -d $(DESTDIR)$(libdir)/xbmc
467 ifeq (1,@USE_XRANDR@)
468         @install xbmc-xrandr $(DESTDIR)$(libdir)/xbmc/xbmc-xrandr
469 endif
470 ifeq (@USE_LIBXBMC@,1)
471         @install libxbmc.so $(DESTDIR)$(libdir)/xbmc/libxbmc.so
472 else
473         @install xbmc.bin $(DESTDIR)$(libdir)/xbmc/xbmc.bin
474         @echo "You can run XBMC with the command 'xbmc'"
475 endif
476 endif
477
478 install-arch:
479         @# Arch dependent files
480 ifeq (@USE_PVR_ADDONS@,1)
481         $(MAKE) -C pvr-addons install
482 endif
483 ifeq ($(findstring freebsd,@ARCH@), freebsd)
484         @find -E system addons -type f -not -iregex ".*svn.*" \
485                 -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \
486                 -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \
487                 -and \
488                 -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \
489                 -exec printf " -- %-75.75s\r" "{}" \;
490 else
491 ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
492         @find -E system addons -type f -not -iregex ".*svn.*" \
493                 -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \
494                 -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \
495                 -and \
496                 -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \
497                 -exec printf " -- %-75.75s\r" "{}" \;
498 else
499         @find system addons -regextype posix-extended -type f -not -iregex ".*svn.*" -iregex ".*\.so|.*\.vis|.*\.xbs|.*\.pvr" -exec install -D "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; -printf " -- %-75.75f\r"
500 endif
501 endif
502
503 install-scripts:
504         @install -d $(DESTDIR)$(bindir)
505         @install tools/Linux/xbmc.sh $(DESTDIR)$(bindir)/xbmc
506         @install tools/Linux/xbmc-standalone.sh $(DESTDIR)$(bindir)/xbmc-standalone
507         @install -d $(DESTDIR)$(datarootdir)/xbmc
508         @install -m 0644 tools/Linux/FEH.py $(DESTDIR)$(datarootdir)/xbmc/FEH.py
509         @install -d $(DESTDIR)$(datarootdir)/xsessions
510         @install -m 0644 tools/Linux/xbmc-xsession.desktop $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop
511
512 install-datas: install-scripts
513         @echo "Copying support and legal files..."
514         @install -d $(DESTDIR)$(docdir)
515         @for FILE in `ls LICENSE.GPL *.txt`; do \
516                 install -m 0644 "$$FILE" "$(DESTDIR)$(docdir)/$$FILE"; done
517         @install -m 0644 "docs/README.linux" "$(DESTDIR)$(docdir)/README.linux"
518         @echo "Done!"
519         @echo "Copying system files to $(DESTDIR)$(datarootdir)/xbmc"
520         @install -d $(DESTDIR)$(datarootdir)/xbmc
521         @# Arch independent files
522 ifeq ($(findstring bsd,@ARCH@), bsd)
523         @find -E addons language media sounds userdata system -type f \
524                 -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll" \
525                 -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \
526                 -and \
527                 -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \
528                 -exec printf " -- %-75.75s\r" "{}" \;
529 else
530 ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
531         @find -E addons language media sounds userdata system -type f \
532                 -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll" \
533                 -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \
534                 -and \
535                 -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \
536                 -exec printf " -- %-75.75s\r" "{}" \;
537 else
538         @find addons language media sounds userdata system -regextype posix-extended -type f -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|.*\.pvr" -exec install -D -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; -printf " -- %-75.75f\r"
539 endif
540 endif
541         @# Icons and links
542         @install -d $(DESTDIR)$(datarootdir)/applications
543         @install tools/Linux/xbmc.desktop $(DESTDIR)$(datarootdir)/applications/xbmc.desktop
544         @install -d $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps
545         @install -m 0644 tools/Linux/xbmc-48x48.png $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/xbmc.png
546         @install -d $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps
547         @install -m 0644 media/icon.png $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps/xbmc.png
548         @test -z "$(DESTDIR)" && gtk-update-icon-cache -f -q -t $(datadir)/icons/hicolor || :
549
550 uninstall:
551         @echo "Removing XBMC..."
552         @rm -rf $(DESTDIR)$(libdir)/xbmc
553         @rm -rf $(DESTDIR)$(datarootdir)/xbmc $(DESTDIR)$(bindir)/xbmc
554         @rm -rf $(DESTDIR)$(bindir)/xbmc-standalone
555         @rm -rf $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop
556         @rm -rf $(libdir)/libXBMC_*
557         @rm -rf $(prefix)/include/xbmc
558         @echo "Done!"
559
560 clean-xbmc.bin:
561         rm -f xbmc.bin
562         for d in $(BIN_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
563 clean-eventclients:
564         for d in $(EC_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
565 clean-xbmctex:
566         for d in $(XBMCTEX_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
567 clean-dvdpcodecs:
568         for d in $(DVDPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
569 clean-papcodecs:
570         for d in $(PAPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
571 clean-libs:
572         for d in $(LIB_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
573 clean-screensavers:
574         for d in $(SS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
575 clean-visualisations:
576         for d in $(VIS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
577 clean-libaddons:
578         for d in $(LIBADDON_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
579 clean-pvraddons:
580 ifeq (@USE_PVR_ADDONS@,1)
581         if test -f pvr-addons/Makefile; then $(MAKE) -C pvr-addons clean; fi;
582 endif
583
584 clean-codecs: clean-dvdpcodecs clean-papcodecs
585
586 clean-externals: clean-codecs clean-eventclients clean-xbmctex clean-libs \
587         clean-screensavers clean-visualisations clean-libaddons clean-pvraddons
588
589 ifeq (1,@GTEST_CONFIGURED@)
590 check: testsuite
591         for check_program in $(CHECK_PROGRAMS); do $(CURDIR)/$$check_program; done
592
593 testsuite: $(CHECK_PROGRAMS)
594
595 testframework: $(GTEST_LIBS)
596
597 $(GTEST_LIBS): $(GTEST_DIR)/Makefile
598
599 $(GTEST_DIR)/Makefile: force
600         $(MAKE) -C $(GTEST_DIR)
601
602 $(CHECK_LIBS): force
603         @$(MAKE) $(if $(V),,-s) -C $(@D)
604
605 xbmc-test: $(CHECK_LIBS) $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(GTEST_LIBS)
606 ifeq ($(findstring osx,@ARCH@), osx)
607         $(SILENT_LD) $(CXX) $(LDFLAGS) $(GTEST_INCLUDES) -o $@ -Wl,-all_load,-ObjC $(CHECK_LIBS) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(GTEST_LIBS) $(LIBS) -rdynamic
608 else
609         $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) $(GTEST_INCLUDES) -o $@ -Wl,--whole-archive $(CHECK_LIBS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--no-whole-archive $(NWAOBJSXBMC) $(GTEST_LIBS) $(LIBS) -rdynamic
610 endif
611 else
612 # Give a message that the framework is not configured, but don't fail.
613 check testsuite testframework:
614         @echo "Google Test Framework not configured, skipping testsuite check."
615 endif