1 AUTOGENERATED_MAKEFILES=@OUTPUT_FILES@
13 DVDPLAYER_ARCHIVES=xbmc/cores/dvdplayer/DVDPlayer.a \
14 xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a \
15 xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a \
16 xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a \
17 xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a \
18 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a \
19 xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a \
20 xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a
22 DIRECTORY_ARCHIVES=$(DVDPLAYER_ARCHIVES) \
23 lib/SlingboxLib/SlingboxLib.a \
25 lib/libUPnP/libupnp.a \
26 lib/libXDAAP/libxdaap.a \
28 lib/libsquish/libsquish.a \
29 lib/xbmc-dll-symbols/dll-symbols.a \
30 xbmc/addons/addons.a \
32 xbmc/cores/AudioEngine/audioengine.a \
33 xbmc/cores/DllLoader/dllloader.a \
34 xbmc/cores/DllLoader/exports/exports.a \
35 xbmc/cores/DllLoader/exports/util/exports_utils.a \
36 xbmc/cores/ExternalPlayer/ExternalPlayer.a \
37 xbmc/cores/VideoRenderers/VideoRenderer.a \
38 xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a \
40 xbmc/cores/paplayer/paplayer.a \
41 xbmc/cores/playercorefactory/playercorefactory.a \
42 xbmc/dbwrappers/dbwrappers.a \
43 xbmc/dialogs/dialogs.a \
44 xbmc/filesystem/MusicDatabaseDirectory/musicdatabasedirectory.a \
45 xbmc/filesystem/VideoDatabaseDirectory/videodatabasedirectory.a \
46 xbmc/filesystem/filesystem.a \
47 xbmc/guilib/guilib.a \
49 xbmc/interfaces/http-api/http-api.a \
50 xbmc/interfaces/info/info.a \
51 xbmc/interfaces/interfaces.a \
52 xbmc/interfaces/json-rpc/json-rpc.a \
53 xbmc/interfaces/python/python.a \
54 xbmc/interfaces/python/xbmcmodule/xbmcmodule.a \
56 xbmc/music/dialogs/musicdialogs.a \
57 xbmc/music/infoscanner/musicscanner.a \
58 xbmc/music/karaoke/karaoke.a \
60 xbmc/music/tags/musictags.a \
61 xbmc/music/windows/musicwindows.a \
62 xbmc/network/libscrobbler/scrobbler.a \
63 xbmc/network/websocket/websocket.a \
64 xbmc/network/network.a \
65 xbmc/peripherals/bus/peripheral-bus.a \
66 xbmc/peripherals/devices/peripheral-devices.a \
67 xbmc/peripherals/dialogs/peripheral-dialogs.a \
68 xbmc/peripherals/peripherals.a \
69 xbmc/pictures/pictures.a \
70 xbmc/playlists/playlists.a \
71 xbmc/powermanagement/powermanagement.a \
72 xbmc/programs/programs.a \
73 xbmc/rendering/rendering.a \
74 xbmc/settings/settings.a \
75 xbmc/storage/storage.a \
77 xbmc/video/dialogs/videodialogs.a \
79 xbmc/video/windows/videowindows.a \
80 xbmc/windowing/windowing.a \
81 xbmc/windows/windows.a \
85 NWAOBJSXBMC= xbmc/commons/commons.a \
86 xbmc/threads/threads.a \
89 ifeq (@USE_WEB_SERVER@,1)
90 DIRECTORY_ARCHIVES += xbmc/network/httprequesthandler/httprequesthandlers.a
94 DIRECTORY_ARCHIVES += xbmc/rendering/gl/rendering_gl.a
97 ifeq (@USE_OPENGLES@,1)
98 DIRECTORY_ARCHIVES += xbmc/rendering/gles/rendering_gles.a
99 DIRECTORY_ARCHIVES += xbmc/windowing/egl/windowing_egl.a
102 ifeq ($(findstring osx,@ARCH@),osx)
103 DIRECTORY_ARCHIVES += xbmc/osx/osx.a
104 DIRECTORY_ARCHIVES += xbmc/network/osx/network.a
105 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
106 DIRECTORY_ARCHIVES += xbmc/powermanagement/osx/powermanagement.a
107 DIRECTORY_ARCHIVES += xbmc/storage/osx/storage.a
108 DIRECTORY_ARCHIVES += xbmc/windowing/osx/windowing_osx.a
110 DIRECTORY_ARCHIVES += xbmc/input/linux/input_linux.a
111 DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
112 DIRECTORY_ARCHIVES += xbmc/powermanagement/linux/powermanagement_linux.a
113 DIRECTORY_ARCHIVES += xbmc/storage/linux/storage_linux.a
114 DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a
117 ifeq ($(findstring freebsd,@ARCH@),freebsd)
118 DIRECTORY_ARCHIVES += xbmc/freebsd/freebsd.a
121 ifeq (@HAVE_XBMC_NONFREE@,1)
122 DIRECTORY_ARCHIVES += lib/UnrarXLib/UnrarXLib.a
125 BIN_DIRS = $(dir $(DIRECTORY_ARCHIVES)) $(dir $(NWAOBJSXBMC))
132 lib/stsound/StSoundLibrary \
133 lib/snesapu/SNES/SNESAPU \
136 ifeq (@USE_ASAP_CODEC@,1)
152 ifneq (@DISABLE_RSXS@,1)
153 SS_DIRS+= xbmc/screensavers/rsxs-0.9/xbmc
156 VIS_DIRS=xbmc/visualizations/OpenGLSpectrum \
157 xbmc/visualizations/WaveForm
159 ifneq (@DISABLE_PROJECTM@,1)
160 VIS_DIRS+= xbmc/visualizations/XBMCProjectM
163 ifeq (($(findstring osx,@ARCH@), osx),(@USE_OPENGL@,1))
164 VIS_DIRS+=xbmc/visualizations/iTunes
167 ifneq (@DISABLE_GOOM@,1)
168 VIS_DIRS+=xbmc/visualizations/Goom
171 CONFLUENCE_MEDIA=addons/skin.confluence/media
172 SKIN_DIRS=$(CONFLUENCE_MEDIA)
174 ifeq (@USE_SKIN_TOUCHED@,1)
175 TOUCHED_MEDIA=addons/skin.touched/media
176 SKIN_DIRS+=$(TOUCHED_MEDIA)
179 DIRS= $(BIN_DIRS) $(EC_DIRS) $(XBMCTEX_DIRS) $(DVDPCODECS_DIRS) $(PAPCODECS_DIRS) \
180 $(LIB_DIRS) $(SS_DIRS) $(VIS_DIRS) $(SKIN_DIRS)
186 INCLUDES=$(sort @INCLUDES@)
188 CLEAN_FILES=xbmc.bin xbmc-xrandr libxbmc.so
190 DISTCLEAN_FILES=config.h config.log config.status tools/Linux/xbmc.sh \
191 tools/Linux/xbmc-standalone.sh autom4te.cache config.h.in~ \
192 system/libcpluff-@ARCH@.so
194 ifeq (@USE_LIBXBMC@,1)
195 FINAL_TARGETS+=libxbmc.so
197 FINAL_TARGETS=xbmc.bin skins xbmc-xrandr
199 FINAL_TARGETS+=Makefile externals
201 CHECK_DIRS = xbmc/utils/test \
204 all : $(FINAL_TARGETS)
205 @echo '-----------------------'
206 @echo 'XBMC built successfully'
207 @echo '-----------------------'
209 include Makefile.include
211 .PHONY : dllloader exports visualizations screensavers eventclients papcodecs \
212 dvdpcodecs imagelib codecs externals force skins
214 # hack targets to keep build system up to date
215 Makefile : config.status $(addsuffix .in, $(AUTOGENERATED_MAKEFILES))
216 @echo "Regenerating Makefiles..."
217 @./config.status &> /dev/null
220 config.status: configure
221 @echo "Build system configuration is stale."
222 @echo "Please (re)run configure."
223 @test -n "$$XBMC_IGNORE_STALE"
225 configure: configure.in
226 @echo 'configure is outdated, regenerating...'
230 ifeq (@USE_TEXTUREPACKER@,1)
231 skins: tools/TexturePacker/TexturePacker force
232 $(MAKE) -C $(CONFLUENCE_MEDIA)
233 ifeq (@USE_SKIN_TOUCHED@,1)
234 $(MAKE) -C $(TOUCHED_MEDIA)
240 # Setup some dependencies for subdir makes
241 xbmc/cores/paplayer/paplayer.a: papcodecs
242 $(DVDPLAYER_ARCHIVES) : dvdpcodecs
244 $(NWAOBJSXBMC): force
245 @$(MAKE) $(if $(V),,-s) -C $(@D)
247 $(DIRECTORY_ARCHIVES): force
248 @$(MAKE) $(if $(V),,-s) -C $(@D)
250 lib/libapetag/.libs/libapetag.a: force
251 $(MAKE) -C lib/libapetag
252 lib/cpluff/libcpluff/.libs/libcpluff.a: force
253 $(MAKE) -C lib/cpluff/libcpluff
254 system/libcpluff-@ARCH@.so: lib/cpluff/libcpluff/.libs/libcpluff.a
255 ifeq ($(findstring osx,@ARCH@), osx)
256 ifeq (@ARCH@, arm-osx)
257 $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -read_only_relocs suppress -o $@ $<
259 $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -lexpat $(BUNDLE1_O) -o $@ $<
262 cp lib/cpluff/libcpluff/.libs/libcpluff.so $@
265 exports: xbmc/cores/DllLoader/exports/exports.a xbmc/cores/DllLoader/exports/util/exports_utils.a
266 $(MAKE) -C xbmc/cores/DllLoader/exports wrapper.def
267 dllloader: exports xbmc/cores/DllLoader/dllloader.a
269 $(VIS_DIRS) $(SS_DIRS): force exports
272 visualizations: $(VIS_DIRS)
274 screensavers: $(SS_DIRS)
277 $(MAKE) -C xbmc/interfaces/python
278 $(MAKE) -C xbmc/interfaces/python/xbmcmodule
279 dvdpcodecs: dllloader
281 $(MAKE) -C lib/libdvd
283 ifeq ($(findstring osx,@ARCH@), osx)
284 ifneq ($(findstring arm,@ARCH@), arm)
285 $(MAKE) -C tools/EventClients/Clients/OSXRemote
288 $(MAKE) -C tools/EventClients
291 $(MAKE) -C lib/libexif
294 libhdhomerun: dllloader
295 $(MAKE) -C lib/libhdhomerun
297 $(MAKE) -C lib/libid3tag
298 papcodecs: dllloader dvdpcodecs
299 test -d system/players/paplayer || mkdir system/players/paplayer
300 $(MAKE) -C lib/xbadpcm
301 $(MAKE) -C lib/vgmstream
302 $(MAKE) -C lib/timidity
303 $(MAKE) -C lib/nosefart
304 ifneq ($(findstring arm-osx,@ARCH@), arm-osx)
305 $(MAKE) -C lib/libsidplay2
307 ifeq (@USE_ASAP_CODEC@,1)
308 ifneq ($(findstring osx,@ARCH@), osx)
309 $(MAKE) -C lib/asap asap-xbmc
312 $(MAKE) -C lib/stsound/StSoundLibrary
313 ifeq ($(or $(findstring powerpc,@ARCH@),$(findstring x86_64-linux,@ARCH@),$(findstring arm, @ARCH@),$(findstring freebsd,@ARCH@)),)
314 $(MAKE) -C lib/snesapu/SNES/SNESAPU
317 $(MAKE) -C lib/cximage-6.0
319 codecs: papcodecs dvdpcodecs
320 libs: cmyth libhdhomerun libid3tag imagelib libexif system/libcpluff-@ARCH@.so
321 externals: codecs libs visualizations screensavers
324 codecs libs visualizations screensavers eventclients skins \
325 lib/libsquish/libsquish.a \
326 lib/libapetag/.libs/libapetag.a \
327 lib/libRTV/librtv.a \
328 lib/libXDAAP/libxdaap.a \
329 lib/SlingboxLib/SlingboxLib.a
331 OBJSXBMC =$(DIRECTORY_ARCHIVES)
332 OBJSXBMC+=lib/libapetag/.libs/libapetag.a
336 xbmc/network/network.a \
337 xbmc/video/windows/videowindows.a \
339 xbmc/cores/DllLoader/exports/util/exports_utils.a \
340 xbmc/cores/DllLoader/exports/exports.a \
341 xbmc/settings/settings.a \
343 xbmc/guilib/guilib.a # must be dynamic to avoid linker errors
345 ifeq ($(findstring freebsd,@ARCH@),freebsd)
346 DYNOBJSXBMC+= xbmc/freebsd/freebsd.a
349 OBJSXBMC:=$(filter-out $(DYNOBJSXBMC), $(OBJSXBMC))
351 LIBS += @PYTHON_LDFLAGS@
353 libxbmc.so: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC)
354 ifeq ($(findstring osx,@ARCH@), osx)
355 $(SILENT_LD) $(CXX) $(LDFLAGS) -bundle -o $@ -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS)
357 $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--no-whole-archive $(NWAOBJSXBMC) $(LIBS)
360 xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC)
362 ifeq ($(findstring osx,@ARCH@), osx)
363 $(SILENT_LD) $(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
365 $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--no-whole-archive $(NWAOBJSXBMC) $(LIBS) -rdynamic
368 xbmc-xrandr: xbmc-xrandr.c
369 ifneq (1,@USE_XRANDR@)
370 # xbmc-xrandr.c gets picked up by the default make rules
371 @echo "excluding xbmc-xrandr"
373 $(SILENT_LD) $(CC) $(CFLAGS) $(LDFLAGS) -o xbmc-xrandr xbmc-xrandr.c -lXrandr -lX11 -lm
376 tools/XBMCTex/XBMCTex:
377 ifeq ($(findstring osx,@ARCH@), osx)
379 $(MAKE) -C tools/XBMCTex -f Makefile.osx
381 $(MAKE) -C tools/XBMCTex/
384 tools/TexturePacker/TexturePacker: xbmc/guilib/guilib.a lib/libsquish/libsquish.a
385 $(MAKE) -C tools/TexturePacker/
388 install-bin: xbmc.bin # developement convenience target
389 sudo install -d $(DESTDIR)$(libdir)
390 sudo install xbmc.bin $(DESTDIR)$(libdir)/xbmc
392 ifeq ($(findstring osx,@ARCH@), osx)
393 # TODO: add osx install
395 install: install-binaries install-arch install-datas
397 install-binaries: install-scripts
398 @echo "Copying XBMC binary to $(DESTDIR)$(libdir)/xbmc/xbmc.bin"
399 @install -d $(DESTDIR)$(libdir)/xbmc
400 @install xbmc.bin $(DESTDIR)$(libdir)/xbmc/xbmc.bin
401 ifeq (1,@USE_XRANDR@)
402 @install xbmc-xrandr $(DESTDIR)$(libdir)/xbmc/xbmc-xrandr
404 ifeq (@USE_LIBXBMC@,1)
405 @install libxbmc.so $(DESTDIR)$(libdir)/xbmc/libxbmc.so
407 @echo "You can run XBMC with the command 'xbmc'"
412 @# Arch dependent files
413 ifeq ($(findstring freebsd,@ARCH@), freebsd)
414 @find -E system addons -type f -not -iregex ".*svn.*" \
415 -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \
416 -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \
418 -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \
419 -exec printf " -- %-75.75s\r" "{}" \;
421 @find system addons -regextype posix-extended -type f -not -iregex ".*svn.*" -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" -exec install -D "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; -printf " -- %-75.75f\r"
425 @install -d $(DESTDIR)$(bindir)
426 @install tools/Linux/xbmc.sh $(DESTDIR)$(bindir)/xbmc
427 @install tools/Linux/xbmc-standalone.sh $(DESTDIR)$(bindir)/xbmc-standalone
428 @install -d $(DESTDIR)$(datarootdir)/xbmc
429 @install -m 0644 tools/Linux/FEH.py $(DESTDIR)$(datarootdir)/xbmc/FEH.py
430 @install -d $(DESTDIR)$(datarootdir)/xsessions
431 @install -m 0644 tools/Linux/xbmc-xsession.desktop $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop
433 install-datas: install-scripts
434 @echo "Copying support and legal files..."
435 @install -d $(DESTDIR)$(docdir)
436 @for FILE in `ls LICENSE.GPL *.txt`; do \
437 install -m 0644 "$$FILE" "$(DESTDIR)$(docdir)/$$FILE"; done
438 @install -m 0644 "docs/README.linux" "$(DESTDIR)$(docdir)/README.linux"
440 @echo "Copying system files to $(DESTDIR)$(datarootdir)/xbmc"
441 @install -d $(DESTDIR)$(datarootdir)/xbmc
442 @# Arch independent files
443 ifeq ($(findstring bsd,@ARCH@), bsd)
444 @find -E addons language media sounds userdata system -type f \
445 -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll" \
446 -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \
448 -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \
449 -exec printf " -- %-75.75s\r" "{}" \;
451 @find addons language media sounds userdata system -regextype posix-extended -type f -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll" -exec install -D -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; -printf " -- %-75.75f\r"
454 @install -d $(DESTDIR)$(datarootdir)/applications
455 @install tools/Linux/xbmc.desktop $(DESTDIR)$(datarootdir)/applications/xbmc.desktop
456 @install -d $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps
457 @install -m 0644 tools/Linux/xbmc-48x48.png $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/xbmc.png
458 @install -d $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps
459 @install -m 0644 media/icon.png $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps/xbmc.png
460 @test -z "$(DESTDIR)" && gtk-update-icon-cache -f -q -t $(datadir)/icons/hicolor || :
463 @echo "Removing XBMC..."
464 @rm -rf $(DESTDIR)$(libdir)/xbmc
465 @rm -rf $(DESTDIR)$(datarootdir)/xbmc $(DESTDIR)$(bindir)/xbmc
466 @rm -rf $(DESTDIR)$(bindir)/xbmc-standalone
467 @rm -rf $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop
472 for d in $(BIN_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
474 for d in $(EC_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
476 for d in $(XBMCTEX_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
478 for d in $(DVDPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
480 for d in $(PAPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
482 for d in $(LIB_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
484 for d in $(SS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
485 clean-visualisations:
486 for d in $(VIS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done
488 clean-codecs: clean-dvdpcodecs clean-papcodecs
490 clean-externals: clean-codecs clean-eventclients clean-xbmctex clean-libs \
491 clean-screensavers clean-visualisations
494 for d in $(CHECK_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d $@; fi; done