3
# These are used for cross-compiling and for saving the configure script
4
# from having to guess our platform (since we know it already)
5
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
6
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
7
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
9
# Set this variable to yes for release builds to disable debugging and enable
11
# NOTE: DEB_BUILD_OPTIONS must have 'nostrip' otherwise debugging symbols will
12
# be stripped from binaries.
14
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
18
# Whether we're building for release or not
19
ifeq (yes,$(XBMC_RELEASE))
20
DEBUG_OPTIONS = --disable-debug --enable-optimizations
22
DEBUG_OPTIONS = --enable-debug --disable-optimizations
25
ifeq (,$(filter i386 amd64,$(DEB_HOST_ARCH)))
26
ARCH_SPECIFIC_OPTIONS = --disable-crystalhd
28
ARCH_SPECIFIC_OPTIONS = --enable-crystalhd
29
ARCH_SPECIFIC_LIB_RECOMMENDS = -lcrystalhd
32
# Enable gles for armel
33
ifeq (,$(filter armel,$(DEB_HOST_ARCH)))
34
GL_CONFIG_OPTIONS = --enable-gl --disable-gles
36
GL_CONFIG_OPTIONS = --disable-gl --enable-gles
39
# Various environment variables to set
40
ENV_OPTIONS = CFLAGS="$(DEB_CFLAGS)" CXXFLAGS="$(DEB_CXXFLAGS)"
42
# List of options to pass to configure. Can be overridden.
43
# Extra options can simply be passed using XBMC_CONFIG_EXTRA_OPTIONS env
45
XBMC_CONFIG_OPTIONS ?= --host=$(DEB_HOST_GNU_TYPE) \
46
--build=$(DEB_BUILD_GNU_TYPE) \
47
--prefix=/usr --docdir=/usr/share/doc/xbmc \
49
$(GL_CONFIG_OPTIONS) \
51
--disable-vdadecoder \
52
--disable-vtbdecoder \
61
--enable-ffmpeg-libvorbis \
65
--disable-asap-codec \
67
--enable-optical-drive \
68
--enable-texturepacker \
73
--enable-external-libraries \
76
$(ARCH_SPECIFIC_OPTIONS) \
77
$(XBMC_CONFIG_EXTRA_OPTIONS) \
80
# Use --parallel option only if debhelper supports it
81
DH_PARALLEL_OPT=$(shell dh_testdir --parallel 2>/dev/null && echo "--parallel")
83
# Used to show what config options are enabled
84
show-xbmc-config-options:
85
$(info $(XBMC_CONFIG_OPTIONS))
88
dh $@ $(DH_PARALLEL_OPT)
91
dh_clean libtool xbmc/config.h xbmc/stamp-h1
92
find . -name config.status -o -name config.cache -o -name config.log \
95
override_dh_auto_configure: configure
96
./configure $(XBMC_CONFIG_OPTIONS)
98
override_dh_auto_install:
99
$(MAKE) -C lib/addons/script.module.pil
100
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
101
$(MAKE) eventclients DESTDIR=$(CURDIR)/debian/tmp \
102
WII_EXTRA_OPTS=-DCWIID_OLD
105
dh_install --sourcedir=$(CURDIR)/debian/tmp -XLICENCE \
106
-XLicence.txt -XLicense.txt -XLiberationSans-Regular.ttf \
107
-XDejaVuSans.ttf -XDejaVuSans-Bold.ttf -XLICENSE.txt
109
override_dh_makeshlibs:
110
# We don't install shared libraries in standard locations so don't run
113
override_dh_shlibdeps: debian/tmp/xbmc-bin-depends-dummy.so debian/tmp/xbmc-bin-recommends-dummy.so
114
dh_shlibdeps -a -O--parallel \
115
-l$(CURDIR)/debian/xbmc-bin/usr/lib/xbmc/system/players/dvdplayer
116
# Need to manually add dependencies for dlopened libs.
117
dpkg-shlibdeps -pdlopenlibs -edebian/tmp/xbmc-bin-depends-dummy.so -xlibc6 -O >>debian/xbmc-bin.substvars
118
dpkg-shlibdeps -dRecommends -edebian/tmp/xbmc-bin-recommends-dummy.so -xlibc6 -O >>debian/xbmc-bin.substvars
120
debian/tmp/xbmc-bin-depends-dummy.so:
122
cc -xc -shared -Wl,--no-as-needed -o $@ /dev/null \
125
debian/tmp/xbmc-bin-recommends-dummy.so:
127
cc -xc -shared -Wl,--no-as-needed -o $@ /dev/null \
145
$(ARCH_SPECIFIC_LIB_RECOMMENDS)