Remove LiveTV menu.
[vuplus_xbmc] / Makefile.in
1 include bootstrap.mk
2
3 null :=
4 space := ${null} ${null}
5 ${space} := ${space}
6
7 AUTOGENERATED_MAKEFILES=@OUTPUT_FILES@
8
9 EC_DIRS= \
10         tools/EventClients
11
12 XBMCTEX_DIRS= \
13         tools/TexturePacker
14
15 DVDPCODECS_DIRS= \
16         lib \
17         lib/libdvd 
18
19 ifeq (@USE_LIBSTAGEFRIGHT@,1)
20 DVDPCODECS_DIRS += xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS
21 endif
22
23 DVDPLAYER_ARCHIVES=xbmc/cores/dvdplayer/DVDPlayer.a \
24                    xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a \
25                    xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a \
26                    xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a \
27                    xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a \
28                    xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a \
29                    xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a \
30                    xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a
31
32 DIRECTORY_ARCHIVES=$(DVDPLAYER_ARCHIVES) \
33                    lib/SlingboxLib/SlingboxLib.a \
34                    lib/libRTV/librtv.a \
35                    lib/libXDAAP/libxdaap.a \
36                    lib/libhts/libhts.a \
37                    lib/libsquish/libsquish.a \
38                    lib/xbmc-dll-symbols/dll-symbols.a \
39                    xbmc/addons/addons.a \
40                    xbmc/cdrip/cdrip.a \
41                    xbmc/cores/AudioEngine/audioengine.a \
42                    xbmc/cores/DllLoader/dllloader.a \
43                    xbmc/cores/DllLoader/exports/exports.a \
44                    xbmc/cores/DllLoader/exports/util/exports_utils.a \
45                    xbmc/cores/ExternalPlayer/ExternalPlayer.a \
46                    xbmc/cores/VideoRenderers/VideoRenderer.a \
47                    xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a \
48                    xbmc/cores/cores.a \
49                    xbmc/cores/paplayer/paplayer.a \
50                    xbmc/cores/playercorefactory/playercorefactory.a \
51                    xbmc/dbwrappers/dbwrappers.a \
52                    xbmc/dialogs/dialogs.a \
53                    xbmc/epg/epg.a \
54                    xbmc/filesystem/MusicDatabaseDirectory/musicdatabasedirectory.a \
55                    xbmc/filesystem/VideoDatabaseDirectory/videodatabasedirectory.a \
56                    xbmc/filesystem/filesystem.a \
57                    xbmc/guilib/guilib.a \
58                    xbmc/input/input.a \
59                    xbmc/interfaces/generic/interfaces-generic.a \
60                    xbmc/interfaces/info/info.a \
61                    xbmc/interfaces/interfaces.a \
62                    xbmc/interfaces/json-rpc/json-rpc.a \
63                    xbmc/linux/linux.a \
64                    xbmc/listproviders/listproviders.a \
65                    xbmc/music/dialogs/musicdialogs.a \
66                    xbmc/music/infoscanner/musicscanner.a \
67                    xbmc/music/karaoke/karaoke.a \
68                    xbmc/music/music.a \
69                    xbmc/music/tags/musictags.a \
70                    xbmc/music/windows/musicwindows.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 \
87                    xbmc/pvr/pvr.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 \
97                    xbmc/utils/utils.a \
98                    xbmc/video/dialogs/videodialogs.a \
99                    xbmc/video/video.a \
100                    xbmc/video/windows/videowindows.a \
101                    xbmc/view/view.a \
102                    xbmc/windowing/windowing.a \
103                    xbmc/windows/windows.a \
104                    xbmc/xbmc.a \
105
106 NWAOBJSXBMC=    xbmc/threads/threads.a \
107                 xbmc/commons/commons.a
108
109
110 ifeq (@USE_WEB_SERVER@,1)
111 DIRECTORY_ARCHIVES += xbmc/network/httprequesthandler/httprequesthandlers.a
112 endif
113
114 DIRECTORY_ARCHIVES += xbmc/interfaces/legacy/legacy.a
115 DIRECTORY_ARCHIVES += xbmc/interfaces/python/python_binding.a
116
117 ifeq (@USE_OPENGL@,1)
118 DIRECTORY_ARCHIVES += xbmc/rendering/gl/rendering_gl.a
119 endif
120
121 ifeq (@USE_OPENGLES@,1)
122 DIRECTORY_ARCHIVES += xbmc/rendering/gles/rendering_gles.a
123 DIRECTORY_ARCHIVES += xbmc/windowing/egl/windowing_egl.a
124 DIRECTORY_ARCHIVES += xbmc/visualizations/EGLHelpers/eglhelpers.a
125 endif
126
127 ifeq (@USE_UPNP@,1)
128 DIRECTORY_ARCHIVES += lib/libUPnP/libupnp.a \
129                       xbmc/network/upnp/upnp.a
130 endif
131
132 ifeq (@USE_MDNSEMBEDDED@,1)
133 DIRECTORY_ARCHIVES += xbmc/network/mdns/mdns.a
134 endif
135
136 INSTALL_FILTER = .*visualization\.dxspectrum.*
137 INSTALL_FILTER += .*visualization\.milkdrop.*
138
139 ifeq ($(findstring osx,@ARCH@),osx)
140 DIRECTORY_ARCHIVES += xbmc/osx/osx.a
141 DIRECTORY_ARCHIVES += xbmc/network/osx/network.a
142 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
143 DIRECTORY_ARCHIVES += xbmc/powermanagement/osx/powermanagement.a
144 DIRECTORY_ARCHIVES += xbmc/storage/osx/storage.a
145 DIRECTORY_ARCHIVES += xbmc/windowing/osx/windowing_osx.a
146 INSTALL_FILTER += .*repository\.pvr-android\.xbmc\.org.*
147 INSTALL_FILTER += .*repository\.pvr-ios\.xbmc\.org.*
148 INSTALL_FILTER += .*repository\.pvr-win32\.xbmc\.org.*
149 else
150 INSTALL_FILTER += .*repository\.pvr-ios\.xbmc\.org.*
151 INSTALL_FILTER += .*repository\.pvr-win32\.xbmc\.org.*
152 INSTALL_FILTER += .*repository\.pvr-osx.*\.xbmc\.org.*
153 ifeq (@USE_ANDROID@,1)
154 DIRECTORY_ARCHIVES += xbmc/input/linux/input_linux.a
155 DIRECTORY_ARCHIVES += xbmc/input/touch/input_touch.a
156 DIRECTORY_ARCHIVES += xbmc/input/touch/generic/input_touch_generic.a
157 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
158 DIRECTORY_ARCHIVES += xbmc/powermanagement/android/powermanagement_android.a
159 DIRECTORY_ARCHIVES += xbmc/storage/android/storage_android.a
160 DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a
161 else
162 DIRECTORY_ARCHIVES += xbmc/input/linux/input_linux.a
163 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
164 DIRECTORY_ARCHIVES += xbmc/powermanagement/linux/powermanagement_linux.a
165 DIRECTORY_ARCHIVES += xbmc/storage/linux/storage_linux.a
166 DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a
167 INSTALL_FILTER += .*repository\.pvr-android\.xbmc\.org.*
168 endif
169 endif
170
171 ifeq ($(findstring freebsd,@ARCH@),freebsd)
172 DIRECTORY_ARCHIVES += xbmc/freebsd/freebsd.a
173 endif
174
175 ifeq (@HAVE_XBMC_NONFREE@,1)
176 DIRECTORY_ARCHIVES += lib/UnrarXLib/UnrarXLib.a
177 endif
178
179 ifeq (@USE_ANDROID@,1)
180 DIRECTORY_ARCHIVES += xbmc/android/loader/AndroidDyload.a
181 DIRECTORY_ARCHIVES += xbmc/windowing/android/windowing_android.a
182 DIRECTORY_ARCHIVES += xbmc/android/bionic_supplement/bionic_supplement.a
183 DIRECTORY_ARCHIVES += xbmc/android/jni/jni.a
184 endif
185
186 ifeq (@USE_OMXPLAYER@,1)
187 DIRECTORY_ARCHIVES += xbmc/cores/omxplayer/omxplayer.a
188 endif
189
190 ifeq (@USE_LIBAV_HACKS@,1)
191 DIRECTORY_ARCHIVES += lib/xbmc-libav-hacks/dll-libavhacks.a
192 endif
193
194 # oskown
195 PAPCODECS_DIRS= \
196         lib/nosefart \
197         lib/timidity \
198         lib/libsidplay2 \
199         lib/stsound/StSoundLibrary \
200         lib/vgmstream
201 ifeq ($(or $(findstring mips,@ARCH@)),)
202 PAPCODECS_DIRS+=lib/snesapu/SNES/SNESAPU
203 endif
204
205 ifeq (@USE_ASAP_CODEC@,1)
206 PAPCODECS_DIRS+= \
207         lib/asap
208 endif
209
210 LIB_DIRS=\
211         lib/cximage-6.0 \
212         lib/libexif \
213         lib/libhdhomerun \
214         lib/cpluff \
215         lib/xbmc-dll-symbols
216
217 ifeq (@USE_MYSQL@,1)
218 LIB_DIRS += lib/cmyth
219 CMYTH=cmyth
220 endif
221
222 SS_DIRS=
223 ifneq (@DISABLE_RSXS@,1)
224   SS_DIRS+= xbmc/screensavers/rsxs-0.9/xbmc
225 else
226   INSTALL_FILTER+= .*screensaver\.rsxs.*
227 endif
228
229 ifneq (@DISABLE_SPECTRUM@,1)
230   VIS_DIRS+= xbmc/visualizations/OpenGLSpectrum
231 else
232   INSTALL_FILTER+= .*visualization\.glspectrum.*
233 endif
234
235 ifneq (@DISABLE_WAVEFORM@,1)
236   VIS_DIRS+= xbmc/visualizations/WaveForm
237 else
238   INSTALL_FILTER+= .*visualization\.waveform.*
239 endif
240
241 ifneq (@DISABLE_FISHBMC@,1)
242   VIS_DIRS+= xbmc/visualizations/fishBMC
243 else
244   INSTALL_FILTER+= .*visualization\.fishbmc.*
245 endif
246
247 ifneq (@DISABLE_PROJECTM@,1)
248   VIS_DIRS+= xbmc/visualizations/XBMCProjectM
249 else
250   INSTALL_FILTER+= .*visualization\.projectm.*
251 endif
252
253 ifneq (@DISABLE_GOOM@,1)
254   VIS_DIRS+=xbmc/visualizations/Goom
255 else
256   INSTALL_FILTER+= .*visualization\.goom.*
257 endif
258
259 LIBADDON_DIRS=\
260         lib/addons/library.xbmc.addon \
261         lib/addons/library.xbmc.codec \
262         lib/addons/library.xbmc.pvr \
263         lib/addons/library.xbmc.gui \
264
265 CONFLUENCE_MEDIA=addons/skin.confluence/media
266 SKIN_DIRS=$(CONFLUENCE_MEDIA)
267
268 ifeq (@USE_SKIN_TOUCHED@,1)
269 TOUCHED_MEDIA=addons/skin.touched/media
270 SKIN_DIRS+=$(TOUCHED_MEDIA)
271 endif
272
273 LIBS=@LIBS@
274 CFLAGS=@CFLAGS@
275 CXXFLAGS=@CXXFLAGS@
276 LDFLAGS=@LDFLAGS@
277 INCLUDES=$(sort @INCLUDES@)
278
279 CLEAN_FILES=xbmc.bin xbmc-xrandr libxbmc.so
280
281 DISTCLEAN_FILES=config.h config.log config.status tools/Linux/xbmc.sh \
282         tools/Linux/xbmc-standalone.sh autom4te.cache config.h.in~ \
283         system/libcpluff-@ARCH@.so
284
285 ifeq (@USE_LIBXBMC@,1)
286 FINAL_TARGETS+=libxbmc.so
287 ifeq (@USE_ANDROID@,1)
288 FINAL_TARGETS+=skins
289 endif
290 else
291 FINAL_TARGETS=xbmc.bin skins xbmc-xrandr
292 endif
293 FINAL_TARGETS+=Makefile externals
294
295 GTEST_DIR = lib/gtest
296 GTEST_INCLUDES = -I$(GTEST_DIR)/include
297 GTEST_LIBS = $(GTEST_DIR)/lib/.libs/libgtest.a
298
299 CHECK_DIRS = xbmc/filesystem/test \
300              xbmc/utils/test \
301              xbmc/threads/test \
302              xbmc/interfaces/python/test \
303              xbmc/test
304 # oskwon
305 CHECK_LIBS = xbmc/filesystem/test/filesystemTest.a \
306              xbmc/utils/test/utilsTest.a \
307              xbmc/threads/test/threadTest.a \
308              xbmc/interfaces/python/test/pythonSwigTest.a \
309              xbmc/test/xbmc-test.a
310 ifeq ($(or $(findstring mips,@ARCH@)),)
311 CHECK_LIBS+=xbmc/cores/AudioEngine/Sinks/test/AESinkTest.a
312 endif
313
314 ifeq (@USE_WAYLAND@,1)
315 CHECK_LIBS += xbmc/windowing/tests/wayland/test_wayland.a
316
317 ifeq (@USE_WAYLAND_TEST_EXTENSION@,1)
318 WAYLAND_TEST_MODULE = xbmc/windowing/tests/wayland/xbmc-wayland-test-extension.so
319 $(WAYLAND_TEST_MODULE): force
320         $(MAKE) -C $(@D) $(@F)
321 CHECK_EXTENSIONS = $(WAYLAND_TEST_MODULE)
322 CHECK_LIBADD=@WAYLAND_TEST_LIBS@
323 endif
324 endif
325
326 CHECK_PROGRAMS = xbmc-test
327
328 CLEAN_FILES += $(CHECK_PROGRAMS) $(CHECK_EXTENSIONS)
329
330 all : $(FINAL_TARGETS)
331         @echo '-----------------------'
332         @echo 'XBMC built successfully'
333         @echo '-----------------------'
334
335 include Makefile.include
336
337 .PHONY : dllloader exports visualizations screensavers eventclients papcodecs \
338         dvdpcodecs dvdpextcodecs imagelib codecs externals force skins libaddon check \
339         testframework testsuite
340
341 # hack targets to keep build system up to date
342 Makefile : config.status $(addsuffix .in, $(AUTOGENERATED_MAKEFILES))
343         @echo "Regenerating Makefiles..."
344         @./config.status &> /dev/null
345         @echo "done"
346
347 config.status: configure
348
349 # skin textures
350 ifeq (@USE_TEXTUREPACKER@,1)
351 skins: tools/TexturePacker/TexturePacker force
352          $(MAKE) -C $(CONFLUENCE_MEDIA)
353 ifeq (@USE_SKIN_TOUCHED@,1)
354          $(MAKE) -C $(TOUCHED_MEDIA)
355 endif
356 else
357 skins:
358 endif
359
360 # Setup some dependencies for subdir makes
361 xbmc/cores/paplayer/paplayer.a: papcodecs
362 $(DVDPLAYER_ARCHIVES)         : dvdpcodecs
363
364 lib/cpluff/libcpluff/.libs/libcpluff.a: force
365         $(MAKE) -C lib/cpluff/libcpluff
366 system/libcpluff-@ARCH@.so: lib/cpluff/libcpluff/.libs/libcpluff.a exports
367 ifeq ($(findstring osx,@ARCH@), osx)
368   ifeq (@ARCH@, arm-osx)
369         $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -read_only_relocs suppress -o $@ $<
370   else
371         $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -lexpat $(BUNDLE1_O) -o $@ $<
372   endif
373 else
374         $(CXX) $(LDFLAGS) -shared -o $@ -Wl,--whole-archive $< \
375                 -Wl,--no-whole-archive  \
376                 `cat xbmc/cores/DllLoader/exports/wrapper.def` xbmc/cores/DllLoader/exports/wrapper.o -lexpat
377 endif
378
379 exports: xbmc/cores/DllLoader/exports/exports.a xbmc/cores/DllLoader/exports/util/exports_utils.a
380         $(MAKE) -C xbmc/cores/DllLoader/exports wrapper.def
381 dllloader: exports xbmc/cores/DllLoader/dllloader.a
382
383 ifeq (@USE_OPENGLES@,1)
384 EGLHELPERS=xbmc/visualizations/EGLHelpers/eglhelpers.a
385 endif
386
387 $(VIS_DIRS): force exports $(EGLHELPERS)
388         $(MAKE) -C $@
389
390 $(SS_DIRS): force exports
391         $(MAKE) -C $@
392
393 visualizations: $(VIS_DIRS)
394
395 screensavers: $(SS_DIRS)
396
397 libaddon: exports
398         $(MAKE) -C lib/addons/library.xbmc.addon
399         $(MAKE) -C lib/addons/library.xbmc.codec
400         $(MAKE) -C lib/addons/library.xbmc.gui
401         $(MAKE) -C lib/addons/library.xbmc.pvr
402 dvdpcodecs: dllloader
403         $(MAKE) -C lib
404         $(MAKE) -C lib/libdvd
405
406 ifeq (@USE_LIBSTAGEFRIGHT@,1)
407 dvdpextcodecs: libxbmc.so 
408         $(MAKE) -C xbmc/cores/dvdplayer/DVDCodecs/Video/libstagefrightICS
409 else
410 dvdpextcodecs:
411 endif
412
413 eventclients:
414 ifeq ($(findstring osx,@ARCH@), osx)
415 ifneq ($(findstring arm,@ARCH@), arm)
416         $(MAKE) -C tools/EventClients/Clients/OSXRemote
417 endif
418 else
419         $(MAKE) -C tools/EventClients
420 endif
421 libexif: dllloader
422         $(MAKE) -C lib/libexif
423 cmyth: dllloader
424         $(MAKE) -C lib/cmyth
425 libhdhomerun: dllloader
426         $(MAKE) -C lib/libhdhomerun
427 papcodecs: dllloader dvdpcodecs
428         test -d system/players/paplayer || mkdir system/players/paplayer
429         $(MAKE) -C lib/vgmstream
430         $(MAKE) -C lib/timidity
431         $(MAKE) -C lib/nosefart
432 ifneq ($(findstring arm-osx,@ARCH@), arm-osx)
433         $(MAKE) -C lib/libsidplay2
434 endif
435 ifeq (@USE_ASAP_CODEC@,1)
436   ifneq ($(findstring osx,@ARCH@), osx)
437         $(MAKE) -C lib/asap asap-xbmc
438   endif
439 endif
440         $(MAKE) -C lib/stsound/StSoundLibrary
441 # oskwon
442 ifeq ($(or $(findstring powerpc,@ARCH@),$(findstring x86_64-linux,@ARCH@),$(findstring arm, @ARCH@),$(findstring freebsd,@ARCH@),$(findstring mips,@ARCH@)),)
443         $(MAKE) -C lib/snesapu/SNES/SNESAPU
444 endif
445 imagelib: dllloader
446         $(MAKE) -C lib/cximage-6.0
447
448 pvraddons: exports
449 ifeq (@USE_PVR_ADDONS@,1)
450         $(MAKE) -C pvr-addons
451 endif
452
453 codecs: papcodecs dvdpcodecs dvdpextcodecs
454
455 libs: libhdhomerun imagelib libexif system/libcpluff-@ARCH@.so $(CMYTH)
456
457 externals: codecs libs visualizations screensavers libaddon pvraddons
458
459 xcode_depends: \
460         codecs libs visualizations screensavers eventclients skins libaddon \
461         lib/libsquish/libsquish.a \
462         lib/libRTV/librtv.a \
463         lib/libXDAAP/libxdaap.a \
464         lib/SlingboxLib/SlingboxLib.a
465
466 DYNOBJSXBMC= \
467         xbmc/linux/linux.a \
468         xbmc/network/network.a \
469         xbmc/video/windows/videowindows.a \
470         xbmc/utils/utils.a \
471         xbmc/cores/DllLoader/exports/util/exports_utils.a \
472         xbmc/cores/DllLoader/exports/exports.a \
473         xbmc/settings/settings.a \
474         xbmc/video/video.a \
475         xbmc/pvr/addons/pvraddons.a \
476         xbmc/pvr/windows/pvrwindows.a \
477         xbmc/guilib/guilib.a # must be dynamic to avoid linker errors
478
479 ifeq ($(findstring freebsd,@ARCH@),freebsd)
480 DYNOBJSXBMC+= xbmc/freebsd/freebsd.a
481 endif
482
483 ifeq (@USE_STATIC_FFMPEG@,1)
484 FFMPEGOBJS = lib/ffmpeg/libavcodec/libavcodec.a \
485              lib/ffmpeg/libavfilter/libavfilter.a \
486              lib/ffmpeg/libswresample/libswresample.a \
487              lib/ffmpeg/libavformat/libavformat.a \
488              lib/ffmpeg/libavutil/libavutil.a \
489              lib/ffmpeg/libpostproc/libpostproc.a \
490              lib/ffmpeg/libswscale/libswscale.a
491 DYNOBJSXBMC+= $(FFMPEGOBJS)
492 LIBS+= @GNUTLS_ALL_LIBS@ @VORBISENC_ALL_LIBS@ @HOGWEED_ALL_LIBS@
493
494 $(FFMPEGOBJS): dvdpcodecs
495 endif
496
497 ifneq (@USE_LIBXBMC@,1)
498 MAINOBJS+=xbmc/main/main.a
499 else
500 ifeq (@USE_ANDROID@,1)
501 MAINOBJS+=xbmc/android/activity/activity.a
502 endif # USE_ANDROID
503 endif # USE_LIBXBMC
504
505
506 OBJSXBMC =$(DIRECTORY_ARCHIVES)
507 OBJSXBMC:=$(filter-out $(DYNOBJSXBMC), $(OBJSXBMC))
508
509 BIN_DIRS = $(dir $(DIRECTORY_ARCHIVES)) $(dir $(NWAOBJSXBMC)) $(dir $(MAINOBJS))
510
511 DIRS= $(BIN_DIRS) $(EC_DIRS) $(XBMCTEX_DIRS) $(DVDPCODECS_DIRS) $(PAPCODECS_DIRS) \
512         $(LIB_DIRS) $(SS_DIRS) $(VIS_DIRS) $(LIBADDON_DIRS) $(SKIN_DIRS) xbmc/main
513
514 $(NWAOBJSXBMC) $(DIRECTORY_ARCHIVES) $(MAINOBJS): force
515         @$(MAKE) $(if $(V),,-s) -C $(@D)
516
517 # sync these entries manually with tools/depends/target/xbmc-addon-bindings/Makefile
518 BINDINGS =xbmc/addons/include/xbmc_addon_cpp_dll.h
519 BINDINGS+=xbmc/addons/include/xbmc_addon_dll.h
520 BINDINGS+=xbmc/addons/include/xbmc_addon_types.h
521 BINDINGS+=xbmc/addons/include/xbmc_codec_types.h
522 BINDINGS+=xbmc/addons/include/xbmc_epg_types.h
523 BINDINGS+=xbmc/addons/include/xbmc_pvr_dll.h
524 BINDINGS+=xbmc/addons/include/xbmc_pvr_types.h
525 BINDINGS+=xbmc/addons/include/xbmc_scr_dll.h
526 BINDINGS+=xbmc/addons/include/xbmc_scr_types.h
527 BINDINGS+=xbmc/addons/include/xbmc_vis_dll.h
528 BINDINGS+=xbmc/addons/include/xbmc_vis_types.h
529 BINDINGS+=xbmc/addons/include/xbmc_stream_utils.hpp
530 BINDINGS+=addons/library.xbmc.addon/libXBMC_addon.h
531 BINDINGS+=addons/library.xbmc.gui/libXBMC_gui.h
532 BINDINGS+=addons/library.xbmc.pvr/libXBMC_pvr.h
533 BINDINGS+=addons/library.xbmc.codec/libXBMC_codec.h
534 BINDINGS+=xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPacket.h
535
536 libxbmc.so: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
537 ifeq ($(findstring osx,@ARCH@), osx)
538         $(SILENT_LD) $(CXX) $(LDFLAGS) -bundle -o $@ $(MAINOBJS) -Wl,-all_load,-ObjC $(MAINOBJS) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -read_only_relocs suppress
539 else
540         $(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)
541 endif
542
543 xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
544
545 ifeq ($(findstring osx,@ARCH@), osx)
546         $(SILENT_LD) $(CXX) $(LDFLAGS) -o xbmc.bin $(MAINOBJS) -Wl,-all_load,-ObjC $(MAINOBJS) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
547 else ifeq ($(findstring mips,@ARCH@), mips) # oskwon
548         $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin $(MAINOBJS) -Wl,--start-group $(MAINOBJS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group $(NWAOBJSXBMC) $(LIBS) -rdynamic xbmc/windowing/egl/gles_init.a -ldvb_base -lnxpl -ldvb_client
549 else
550         $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin $(MAINOBJS) -Wl,--start-group $(MAINOBJS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group $(NWAOBJSXBMC) $(LIBS) -rdynamic
551 endif
552
553 xbmc-xrandr: xbmc-xrandr.c
554 ifneq (1,@USE_XRANDR@)
555         # xbmc-xrandr.c gets picked up by the default make rules
556         @echo "excluding xbmc-xrandr"
557 else
558         $(SILENT_LD) $(CC) $(CFLAGS) $(LDFLAGS) -o xbmc-xrandr xbmc-xrandr.c -lXrandr -lX11 -lm
559 endif
560
561 tools/TexturePacker/TexturePacker: xbmc/guilib/XBTF.h
562         $(MAKE) -C tools/TexturePacker/
563
564
565 install-bin: xbmc.bin # developement convenience target
566         sudo install -d $(DESTDIR)$(libdir)
567         sudo install xbmc.bin $(DESTDIR)$(libdir)/xbmc
568
569 ifeq ($(findstring osx,@ARCH@), osx)
570         # TODO: add osx install
571 else
572 install: install-binaries install-arch install-datas
573
574 apk: apk-clean install
575         make -C tools/android/packaging
576
577 apk-clean:
578         make -C tools/android/packaging clean
579
580 install-binaries: install-scripts
581         @echo "Copying XBMC binary to $(DESTDIR)$(libdir)/xbmc/"
582         @install -d $(DESTDIR)$(libdir)/xbmc
583 ifeq (1,@USE_XRANDR@)
584         @install xbmc-xrandr $(DESTDIR)$(libdir)/xbmc/xbmc-xrandr
585 endif
586 ifeq (@USE_LIBXBMC@,1)
587         @install libxbmc.so $(DESTDIR)$(libdir)/xbmc/libxbmc.so
588 else
589         @install xbmc.bin $(DESTDIR)$(libdir)/xbmc/xbmc.bin
590         @echo "You can run XBMC with the command 'xbmc'"
591 endif
592 endif
593
594 install-arch:
595         @# Arch dependent files
596 ifeq (@USE_PVR_ADDONS@,1)
597         $(MAKE) -C pvr-addons install
598 endif
599 ifeq ($(findstring freebsd,@ARCH@), freebsd)
600         @find -E system addons -type f -not -iregex ".*svn.*" \
601                 -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \
602                 -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \
603                 -and \
604                 -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \
605                 -exec printf " -- %-75.75s\r" "{}" \;
606 else
607 ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
608         @find -E system addons -type f -not -iregex ".*svn.*" \
609                 -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \
610                 -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \
611                 -and \
612                 -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \
613                 -exec printf " -- %-75.75s\r" "{}" \;
614 else
615         @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"
616 endif
617 endif
618
619 install-scripts:
620         @install -d $(DESTDIR)$(bindir)
621         @install tools/Linux/xbmc.sh $(DESTDIR)$(bindir)/xbmc
622         @install tools/Linux/xbmc-standalone.sh $(DESTDIR)$(bindir)/xbmc-standalone
623         @install -d $(DESTDIR)$(datarootdir)/xbmc
624         @install -m 0644 tools/Linux/FEH.py $(DESTDIR)$(datarootdir)/xbmc/FEH.py
625         @install -d $(DESTDIR)$(datarootdir)/xsessions
626         @install -m 0644 tools/Linux/xbmc-xsession.desktop $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop
627
628 install-datas: install-scripts
629         @echo "Copying support and legal files..."
630         @install -d $(DESTDIR)$(docdir)
631         @for FILE in `ls LICENSE.GPL *.txt`; do \
632                 install -m 0644 "$$FILE" "$(DESTDIR)$(docdir)/$$FILE"; done
633         @install -m 0644 "docs/README.linux" "$(DESTDIR)$(docdir)/README.linux"
634         @echo "Done!"
635         @echo "Copying system files to $(DESTDIR)$(datarootdir)/xbmc"
636         @install -d $(DESTDIR)$(datarootdir)/xbmc
637         @# Arch independent files
638 ifeq ($(findstring bsd,@ARCH@), bsd)
639         @find -E addons language media sounds userdata system -type f \
640                 -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|$(subst ${space},|,$(INSTALL_FILTER))" \
641                 -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \
642                 -and \
643                 -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \
644                 -exec printf " -- %-75.75s\r" "{}" \;
645 else
646 ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
647         @find -E addons language media sounds userdata system -type f \
648                 -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|$(subst ${space},|,$(INSTALL_FILTER))" \
649                 -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \
650                 -and \
651                 -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \
652                 -exec printf " -- %-75.75s\r" "{}" \;
653 else
654         @find addons language media sounds userdata system -regextype posix-extended -type f -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|.*\.pvr|$(subst ${space},|,$(INSTALL_FILTER))" -exec install -D -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; -printf " -- %-75.75f\r"
655 endif
656 endif
657         @# Icons and links
658         @install -d $(DESTDIR)$(datarootdir)/applications
659         @install -m 0644 tools/Linux/xbmc.desktop $(DESTDIR)$(datarootdir)/applications/xbmc.desktop
660         @install -d $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps
661         @install -m 0644 media/icon48x48.png $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/xbmc.png
662         @install -d $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps
663         @install -m 0644 media/icon256x256.png $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps/xbmc.png
664         @test -z "$(DESTDIR)" && gtk-update-icon-cache -f -q -t $(datadir)/icons/hicolor || :
665
666         @echo "Copying bindings to $(DESTDIR)$(includedir)/xbmc"
667         @install -d $(DESTDIR)$(includedir)/xbmc
668         @for f in $(BINDINGS); do \
669           install -m 0644 $$f $(DESTDIR)$(includedir)/xbmc ; \
670         done
671         @for f in project/cmake/*.cmake; do \
672           install -m 0644 $$f $(DESTDIR)$(libdir)/xbmc; \
673         done
674
675 uninstall:
676         @echo "Removing XBMC..."
677         @rm -rf $(DESTDIR)$(libdir)/xbmc
678         @rm -rf $(DESTDIR)$(datarootdir)/xbmc $(DESTDIR)$(bindir)/xbmc
679         @rm -rf $(DESTDIR)$(bindir)/xbmc-standalone
680         @rm -rf $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop
681         @rm -rf $(libdir)/libXBMC_*
682         @rm -rf $(prefix)/include/xbmc
683         @echo "Done!"
684
685 clean-xbmc.bin:
686         rm -f xbmc.bin
687         for d in $(BIN_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
688 clean-eventclients:
689         for d in $(EC_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
690 clean-xbmctex:
691         for d in $(XBMCTEX_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
692 clean-dvdpcodecs:
693         for d in $(DVDPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
694 clean-papcodecs:
695         for d in $(PAPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
696 clean-libs:
697         for d in $(LIB_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
698 clean-screensavers:
699         for d in $(SS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
700 clean-visualisations:
701         for d in $(VIS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
702 clean-libaddons:
703         for d in $(LIBADDON_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
704 clean-pvraddons:
705 ifeq (@USE_PVR_ADDONS@,1)
706         if test -f pvr-addons/Makefile; then $(MAKE) -C pvr-addons clean; fi;
707 endif
708
709 clean-codecs: clean-dvdpcodecs clean-papcodecs
710
711 clean-externals: clean-codecs clean-eventclients clean-xbmctex clean-libs \
712         clean-screensavers clean-visualisations clean-libaddons clean-pvraddons
713
714 ifeq (1,@GTEST_CONFIGURED@)
715 check: testsuite
716         for check_program in $(CHECK_PROGRAMS); do $(CURDIR)/$$check_program; done
717
718 testsuite: $(CHECK_EXTENSIONS) $(CHECK_PROGRAMS)
719
720 testframework: $(GTEST_LIBS)
721
722 $(GTEST_LIBS): $(GTEST_DIR)/Makefile
723
724 $(GTEST_DIR)/Makefile: force
725         $(MAKE) -C $(GTEST_DIR)
726
727 $(CHECK_LIBS): force
728         @$(MAKE) $(if $(V),,-s) -C $(@D)
729
730 xbmc-test: $(CHECK_LIBS) $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(GTEST_LIBS)
731 ifeq ($(findstring osx,@ARCH@), osx)
732         $(SILENT_LD) $(CXX) $(LDFLAGS) $(GTEST_INCLUDES) -o $@ -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(GTEST_LIBS) $(CHECK_LIBS) $(LIBS) $(CHECK_LIBADD) -rdynamic
733 else
734         $(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
735 endif
736 else
737 # Give a message that the framework is not configured, but don't fail.
738 check testsuite testframework:
739         @echo "Google Test Framework not configured, skipping testsuite check."
740 endif