AUTOGENERATED_MAKEFILES=@OUTPUT_FILES@ EC_DIRS= \ tools/EventClients XBMCTEX_DIRS= \ tools/TexturePacker DVDPCODECS_DIRS= \ lib \ lib/libdvd DVDPLAYER_ARCHIVES=xbmc/cores/dvdplayer/DVDPlayer.a \ xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a \ xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a \ xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a \ xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a \ xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a \ xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a \ xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a DIRECTORY_ARCHIVES=$(DVDPLAYER_ARCHIVES) \ lib/SlingboxLib/SlingboxLib.a \ lib/libRTV/librtv.a \ lib/libUPnP/libupnp.a \ lib/libXDAAP/libxdaap.a \ lib/libhts/libhts.a \ lib/libsquish/libsquish.a \ lib/xbmc-dll-symbols/dll-symbols.a \ xbmc/addons/addons.a \ xbmc/cdrip/cdrip.a \ xbmc/cores/AudioEngine/audioengine.a \ xbmc/cores/DllLoader/dllloader.a \ xbmc/cores/DllLoader/exports/exports.a \ xbmc/cores/DllLoader/exports/util/exports_utils.a \ xbmc/cores/ExternalPlayer/ExternalPlayer.a \ xbmc/cores/VideoRenderers/VideoRenderer.a \ xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a \ xbmc/cores/cores.a \ xbmc/cores/paplayer/paplayer.a \ xbmc/cores/playercorefactory/playercorefactory.a \ xbmc/dbwrappers/dbwrappers.a \ xbmc/dialogs/dialogs.a \ xbmc/filesystem/MusicDatabaseDirectory/musicdatabasedirectory.a \ xbmc/filesystem/VideoDatabaseDirectory/videodatabasedirectory.a \ xbmc/filesystem/filesystem.a \ xbmc/guilib/guilib.a \ xbmc/input/input.a \ xbmc/interfaces/http-api/http-api.a \ xbmc/interfaces/info/info.a \ xbmc/interfaces/interfaces.a \ xbmc/interfaces/json-rpc/json-rpc.a \ xbmc/interfaces/python/python.a \ xbmc/interfaces/python/xbmcmodule/xbmcmodule.a \ xbmc/linux/linux.a \ xbmc/music/dialogs/musicdialogs.a \ xbmc/music/infoscanner/musicscanner.a \ xbmc/music/karaoke/karaoke.a \ xbmc/music/music.a \ xbmc/music/tags/musictags.a \ xbmc/music/windows/musicwindows.a \ xbmc/network/libscrobbler/scrobbler.a \ xbmc/network/websocket/websocket.a \ xbmc/network/network.a \ xbmc/peripherals/bus/peripheral-bus.a \ xbmc/peripherals/devices/peripheral-devices.a \ xbmc/peripherals/dialogs/peripheral-dialogs.a \ xbmc/peripherals/peripherals.a \ xbmc/pictures/pictures.a \ xbmc/playlists/playlists.a \ xbmc/powermanagement/powermanagement.a \ xbmc/programs/programs.a \ xbmc/rendering/rendering.a \ xbmc/settings/settings.a \ xbmc/storage/storage.a \ xbmc/utils/utils.a \ xbmc/video/dialogs/videodialogs.a \ xbmc/video/video.a \ xbmc/video/windows/videowindows.a \ xbmc/windowing/windowing.a \ xbmc/windows/windows.a \ xbmc/xbmc.a \ NWAOBJSXBMC= xbmc/commons/commons.a \ xbmc/threads/threads.a \ ifeq (@USE_WEB_SERVER@,1) DIRECTORY_ARCHIVES += xbmc/network/httprequesthandler/httprequesthandlers.a endif ifeq (@USE_OPENGL@,1) DIRECTORY_ARCHIVES += xbmc/rendering/gl/rendering_gl.a endif ifeq (@USE_OPENGLES@,1) DIRECTORY_ARCHIVES += xbmc/rendering/gles/rendering_gles.a DIRECTORY_ARCHIVES += xbmc/windowing/egl/windowing_egl.a endif ifeq ($(findstring osx,@ARCH@),osx) DIRECTORY_ARCHIVES += xbmc/osx/osx.a DIRECTORY_ARCHIVES += xbmc/network/osx/network.a DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a DIRECTORY_ARCHIVES += xbmc/powermanagement/osx/powermanagement.a DIRECTORY_ARCHIVES += xbmc/storage/osx/storage.a DIRECTORY_ARCHIVES += xbmc/windowing/osx/windowing_osx.a else DIRECTORY_ARCHIVES += xbmc/input/linux/input_linux.a DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a DIRECTORY_ARCHIVES += xbmc/powermanagement/linux/powermanagement_linux.a DIRECTORY_ARCHIVES += xbmc/storage/linux/storage_linux.a DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a endif ifeq ($(findstring freebsd,@ARCH@),freebsd) DIRECTORY_ARCHIVES += xbmc/freebsd/freebsd.a endif ifeq (@HAVE_XBMC_NONFREE@,1) DIRECTORY_ARCHIVES += lib/UnrarXLib/UnrarXLib.a endif BIN_DIRS = $(dir $(DIRECTORY_ARCHIVES)) $(dir $(NWAOBJSXBMC)) PAPCODECS_DIRS= \ lib/xbadpcm \ lib/nosefart \ lib/timidity \ lib/libsidplay2 \ lib/stsound/StSoundLibrary \ lib/snesapu/SNES/SNESAPU \ lib/vgmstream ifeq (@USE_ASAP_CODEC@,1) PAPCODECS_DIRS+= \ lib/asap endif LIB_DIRS=\ lib/cximage-6.0 \ lib/libexif \ lib/libhdhomerun \ lib/libid3tag \ lib/libapetag \ lib/cpluff \ lib/xbmc-dll-symbols ifeq (@USE_MYSQL@,1) LIB_DIRS += lib/cmyth CMYTH=cmyth endif SS_DIRS= ifneq (@DISABLE_RSXS@,1) SS_DIRS+= xbmc/screensavers/rsxs-0.9/xbmc endif VIS_DIRS=xbmc/visualizations/OpenGLSpectrum \ xbmc/visualizations/WaveForm ifneq (@DISABLE_PROJECTM@,1) VIS_DIRS+= xbmc/visualizations/XBMCProjectM endif ifeq (($(findstring osx,@ARCH@), osx),(@USE_OPENGL@,1)) VIS_DIRS+=xbmc/visualizations/iTunes endif ifneq (@DISABLE_GOOM@,1) VIS_DIRS+=xbmc/visualizations/Goom endif CONFLUENCE_MEDIA=addons/skin.confluence/media SKIN_DIRS=$(CONFLUENCE_MEDIA) ifeq (@USE_SKIN_TOUCHED@,1) TOUCHED_MEDIA=addons/skin.touched/media SKIN_DIRS+=$(TOUCHED_MEDIA) endif DIRS= $(BIN_DIRS) $(EC_DIRS) $(XBMCTEX_DIRS) $(DVDPCODECS_DIRS) $(PAPCODECS_DIRS) \ $(LIB_DIRS) $(SS_DIRS) $(VIS_DIRS) $(SKIN_DIRS) LIBS=@LIBS@ CFLAGS=@CFLAGS@ CXXFLAGS=@CXXFLAGS@ LDFLAGS=@LDFLAGS@ INCLUDES=$(sort @INCLUDES@) CLEAN_FILES=xbmc.bin xbmc-xrandr libxbmc.so DISTCLEAN_FILES=config.h config.log config.status tools/Linux/xbmc.sh \ tools/Linux/xbmc-standalone.sh autom4te.cache config.h.in~ \ system/libcpluff-@ARCH@.so ifeq (@USE_LIBXBMC@,1) FINAL_TARGETS+=libxbmc.so else FINAL_TARGETS=xbmc.bin skins xbmc-xrandr endif FINAL_TARGETS+=Makefile externals CHECK_DIRS = xbmc/utils/test \ xbmc/threads/test all : $(FINAL_TARGETS) @echo '-----------------------' @echo 'XBMC built successfully' @echo '-----------------------' include Makefile.include .PHONY : dllloader exports visualizations screensavers eventclients papcodecs \ dvdpcodecs imagelib codecs externals force skins # hack targets to keep build system up to date Makefile : config.status $(addsuffix .in, $(AUTOGENERATED_MAKEFILES)) @echo "Regenerating Makefiles..." @./config.status &> /dev/null @echo "done" config.status: configure @echo "Build system configuration is stale." @echo "Please (re)run configure." @test -n "$$XBMC_IGNORE_STALE" configure: configure.in @echo 'configure is outdated, regenerating...' @./bootstrap # skin textures ifeq (@USE_TEXTUREPACKER@,1) skins: tools/TexturePacker/TexturePacker force $(MAKE) -C $(CONFLUENCE_MEDIA) ifeq (@USE_SKIN_TOUCHED@,1) $(MAKE) -C $(TOUCHED_MEDIA) endif else skins: endif # Setup some dependencies for subdir makes xbmc/cores/paplayer/paplayer.a: papcodecs $(DVDPLAYER_ARCHIVES) : dvdpcodecs $(NWAOBJSXBMC): force @$(MAKE) $(if $(V),,-s) -C $(@D) $(DIRECTORY_ARCHIVES): force @$(MAKE) $(if $(V),,-s) -C $(@D) lib/libapetag/.libs/libapetag.a: force $(MAKE) -C lib/libapetag lib/cpluff/libcpluff/.libs/libcpluff.a: force $(MAKE) -C lib/cpluff/libcpluff system/libcpluff-@ARCH@.so: lib/cpluff/libcpluff/.libs/libcpluff.a ifeq ($(findstring osx,@ARCH@), osx) ifeq (@ARCH@, arm-osx) $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -read_only_relocs suppress -o $@ $< else $(CXX) $(LDFLAGS) -all_load -bundle -flat_namespace -undefined dynamic_lookup -lexpat $(BUNDLE1_O) -o $@ $< endif else cp lib/cpluff/libcpluff/.libs/libcpluff.so $@ endif exports: xbmc/cores/DllLoader/exports/exports.a xbmc/cores/DllLoader/exports/util/exports_utils.a $(MAKE) -C xbmc/cores/DllLoader/exports wrapper.def dllloader: exports xbmc/cores/DllLoader/dllloader.a $(VIS_DIRS) $(SS_DIRS): force exports $(MAKE) -C $@ visualizations: $(VIS_DIRS) screensavers: $(SS_DIRS) libpython: dllloader $(MAKE) -C xbmc/interfaces/python $(MAKE) -C xbmc/interfaces/python/xbmcmodule dvdpcodecs: dllloader $(MAKE) -C lib $(MAKE) -C lib/libdvd eventclients: ifeq ($(findstring osx,@ARCH@), osx) ifneq ($(findstring arm,@ARCH@), arm) $(MAKE) -C tools/EventClients/Clients/OSXRemote endif else $(MAKE) -C tools/EventClients endif libexif: dllloader $(MAKE) -C lib/libexif cmyth: dllloader $(MAKE) -C lib/cmyth libhdhomerun: dllloader $(MAKE) -C lib/libhdhomerun libid3tag: dllloader $(MAKE) -C lib/libid3tag papcodecs: dllloader dvdpcodecs test -d system/players/paplayer || mkdir system/players/paplayer $(MAKE) -C lib/xbadpcm $(MAKE) -C lib/vgmstream $(MAKE) -C lib/timidity $(MAKE) -C lib/nosefart ifneq ($(findstring arm-osx,@ARCH@), arm-osx) $(MAKE) -C lib/libsidplay2 endif ifeq (@USE_ASAP_CODEC@,1) ifneq ($(findstring osx,@ARCH@), osx) $(MAKE) -C lib/asap asap-xbmc endif endif $(MAKE) -C lib/stsound/StSoundLibrary ifeq ($(or $(findstring powerpc,@ARCH@),$(findstring x86_64-linux,@ARCH@),$(findstring arm, @ARCH@),$(findstring freebsd,@ARCH@)),) $(MAKE) -C lib/snesapu/SNES/SNESAPU endif imagelib: dllloader $(MAKE) -C lib/cximage-6.0 codecs: papcodecs dvdpcodecs libs: libhdhomerun libid3tag imagelib libexif system/libcpluff-@ARCH@.so $(CMYTH) externals: codecs libs visualizations screensavers xcode_depends: \ codecs libs visualizations screensavers eventclients skins \ lib/libsquish/libsquish.a \ lib/libapetag/.libs/libapetag.a \ lib/libRTV/librtv.a \ lib/libXDAAP/libxdaap.a \ lib/SlingboxLib/SlingboxLib.a OBJSXBMC =$(DIRECTORY_ARCHIVES) OBJSXBMC+=lib/libapetag/.libs/libapetag.a DYNOBJSXBMC= \ xbmc/linux/linux.a \ xbmc/network/network.a \ xbmc/video/windows/videowindows.a \ xbmc/utils/utils.a \ xbmc/cores/DllLoader/exports/util/exports_utils.a \ xbmc/cores/DllLoader/exports/exports.a \ xbmc/settings/settings.a \ xbmc/video/video.a \ xbmc/guilib/guilib.a # must be dynamic to avoid linker errors ifeq ($(findstring freebsd,@ARCH@),freebsd) DYNOBJSXBMC+= xbmc/freebsd/freebsd.a endif OBJSXBMC:=$(filter-out $(DYNOBJSXBMC), $(OBJSXBMC)) LIBS += @PYTHON_LDFLAGS@ libxbmc.so: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) ifeq ($(findstring osx,@ARCH@), osx) $(SILENT_LD) $(CXX) $(LDFLAGS) -bundle -o $@ -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) else $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--no-whole-archive $(NWAOBJSXBMC) $(LIBS) endif xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) ifeq ($(findstring osx,@ARCH@), osx) $(SILENT_LD) $(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic else $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--no-whole-archive $(NWAOBJSXBMC) $(LIBS) -rdynamic endif xbmc-xrandr: xbmc-xrandr.c ifneq (1,@USE_XRANDR@) # xbmc-xrandr.c gets picked up by the default make rules @echo "excluding xbmc-xrandr" else $(SILENT_LD) $(CC) $(CFLAGS) $(LDFLAGS) -o xbmc-xrandr xbmc-xrandr.c -lXrandr -lX11 -lm endif tools/XBMCTex/XBMCTex: ifeq ($(findstring osx,@ARCH@), osx) # hack this for now $(MAKE) -C tools/XBMCTex -f Makefile.osx else $(MAKE) -C tools/XBMCTex/ endif tools/TexturePacker/TexturePacker: xbmc/guilib/guilib.a lib/libsquish/libsquish.a $(MAKE) -C tools/TexturePacker/ install-bin: xbmc.bin # developement convenience target sudo install -d $(DESTDIR)$(libdir) sudo install xbmc.bin $(DESTDIR)$(libdir)/xbmc ifeq ($(findstring osx,@ARCH@), osx) # TODO: add osx install else install: install-binaries install-arch install-datas install-binaries: install-scripts @echo "Copying XBMC binary to $(DESTDIR)$(libdir)/xbmc/xbmc.bin" @install -d $(DESTDIR)$(libdir)/xbmc @install xbmc.bin $(DESTDIR)$(libdir)/xbmc/xbmc.bin ifeq (1,@USE_XRANDR@) @install xbmc-xrandr $(DESTDIR)$(libdir)/xbmc/xbmc-xrandr endif ifeq (@USE_LIBXBMC@,1) @install libxbmc.so $(DESTDIR)$(libdir)/xbmc/libxbmc.so else @echo "You can run XBMC with the command 'xbmc'" endif endif install-arch: @# Arch dependent files ifeq ($(findstring freebsd,@ARCH@), freebsd) @find -E system addons -type f -not -iregex ".*svn.*" \ -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \ -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \ -and \ -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \ -exec printf " -- %-75.75s\r" "{}" \; else @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" endif install-scripts: @install -d $(DESTDIR)$(bindir) @install tools/Linux/xbmc.sh $(DESTDIR)$(bindir)/xbmc @install tools/Linux/xbmc-standalone.sh $(DESTDIR)$(bindir)/xbmc-standalone @install -d $(DESTDIR)$(datarootdir)/xbmc @install -m 0644 tools/Linux/FEH.py $(DESTDIR)$(datarootdir)/xbmc/FEH.py @install -d $(DESTDIR)$(datarootdir)/xsessions @install -m 0644 tools/Linux/xbmc-xsession.desktop $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop install-datas: install-scripts @echo "Copying support and legal files..." @install -d $(DESTDIR)$(docdir) @for FILE in `ls LICENSE.GPL *.txt`; do \ install -m 0644 "$$FILE" "$(DESTDIR)$(docdir)/$$FILE"; done @install -m 0644 "docs/README.linux" "$(DESTDIR)$(docdir)/README.linux" @echo "Done!" @echo "Copying system files to $(DESTDIR)$(datarootdir)/xbmc" @install -d $(DESTDIR)$(datarootdir)/xbmc @# Arch independent files ifeq ($(findstring bsd,@ARCH@), bsd) @find -E addons language media sounds userdata system -type f \ -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll" \ -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \ -and \ -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \ -exec printf " -- %-75.75s\r" "{}" \; else @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" endif @# Icons and links @install -d $(DESTDIR)$(datarootdir)/applications @install tools/Linux/xbmc.desktop $(DESTDIR)$(datarootdir)/applications/xbmc.desktop @install -d $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps @install -m 0644 tools/Linux/xbmc-48x48.png $(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/xbmc.png @install -d $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps @install -m 0644 media/icon.png $(DESTDIR)$(datadir)/icons/hicolor/256x256/apps/xbmc.png @test -z "$(DESTDIR)" && gtk-update-icon-cache -f -q -t $(datadir)/icons/hicolor || : uninstall: @echo "Removing XBMC..." @rm -rf $(DESTDIR)$(libdir)/xbmc @rm -rf $(DESTDIR)$(datarootdir)/xbmc $(DESTDIR)$(bindir)/xbmc @rm -rf $(DESTDIR)$(bindir)/xbmc-standalone @rm -rf $(DESTDIR)$(datarootdir)/xsessions/XBMC.desktop @echo "Done!" clean-xbmc.bin: rm -f xbmc.bin for d in $(BIN_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done clean-eventclients: for d in $(EC_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done clean-xbmctex: for d in $(XBMCTEX_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done clean-dvdpcodecs: for d in $(DVDPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done clean-papcodecs: for d in $(PAPCODECS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done clean-libs: for d in $(LIB_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done clean-screensavers: for d in $(SS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done clean-visualisations: for d in $(VIS_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d clean; fi; done clean-codecs: clean-dvdpcodecs clean-papcodecs clean-externals: clean-codecs clean-eventclients clean-xbmctex clean-libs \ clean-screensavers clean-visualisations check: for d in $(CHECK_DIRS); do if test -f $$d/Makefile; then $(MAKE) -C $$d $@; fi; done