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