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