4 space := ${null} ${null}
7 AUTOGENERATED_MAKEFILES=@OUTPUT_FILES@
16 ifeq (@USE_LIBSTAGEFRIGHT@,1)
17 DVDPCODECS_DIRS += xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS
20 DVDPLAYER_ARCHIVES=xbmc/cores/dvdplayer/DVDPlayer.a \
21 xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a \
22 xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a \
23 xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a \
24 xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a \
25 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a \
26 xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a \
27 xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a
29 DIRECTORY_ARCHIVES=$(DVDPLAYER_ARCHIVES) \
30 xbmc/addons/addons.a \
32 xbmc/contrib/kissfft/kissfft.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 \
41 xbmc/cores/paplayer/paplayer.a \
42 xbmc/cores/playercorefactory/playercorefactory.a \
43 xbmc/dbwrappers/dbwrappers.a \
44 xbmc/dialogs/dialogs.a \
46 xbmc/events/events.a \
47 xbmc/filesystem/MusicDatabaseDirectory/musicdatabasedirectory.a \
48 xbmc/filesystem/VideoDatabaseDirectory/videodatabasedirectory.a \
49 xbmc/filesystem/filesystem.a \
50 xbmc/guilib/guilib.a \
52 xbmc/interfaces/builtins/builtins.a \
53 xbmc/interfaces/generic/interfaces-generic.a \
54 xbmc/interfaces/info/info.a \
55 xbmc/interfaces/interfaces.a \
56 xbmc/interfaces/json-rpc/json-rpc.a \
57 xbmc/interfaces/legacy/legacy.a \
58 xbmc/interfaces/python/python_binding.a \
60 xbmc/listproviders/listproviders.a \
61 xbmc/main/posix/MessagePrinter.a \
63 xbmc/messaging/messaging.a \
64 xbmc/messaging/helpers/messagingHelpers.a \
65 xbmc/music/dialogs/musicdialogs.a \
66 xbmc/music/infoscanner/musicscanner.a \
68 xbmc/music/tags/musictags.a \
69 xbmc/music/windows/musicwindows.a \
70 xbmc/network/dacp/dacp.a \
71 xbmc/network/websocket/websocket.a \
72 xbmc/network/network.a \
73 xbmc/peripherals/bus/peripheral-bus.a \
74 xbmc/peripherals/devices/peripheral-devices.a \
75 xbmc/peripherals/dialogs/peripheral-dialogs.a \
76 xbmc/peripherals/peripherals.a \
77 xbmc/pictures/pictures.a \
78 xbmc/playlists/playlists.a \
79 xbmc/powermanagement/powermanagement.a \
80 xbmc/profiles/profiles.a \
81 xbmc/profiles/dialogs/profiles_dialogs.a \
82 xbmc/profiles/windows/profiles_windows.a \
83 xbmc/programs/programs.a \
84 xbmc/pvr/addons/pvraddons.a \
85 xbmc/pvr/channels/pvrchannels.a \
86 xbmc/pvr/dialogs/pvrdialogs.a \
88 xbmc/pvr/recordings/pvrrecordings.a \
89 xbmc/pvr/timers/pvrtimers.a \
90 xbmc/pvr/windows/pvrwindows.a \
91 xbmc/rendering/rendering.a \
92 xbmc/settings/settings.a \
93 xbmc/settings/dialogs/settings_dialogs.a \
94 xbmc/settings/lib/settings_lib.a \
95 xbmc/settings/windows/settings_windows.a \
96 xbmc/storage/storage.a \
98 xbmc/video/dialogs/videodialogs.a \
99 xbmc/video/jobs/video-jobs.a \
100 xbmc/video/videosync/videosync.a \
102 xbmc/video/windows/videowindows.a \
104 xbmc/windowing/windowing.a \
105 xbmc/windows/windows.a \
108 NWAOBJSXBMC= xbmc/threads/threads.a \
109 xbmc/commons/commons.a
112 ifeq (@USE_WEB_SERVER@,1)
113 DIRECTORY_ARCHIVES += xbmc/interfaces/legacy/wsgi/legacy-wsgi.a
114 DIRECTORY_ARCHIVES += xbmc/network/httprequesthandler/httprequesthandlers.a
115 DIRECTORY_ARCHIVES += xbmc/network/httprequesthandler/python/httprequesthandlers-python.a
118 ifeq (@USE_OPENGL@,1)
119 DIRECTORY_ARCHIVES += xbmc/rendering/gl/rendering_gl.a
122 ifeq (@USE_OPENGLES@,1)
123 DIRECTORY_ARCHIVES += xbmc/rendering/gles/rendering_gles.a
124 DIRECTORY_ARCHIVES += xbmc/windowing/egl/windowing_egl.a
128 DIRECTORY_ARCHIVES += lib/libUPnP/libupnp.a \
129 xbmc/network/upnp/upnp.a
132 ifeq (@USE_MDNSEMBEDDED@,1)
133 DIRECTORY_ARCHIVES += xbmc/network/mdns/mdns.a
136 ifeq ($(findstring osx,@ARCH@),osx)
137 DIRECTORY_ARCHIVES += xbmc/osx/osx.a
138 DIRECTORY_ARCHIVES += xbmc/network/osx/network.a
139 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
140 DIRECTORY_ARCHIVES += xbmc/powermanagement/osx/powermanagement.a
141 DIRECTORY_ARCHIVES += xbmc/storage/osx/storage.a
142 DIRECTORY_ARCHIVES += xbmc/windowing/osx/windowing_osx.a
143 INSTALL_FILTER += .*repository\.pvr-android\.xbmc\.org.*
144 INSTALL_FILTER += .*repository\.pvr-ios\.xbmc\.org.*
145 INSTALL_FILTER += .*repository\.pvr-win32\.xbmc\.org.*
147 INSTALL_FILTER += .*repository\.pvr-ios\.xbmc\.org.*
148 INSTALL_FILTER += .*repository\.pvr-win32\.xbmc\.org.*
149 INSTALL_FILTER += .*repository\.pvr-osx.*\.xbmc\.org.*
150 ifeq (@USE_ANDROID@,1)
151 DIRECTORY_ARCHIVES += xbmc/input/linux/input_linux.a
152 DIRECTORY_ARCHIVES += xbmc/input/touch/input_touch.a
153 DIRECTORY_ARCHIVES += xbmc/input/touch/generic/input_touch_generic.a
154 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
155 DIRECTORY_ARCHIVES += xbmc/powermanagement/android/powermanagement_android.a
156 DIRECTORY_ARCHIVES += xbmc/storage/android/storage_android.a
157 DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a
159 DIRECTORY_ARCHIVES += xbmc/input/linux/input_linux.a
160 DIRECTORY_ARCHIVES += xbmc/input/touch/input_touch.a
161 DIRECTORY_ARCHIVES += xbmc/input/touch/generic/input_touch_generic.a
162 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
163 DIRECTORY_ARCHIVES += xbmc/powermanagement/linux/powermanagement_linux.a
164 DIRECTORY_ARCHIVES += xbmc/storage/linux/storage_linux.a
165 DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a
166 INSTALL_FILTER += .*repository\.pvr-android\.xbmc\.org.*
170 ifeq ($(findstring freebsd,@ARCH@),freebsd)
171 DIRECTORY_ARCHIVES += xbmc/freebsd/freebsd.a
174 ifeq (@HAVE_XBMC_NONFREE@,1)
175 DIRECTORY_ARCHIVES += lib/UnrarXLib/UnrarXLib.a
178 ifeq (@USE_ANDROID@,1)
179 DIRECTORY_ARCHIVES += xbmc/android/loader/AndroidDyload.a
180 DIRECTORY_ARCHIVES += xbmc/windowing/android/windowing_android.a
181 DIRECTORY_ARCHIVES += xbmc/android/bionic_supplement/bionic_supplement.a
182 DIRECTORY_ARCHIVES += xbmc/android/jni/jni.a
185 ifeq (@USE_OMXPLAYER@,1)
186 DIRECTORY_ARCHIVES += xbmc/cores/omxplayer/omxplayer.a
196 lib/addons/library.xbmc.addon \
197 lib/addons/library.kodi.adsp \
198 lib/addons/library.kodi.audioengine \
199 lib/addons/library.xbmc.codec \
200 lib/addons/library.xbmc.pvr \
201 lib/addons/library.kodi.guilib \
203 CONFLUENCE_MEDIA=addons/skin.confluence/media
204 SKIN_DIRS=$(CONFLUENCE_MEDIA)
206 ifeq (@USE_TOUCH_SKIN@,1)
207 TOUCH_SKIN_MEDIA=addons/skin.re-touched/media
208 SKIN_DIRS+=$(TOUCH_SKIN_MEDIA)
215 INCLUDES=$(sort @INCLUDES@)
217 CLEAN_FILES=@APP_NAME_LC@.bin @APP_NAME_LC@-xrandr lib@APP_NAME_LC@.so
219 DISTCLEAN_FILES=config.h config.log config.status tools/Linux/@APP_NAME_LC@.sh \
220 tools/Linux/@APP_NAME_LC@-standalone.sh autom4te.cache config.h.in~ \
221 system/libcpluff-@ARCH@.so
223 ifeq (@USE_LIBXBMC@,1)
224 FINAL_TARGETS+=lib@APP_NAME_LC@.so
225 ifeq (@USE_ANDROID@,1)
229 FINAL_TARGETS=@APP_NAME_LC@.bin skins @APP_NAME_LC@-xrandr
231 FINAL_TARGETS+=Makefile externals
233 GTEST_DIR = lib/gtest
234 GTEST_INCLUDES = -I$(GTEST_DIR)/include
235 GTEST_LIBS = $(GTEST_DIR)/lib/.libs/libgtest.a
237 CHECK_DIRS = xbmc/addons/test \
238 xbmc/filesystem/test \
239 xbmc/music/tags/test \
244 xbmc/interfaces/python/test \
245 xbmc/cores/AudioEngine/Sinks/test \
247 CHECK_LIBS = xbmc/addons/test/addonsTest.a \
248 xbmc/filesystem/test/filesystemTest.a \
249 xbmc/music/tags/test/tagsTest.a \
250 xbmc/network/test/networkTest.a \
251 xbmc/utils/test/utilsTest.a \
252 xbmc/video/test/videoTest.a \
253 xbmc/threads/test/threadTest.a \
254 xbmc/interfaces/python/test/pythonSwigTest.a \
255 xbmc/cores/AudioEngine/Sinks/test/AESinkTest.a \
256 xbmc/test/xbmc-test.a
258 ifeq (@USE_WAYLAND@,1)
259 CHECK_LIBS += xbmc/windowing/tests/wayland/test_wayland.a
261 ifeq (@USE_WAYLAND_TEST_EXTENSION@,1)
262 WAYLAND_TEST_MODULE = xbmc/windowing/tests/wayland/xbmc-wayland-test-extension.so
263 $(WAYLAND_TEST_MODULE): force
264 $(MAKE) -C $(@D) $(@F)
265 CHECK_EXTENSIONS = $(WAYLAND_TEST_MODULE)
266 CHECK_LIBADD=@WAYLAND_TEST_LIBS@
273 $(MAKE) -C xbmc/linux/sse4
276 CHECK_PROGRAMS = @APP_NAME_LC@-test
278 CLEAN_FILES += $(CHECK_PROGRAMS) $(CHECK_EXTENSIONS)
280 all : $(FINAL_TARGETS)
281 @echo '-----------------------'
282 @echo '@APP_NAME@ built successfully'
283 @echo '-----------------------'
285 include Makefile.include
287 .PHONY : dllloader exports eventclients \
288 dvdpcodecs dvdpextcodecs imagelib codecs externals force skins libaddon check \
289 testframework testsuite
291 # hack targets to keep build system up to date
292 Makefile : config.status $(addsuffix .in, $(AUTOGENERATED_MAKEFILES))
293 @echo "Regenerating Makefiles..."
294 @./config.status &> /dev/null
297 config.status: configure
300 ifeq (@USE_TEXTUREPACKER@,1)
301 skins: @TEXTUREPACKER@
302 $(MAKE) -C $(CONFLUENCE_MEDIA)
303 ifeq (@USE_TOUCH_SKIN@,1)
304 $(MAKE) -C $(TOUCH_SKIN_MEDIA)
310 # Setup some dependencies for subdir makes
311 xbmc/cores/paplayer/paplayer.a:
312 $(DVDPLAYER_ARCHIVES) : dvdpcodecs
314 lib/cpluff/libcpluff/.libs/libcpluff.a: force
315 $(MAKE) -C lib/cpluff/libcpluff
316 system/libcpluff-@ARCH@.so: lib/cpluff/libcpluff/.libs/libcpluff.a exports
317 ifeq ($(findstring osx,@ARCH@), osx)
318 ifeq (@ARCH@, arm-osx)
319 $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -read_only_relocs suppress -o $@ $<
321 $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -lexpat $(BUNDLE1_O) -o $@ $<
324 $(CXX) $(LDFLAGS) -shared -o $@ -Wl,--whole-archive $< \
325 -Wl,--no-whole-archive \
326 `cat xbmc/cores/DllLoader/exports/wrapper.def` xbmc/cores/DllLoader/exports/wrapper.o -lexpat
329 exports: xbmc/cores/DllLoader/exports/exports.a xbmc/cores/DllLoader/exports/util/exports_utils.a
330 $(MAKE) -C xbmc/cores/DllLoader/exports wrapper.def
331 dllloader: exports xbmc/cores/DllLoader/dllloader.a
334 $(MAKE) -C lib/addons/library.xbmc.addon
335 $(MAKE) -C lib/addons/library.kodi.adsp
336 $(MAKE) -C lib/addons/library.kodi.audioengine
337 $(MAKE) -C lib/addons/library.xbmc.codec
338 $(MAKE) -C lib/addons/library.kodi.guilib
339 $(MAKE) -C lib/addons/library.xbmc.pvr
340 dvdpcodecs: dllloader
341 $(MAKE) -C lib/libdvd
343 ifeq (@USE_LIBSTAGEFRIGHT@,1)
344 dvdpextcodecs: lib@APP_NAME_LC@.so
345 $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS
351 ifeq ($(findstring osx,@ARCH@), osx)
352 ifneq ($(findstring arm,@ARCH@), arm)
353 $(MAKE) -C tools/EventClients/Clients/OSXRemote
356 $(MAKE) -C tools/EventClients
359 $(MAKE) -C lib/libexif
362 $(MAKE) -C lib/cximage-6.0
364 codecs: dvdpcodecs dvdpextcodecs
366 libs: $(LIBSSE4) imagelib libexif system/libcpluff-@ARCH@.so
368 externals: codecs libs libaddon
371 codecs libs eventclients skins libaddon
375 xbmc/network/network.a \
376 xbmc/video/windows/videowindows.a \
378 xbmc/cores/DllLoader/exports/util/exports_utils.a \
379 xbmc/cores/DllLoader/exports/exports.a \
380 xbmc/settings/settings.a \
382 xbmc/pvr/addons/pvraddons.a \
383 xbmc/pvr/windows/pvrwindows.a \
384 xbmc/guilib/guilib.a # must be dynamic to avoid linker errors
386 ifeq ($(findstring freebsd,@ARCH@),freebsd)
387 DYNOBJSXBMC+= xbmc/freebsd/freebsd.a
390 ifeq (@USE_STATIC_FFMPEG@,1)
391 FFMPEGOBJS = @FFMPEG_LIBDIR@/libavcodec.a \
392 @FFMPEG_LIBDIR@/libavfilter.a \
393 @FFMPEG_LIBDIR@/libswresample.a \
394 @FFMPEG_LIBDIR@/libavformat.a \
395 @FFMPEG_LIBDIR@/libavutil.a \
396 @FFMPEG_LIBDIR@/libpostproc.a \
397 @FFMPEG_LIBDIR@/libswscale.a
398 DYNOBJSXBMC+= $(FFMPEGOBJS)
399 LIBS+= @GNUTLS_ALL_LIBS@ @VORBISENC_ALL_LIBS@ @DCADEC_ALL_LIBS@
401 $(FFMPEGOBJS): dvdpcodecs
404 ifeq (@USE_ANDROID@,1)
405 MAINOBJS+=xbmc/android/activity/activity.a
407 MAINOBJS+=xbmc/main/main.a
411 OBJSXBMC =$(DIRECTORY_ARCHIVES)
412 OBJSXBMC:=$(filter-out $(DYNOBJSXBMC), $(OBJSXBMC))
414 BIN_DIRS = $(dir $(DIRECTORY_ARCHIVES)) $(dir $(NWAOBJSXBMC)) $(dir $(MAINOBJS))
416 DIRS= $(BIN_DIRS) $(EC_DIRS) $(DVDPCODECS_DIRS) \
417 $(LIB_DIRS) $(LIBADDON_DIRS) $(SKIN_DIRS) xbmc/main
419 $(NWAOBJSXBMC) $(DIRECTORY_ARCHIVES) $(MAINOBJS): force
420 @$(MAKE) $(if $(V),,-s) -C $(@D)
422 # Binary Addon bindings
423 include xbmc/addons/addon-bindings.mk
425 lib@APP_NAME_LC@.so: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
426 ifeq ($(findstring osx,@ARCH@), osx)
427 $(SILENT_LD) $(CXX) $(LDFLAGS) -bundle -o $@ $(MAINOBJS) -Wl,-all_load,-ObjC $(MAINOBJS) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -read_only_relocs suppress
429 $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ -Wl,--whole-archive $(MAINOBJS) -Wl,--no-whole-archive,--start-group $(MAINOBJS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group -Wl,--no-undefined $(NWAOBJSXBMC) $(LIBS) -Wl,-Bsymbolic
432 @APP_NAME_LC@.bin: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
434 ifeq ($(findstring osx,@ARCH@), osx)
435 $(SILENT_LD) $(CXX) $(LDFLAGS) -o @APP_NAME_LC@.bin $(MAINOBJS) -Wl,-all_load,-ObjC $(MAINOBJS) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
437 $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o @APP_NAME_LC@.bin $(MAINOBJS) -Wl,--start-group $(MAINOBJS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group $(NWAOBJSXBMC) $(LIBS) -rdynamic
440 @APP_NAME_LC@-xrandr: xbmc-xrandr.c
442 # xbmc-xrandr.c gets picked up by the default make rules
443 @echo "excluding @APP_NAME_LC@-xrandr"
445 $(SILENT_LD) $(CC) $(CFLAGS) $(LDFLAGS) -o @APP_NAME_LC@-xrandr xbmc-xrandr.c -lXrandr -lX11 -lm
449 install-bin: @APP_NAME_LC@.bin # developement convenience target
450 sudo install -d $(DESTDIR)$(libdir)
451 sudo install @APP_NAME_LC@.bin $(DESTDIR)$(libdir)/@APP_NAME_LC@
453 ifeq ($(findstring osx,@ARCH@), osx)
454 # TODO: add osx install
456 install: install-binaries install-arch install-datas
458 apk obb apk-unsigned apk-obb apk-obb-unsigned apk-noobb: install
459 make -C tools/android/packaging $@
462 make -C tools/android/packaging $@
464 install-binaries: install-scripts
465 @echo "Copying @APP_NAME_LC@ binary to $(DESTDIR)$(libdir)/@APP_NAME_LC@/"
466 @install -d $(DESTDIR)$(libdir)/@APP_NAME_LC@
467 @cd $(DESTDIR)$(libdir); [ -L xbmc ] || [ -d xbmc ] || ln -s @APP_NAME_LC@ xbmc
469 @install @APP_NAME_LC@-xrandr $(DESTDIR)$(libdir)/@APP_NAME_LC@/@APP_NAME_LC@-xrandr
471 ifeq (@USE_LIBXBMC@,1)
472 @install lib@APP_NAME_LC@.so $(DESTDIR)$(libdir)/@APP_NAME_LC@/lib@APP_NAME_LC@.so
474 @install @APP_NAME_LC@.bin $(DESTDIR)$(libdir)/@APP_NAME_LC@/@APP_NAME_LC@.bin
475 @echo "You can run @APP_NAME_LC@ with the command '@APP_NAME_LC@'"
480 @# Arch dependent files
481 ifeq ($(findstring freebsd,@ARCH@), freebsd)
482 @find -E system addons -type f -not -iregex ".*\.git.*" \
483 -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \
484 -exec sh -c "install -d \"$(DESTDIR)$(libdir)/@APP_NAME_LC@/\`dirname '{}'\`\"" \; \
486 -exec install "{}" $(DESTDIR)$(libdir)/@APP_NAME_LC@/"{}" \; \
487 -exec printf " -- %-75.75s\r" "{}" \;
489 ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
490 @find -E system addons -type f -not -iregex ".*\.git.*" \
491 -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \
492 -exec sh -c "install -d \"$(DESTDIR)$(libdir)/@APP_NAME_LC@/\`dirname '{}'\`\"" \; \
494 -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \
495 -exec printf " -- %-75.75s\r" "{}" \;
497 @find system addons -regextype posix-extended -type f -not -iregex ".*\.git.*" -iregex ".*\.so|.*\.so\.[0-9].*|.*\.vis|.*\.xbs" -exec install -D "{}" $(DESTDIR)$(libdir)/@APP_NAME_LC@/"{}" \; -printf " -- %-75.75f\r"
498 @find -L addons -regextype posix-extended -type f -not -iregex ".*\.git.*" -iregex ".*\.so|.*\.so\.[0-9].*" -exec cp -d "{}" $(DESTDIR)$(libdir)/@APP_NAME_LC@/"{}" \; -printf " -- %-75.75f\r"
503 @install -d $(DESTDIR)$(bindir)
504 @install tools/Linux/@APP_NAME_LC@.sh $(DESTDIR)$(bindir)/@APP_NAME_LC@
505 @cd $(DESTDIR)$(bindir); [ -L xbmc ] || [ -f xbmc ] || ln -s @APP_NAME_LC@ xbmc
506 @install tools/Linux/@APP_NAME_LC@-standalone.sh $(DESTDIR)$(bindir)/@APP_NAME_LC@-standalone
507 @cd $(DESTDIR)$(bindir); [ -L xbmc-standalone ] || [ -f xbmc-standalone ] || ln -s @APP_NAME_LC@-standalone xbmc-standalone
508 @install -d $(DESTDIR)$(datarootdir)/@APP_NAME_LC@
509 @cd $(DESTDIR)$(datarootdir); [ -L xbmc ] || [ -d xbmc ] || ln -s @APP_NAME_LC@ xbmc
510 @install -d $(DESTDIR)$(datarootdir)/xsessions
511 @install -m 0644 tools/Linux/@APP_NAME_LC@-xsession.desktop $(DESTDIR)$(datarootdir)/xsessions/@APP_NAME_LC@.desktop
512 @cd $(DESTDIR)$(datarootdir)/xsessions; [ -L xbmc.desktop ] || [ -f xbmc.desktop ] || ln -s @APP_NAME_LC@.desktop xbmc.desktop
514 install-datas: install-scripts
515 @echo "Copying support and legal files..."
516 @install -d $(DESTDIR)$(docdir)
517 @for FILE in `ls LICENSE.GPL *.txt`; do \
518 install -m 0644 "$$FILE" "$(DESTDIR)$(docdir)/$$FILE"; done
519 @install -m 0644 "docs/README.linux" "$(DESTDIR)$(docdir)/README.linux"
521 @echo "Copying system files to $(DESTDIR)$(datarootdir)/@APP_NAME_LC@"
522 @install -d $(DESTDIR)$(datarootdir)/@APP_NAME_LC@
523 @# Arch independent files
524 ifeq ($(findstring bsd,@ARCH@), bsd)
525 @find -E addons media userdata system -type f \
526 -not -iregex ".*-@ARCH@.*|.*\.vis|.*\.xbs|.*\.git.*|.*\.so|.*\.so\.[0-9].*|.*\.dll|$(subst ${space},|,$(INSTALL_FILTER))" \
527 -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/@APP_NAME_LC@/\`dirname '{}'\`\"" \; \
529 -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/@APP_NAME_LC@/"{}" \; \
530 -exec printf " -- %-75.75s\r" "{}" \;
532 ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
533 @find -E addons media userdata system -type f \
534 -not -iregex ".*-@ARCH@.*|.*\.vis|.*\.xbs|.*\.git.*|.*\.so|.*\.so\.[0-9].*|.*\.dll|$(subst ${space},|,$(INSTALL_FILTER))" \
535 -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \
537 -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \
538 -exec printf " -- %-75.75s\r" "{}" \;
540 @find addons media userdata system -regextype posix-extended -type f -not -iregex ".*-@ARCH@.*|.*\.vis|.*\.xbs|.*\.git.*|.*\.so|.*\.so\.[0-9].*|.*\.dll|$(subst ${space},|,$(INSTALL_FILTER))" -exec install -D -m 0644 "{}" $(DESTDIR)$(datarootdir)/@APP_NAME_LC@/"{}" \; -printf " -- %-75.75f\r"
544 @install -d $(DESTDIR)$(datarootdir)/applications
545 @install -m 0644 tools/Linux/@APP_NAME_LC@.desktop $(DESTDIR)$(datarootdir)/applications/@APP_NAME_LC@.desktop
547 @install -d $(DESTDIR)$(datadir)/icons/hicolor/16x16/apps
548 @install -m 0644 tools/Linux/packaging/media/icon16x16.png $(DESTDIR)$(datadir)/icons/hicolor/16x16/apps/@APP_NAME_LC@.png
549 @install -d $(DESTDIR)$(datadir)/icons/hicolor/22x22/apps
550 @install -m 0644 tools/Linux/packaging/media/icon22x22.png $(DESTDIR)$(datadir)/icons/hicolor/22x22/apps/@APP_NAME_LC@.png
551 @install -d $(DESTDIR)$(datadir)/icons/hicolor/24x24/apps
552 @install -m 0644 tools/Linux/packaging/media/icon24x24.png $(DESTDIR)$(datadir)/icons/hicolor/24x24/apps/@APP_NAME_LC@.png
553 @install -d $(DESTDIR)$(datadir)/icons/hicolor/32x32/apps
554 @install -m 0644 tools/Linux/packaging/media/icon32x32.png $(DESTDIR)$(datadir)/icons/hicolor/32x32/apps/@APP_NAME_LC@.png
555 @install -d $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps
556 @install -m 0644 tools/Linux/packaging/media/icon48x48.png $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/@APP_NAME_LC@.png
557 @install -d $(DESTDIR)$(datadir)/icons/hicolor/64x64/apps
558 @install -m 0644 tools/Linux/packaging/media/icon64x64.png $(DESTDIR)$(datadir)/icons/hicolor/64x64/apps/@APP_NAME_LC@.png
559 @install -d $(DESTDIR)$(datadir)/icons/hicolor/128x128/apps
560 @install -m 0644 tools/Linux/packaging/media/icon128x128.png $(DESTDIR)$(datadir)/icons/hicolor/128x128/apps/@APP_NAME_LC@.png
561 @install -d $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps
562 @install -m 0644 tools/Linux/packaging/media/icon256x256.png $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps/@APP_NAME_LC@.png
564 @test -z "$(DESTDIR)" && gtk-update-icon-cache -f -q -t $(datadir)/icons/hicolor || :
566 @echo "Copying bindings to $(DESTDIR)$(includedir)/@APP_NAME_LC@"
567 @install -d $(DESTDIR)$(includedir)/@APP_NAME_LC@
568 @for f in $(BINDINGS); do \
569 install -m 0644 $$f $(DESTDIR)$(includedir)/@APP_NAME_LC@ ; \
571 @for f in project/cmake/*.cmake; do \
572 install -m 0644 $$f $(DESTDIR)$(libdir)/@APP_NAME_LC@; \
574 @for f in project/cmake/scripts/common/*.cmake; do \
575 install -m 0644 $$f $(DESTDIR)$(libdir)/@APP_NAME_LC@; \
577 @cd $(DESTDIR)$(includedir); [ -L xbmc ] || [ -d xbmc ] || ln -s @APP_NAME_LC@ xbmc
580 @echo "Removing @APP_NAME@..."
581 @rm -rf $(DESTDIR)$(libdir)/@APP_NAME_LC@
582 @rm -rf $(DESTDIR)$(datarootdir)/@APP_NAME_LC@ $(DESTDIR)$(bindir)/@APP_NAME_LC@
583 @rm -rf $(DESTDIR)$(bindir)/@APP_NAME_LC@-standalone
584 @rm -rf $(DESTDIR)$(datarootdir)/xsessions/@APP_NAME_LC@.desktop
585 @rm -rf $(libdir)/lib@APP_NAME_LC@_*
586 @rm -rf $(prefix)/include/@APP_NAME_LC@
589 clean-@APP_NAME_LC@.bin:
590 rm -f @APP_NAME_LC@.bin
591 for d in $(BIN_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
593 for d in $(EC_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
595 for d in $(DVDPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
597 for d in $(LIB_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
599 for d in $(LIBADDON_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
601 clean-codecs: clean-dvdpcodecs
603 clean-externals: clean-codecs clean-eventclients clean-libs \
606 ifeq (1,@GTEST_CONFIGURED@)
608 for check_program in $(CHECK_PROGRAMS); do $(CURDIR)/$$check_program; done
610 testsuite: $(CHECK_EXTENSIONS) $(CHECK_PROGRAMS)
612 testframework: $(GTEST_LIBS)
614 $(GTEST_LIBS): $(GTEST_DIR)/Makefile
616 $(GTEST_DIR)/Makefile: force
617 $(MAKE) CXXFLAGS="$(CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1" -C $(GTEST_DIR)
620 @$(MAKE) CXXFLAGS="$(CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1" $(if $(V),,-s) -C $(@D)
622 @APP_NAME_LC@-test: $(CHECK_LIBS) $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(GTEST_LIBS)
623 ifeq ($(findstring osx,@ARCH@), osx)
624 $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) $(GTEST_INCLUDES) -o $@ -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(GTEST_LIBS) $(CHECK_LIBS) $(LIBS) $(CHECK_LIBADD) -rdynamic
626 $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) $(GTEST_INCLUDES) -o $@ -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) $(GTEST_LIBS) $(CHECK_LIBS) -Wl,--no-whole-archive $(NWAOBJSXBMC) $(LIBS) $(CHECK_LIBADD) -rdynamic
629 # Give a message that the framework is not configured, but don't fail.
630 check testsuite testframework:
631 @echo "Google Test Framework not configured, skipping testsuite check."