-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.xbmc
316 lines (272 loc) · 11 KB
/
Makefile.xbmc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
##################################################################
#
# XBMC make.
#
all: libcec xbmc-git-doit pvr-git-doit
xbmc-doit: ./xbmc
cd ./xbmc; make all
#####################################################################
#
# XBMC setup
#
./xbmc:
mkdir ./xbmc
ln -s ../Makefile.xbmc ./xbmc/Makefile
##################################################################
#
# PVR Addons HEAD
#
xbmc-pvr-addons-git:
git clone --depth 5 git://github.com/opdenkamp/xbmc-pvr-addons.git xbmc-pvr-addons-git
xbmc-pvr-addons-git/dezi.patch: xbmc-git
cd xbmc-pvr-addons-git; \
git apply --index ../../patches/xbmc-pvr-addons.timeout.patch || echo "Already applied..."; \
touch dezi.patch
xbmc-pvr-addons-git/dezi.done: xbmc-pvr-addons-git
cd xbmc-pvr-addons-git; \
./bootstrap; \
./configure --prefix=/usr/local --enable-addons-with-dependencies; \
make; \
sudo make install; \
touch dezi.done
pvr-git-doit: xbmc-pvr-addons-git xbmc-pvr-addons-git/dezi.patch xbmc-pvr-addons-git/dezi.done
##################################################################
#
# XBMC configure environment
#
xbmc-git-env= \
export TARGET_SUBARCH="armv6zk"; \
export TARGET_CPU="arm1176jzf-s"; \
export TARGET_FLOAT="hard"; \
export TARGET_FPU="vfp"; \
export TARGET_FPU_FLAGS="-mfloat-abi=$$TARGET_FLOAT -mfpu=$$TARGET_FPU"; \
export TARGET_EXTRA_FLAGS="-Wno-psabi -Wa,-mno-warn-deprecated"; \
export TARGET_COPT="-Wall -pipe -fomit-frame-pointer -O3 -fexcess-precision=fast -ffast-math -fgnu89-inline"; \
export TARGET_LOPT="-s -Wl,--as-needed"; \
export TARGET_INCLUDES="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"; \
export CFLAGS="-march=$$TARGET_SUBARCH -mcpu=$$TARGET_CPU $$TARGET_FPU_FLAGS -mabi=aapcs-linux $$TARGET_COPT $$TARGET_EXTRA_FLAGS $$TARGET_INCLUDES"; \
export CXXFLAGS="$$CFLAGS"; \
export CPPFLAGS="-I/home/pi/raspi/xbmc/xbmc-git/xbmc"; \
export LDFLAGS="-L/opt/vc/lib -march=$$TARGET_SUBARCH -mtune=$$TARGET_CPU $$TARGET_LOPT" \
export PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/local/lib/pkgconfig" \
##################################################################
#
# xbmc-git
#
xbmc-git:
git clone --depth 5 git://github.com/xbmc/xbmc.git xbmc-git
xbmc-git/dezi.patch: xbmc-git
cd xbmc-git; \
git apply --index ../../patches/xbmc.nfc.patch || echo "Already applied..."; \
git apply --index ../../patches/xbmc.omxplayer.patch || echo "Already applied..."; \
touch dezi.patch
xbmc-git/dezi.taglib: xbmc-git
cd xbmc-git; \
make -C lib/taglib; \
sudo make -C lib/taglib install; \
touch dezi.taglib
xbmc-git/dezi.shairport: xbmc-git
cd xbmc-git; \
make -C lib/libshairport; \
sudo make -C lib/libshairport install; \
touch dezi.shairport
xbmc-git/dezi.tools: xbmc-git
$(xbmc-git-env); \
cd xbmc-git; \
sed -i 's/USE_BUILDROOT=1/USE_BUILDROOT=0/' tools/rbp/setup-sdk.sh; \
sed -i 's/TOOLCHAIN=\/usr\/local\/bcm-gcc/TOOLCHAIN=\/usr/' tools/rbp/setup-sdk.sh; \
sh tools/rbp/setup-sdk.sh; \
sed -i 's/cd $$(SOURCE); .\/bootstrap/#cd $$(SOURCE); .\/bootstrap/' tools/rbp/depends/xbmc/Makefile; \
sed -i 's/cd $$(SOURCE); $$(CONFIGURE)/#cd $$(SOURCE); $$(CONFIGURE)/' tools/rbp/depends/xbmc/Makefile; \
make -C tools/rbp/depends/xbmc/ || exit; \
touch dezi.tools
xbmc-git/dezi.configure: xbmc-git
$(xbmc-git-env); \
cd xbmc-git; \
./bootstrap || exit; \
./configure \
--prefix=/usr/local \
--build=arm-linux-gnueabihf \
--localstatedir=/var/lib \
--with-platform=raspberry-pi \
--disable-gl --enable-gles --disable-x11 --disable-sdl \
--enable-ccache --enable-optimizations --disable-external-libraries \
--disable-goom --disable-hal --disable-pulse --disable-vaapi \
--disable-vdpau --disable-xrandr --enable-airplay --disable-alsa \
--enable-avahi --enable-libbluray --enable-dvdcss --disable-debug \
--disable-joystick --disable-mid --enable-nfs --disable-profiling \
--disable-projectm --enable-rsxs --enable-rtmp --disable-vaapi \
--disable-vdadecoder --disable-external-ffmpeg \
--enable-optical-drive --enable-player=omxplayer \
|| exit; \
touch dezi.configure
xbmc-git/dezi.make: xbmc-git
cd xbmc-git; \
make; \
xbmc-git-doit: \
xbmc-git/dezi.patch \
xbmc-git/dezi.taglib \
xbmc-git/dezi.shairport \
xbmc-git/dezi.tools \
xbmc-git/dezi.configure \
xbmc-git/dezi.make \
##################################################################
#
# xbmc-fork
#
xbmc-fork:
git clone git@github.com:dezi/xbmc.git xbmc-fork
##################################################################
#
# libcec
#
libcec-git:
git clone --depth 5 https://github.com/Pulse-Eight/libcec.git libcec-git
libcec-git/dezi.done: libcec-git
cd libcec-git; \
export LDFLAGS="-L/opt/vc/lib"; \
./bootstrap || exit; \
./configure --prefix=/usr/local --enable-rpi --with-rpi-include-path="/opt/vc/include" --with-rpi-lib-path="/opt/vc/lib/libbcm_host.so" || exit; \
make || exit; \
sudo make install; \
touch dezi.done
libcec: libcec-git/dezi.done
##################################################################
#
# Update and install required packages.
#
updatepacks-raspi:
sudo apt-get update
sudo apt-get install \
libboost1.49-dev \
libglew-dev:armhf \
libglewmx-dev:armhf \
libjbig-dev:armhf \
java-package \
updatepacks-odroid:
sudo apt-get update
sudo apt-get install \
libglew1.7-dev:armhf \
libglewmx1.7-dev:armhf \
updatepacks:
sudo apt-get update
sudo apt-get install \
autotools-dev comerr-dev dpkg-dev libalsaplayer-dev libapt-pkg-dev:armhf \
libasound2-dev libass-dev:armhf libatk1.0-dev libavahi-client-dev \
libavahi-common-dev libavcodec-dev libavformat-dev libavutil-dev \
libbison-dev:armhf libbluray-dev:armhf \
libbz2-dev:armhf libc-dev-bin libc6-dev:armhf libcaca-dev libcairo2-dev \
libcdio-dev libclalsadrv-dev libcrypto++-dev libcups2-dev libcurl3-gnutls-dev \
libdbus-1-dev libdbus-glib-1-dev libdirectfb-dev libdrm-dev libegl1-mesa-dev \
libelf-dev libenca-dev libept-dev libevent-dev libexpat1-dev libflac-dev:armhf \
libfontconfig1-dev libfreetype6-dev libfribidi-dev libgconf2-dev libgcrypt11-dev \
libgdk-pixbuf2.0-dev libgl1-mesa-dev libgles2-mesa-dev \
libglib2.0-dev libglu1-mesa-dev \
libgnome-keyring-dev libgnutls-dev libgpg-error-dev libgtk2.0-dev libhal-dev \
libhunspell-dev:armhf libice-dev:armhf libicu-dev libidn11-dev libiso9660-dev \
libjasper-dev libjconv-dev libjpeg8-dev:armhf libkrb5-dev \
libldap2-dev:armhf libltdl-dev:armhf liblzo2-dev libmad0-dev libmicrohttpd-dev \
libmodplug-dev libmp3lame-dev:armhf libmpeg2-4-dev libmysqlclient-dev \
libncurses5-dev libnspr4-dev libnss3-dev libogg-dev:armhf libopenal-dev:armhf \
libp11-kit-dev libpam0g-dev:armhf libpango1.0-dev libpcre++-dev libpcre3-dev \
libpixman-1-dev libpng12-dev libprotobuf-dev libpthread-stubs0-dev:armhf \
libpulse-dev:armhf librtmp-dev libsamplerate0-dev:armhf \
libsdl-image1.2-dev:armhf libsdl1.2-dev libslang2-dev:armhf libsm-dev:armhf \
libsmbclient-dev:armhf libspeex-dev:armhf \
libsqlite3-dev libssh-dev libssh2-1-dev libssl-dev libstdc++6-4.6-dev \
libtagcoll2-dev libtasn1-3-dev libtiff4-dev libtinfo-dev:armhf libtinyxml-dev \
libts-dev:armhf libudev-dev libv8-dev libva-dev:armhf libvdpau-dev:armhf \
libvorbis-dev:armhf libvpx-dev:armhf libwebp-dev:armhf libwibble-dev \
libx11-dev:armhf libx11-xcb-dev libxapian-dev libxau-dev:armhf libxcb-glx0-dev:armhf \
libxcb-render0-dev:armhf libxcb-shm0-dev:armhf \
libxcb1-dev:armhf libxcomposite-dev libxcursor-dev:armhf libxdamage-dev \
libxdmcp-dev:armhf libxext-dev:armhf libxfixes-dev libxft-dev libxi-dev \
libxinerama-dev:armhf libxml2-dev:armhf libxmu-dev:armhf libxrandr-dev \
libxrender-dev:armhf libxslt1-dev libxss-dev:armhf libxt-dev:armhf \
libxtst-dev:armhf libxxf86vm-dev libyajl-dev libzip-dev linux-libc-dev:armhf \
lzma-dev mesa-common-dev python-dev python2.7-dev x11proto-composite-dev \
x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev \
x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev \
x11proto-record-dev x11proto-render-dev x11proto-scrnsaver-dev \
x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xtrans-dev \
libnfs-dev libplist-dev avahi-daemon zlib1g-dev:armhf swig \
libafpclient-dev liblockdev1-dev autoconf automake libtool gcc udev openjdk-6-jre \
cmake g++ libudev-dev build-essential autoconf ccache \
gawk gperf mesa-utils zip unzip curl
##################################################################
#
# PVR Addons Frodo
#
xbmc-pvr-addons-frodo:
git clone --depth 5 -b frodo git://github.com/opdenkamp/xbmc-pvr-addons.git xbmc-pvr-addons-frodo
xbmc-pvr-addons-frodo/dezi.done: xbmc-pvr-addons-frodo
cd xbmc-pvr-addons-frodo; \
./bootstrap; \
./configure --prefix=/usr/local --enable-addons-with-dependencies; \
make; \
sudo make install; \
touch dezi.done
pvr-frodo-doit: xbmc-pvr-addons-frodo xbmc-pvr-addons-frodo/dezi.done
##################################################################
#
# xbmc-frodo
#
xbmc-frodo:
git clone --depth 5 -b Frodo git://github.com/xbmc/xbmc.git xbmc-frodo
xbmc-frodo/dezi.patch: xbmc-frodo
cd xbmc-frodo; \
wget https://raw.github.com/xbianonpi/xbian-patches/master/xbmc/patch-XBMC.sh; \
chmod a+x patch-XBMC.sh; \
sh patch-XBMC.sh 12; \
touch dezi.patch
xbmc-frodo/dezi.taglib: xbmc-frodo
cd xbmc-frodo; \
make -C lib/taglib; \
sudo make -C lib/taglib install; \
touch dezi.taglib
xbmc-frodo/dezi.shairport: xbmc-frodo
cd xbmc-frodo; \
make -C lib/libshairport; \
sudo make -C lib/libshairport install; \
touch dezi.shairport
xbmc-frodo/dezi.tools: xbmc-frodo
$(xbmc-git-env); \
cd xbmc-frodo; \
sed -i 's/USE_BUILDROOT=1/USE_BUILDROOT=0/' tools/rbp/setup-sdk.sh; \
sed -i 's/TOOLCHAIN=\/usr\/local\/bcm-gcc/TOOLCHAIN=\/usr/' tools/rbp/setup-sdk.sh; \
sh tools/rbp/setup-sdk.sh; \
sed -i 's/cd $$(SOURCE); .\/bootstrap/#cd $$(SOURCE); .\/bootstrap/' tools/rbp/depends/xbmc/Makefile; \
sed -i 's/cd $$(SOURCE); $$(CONFIGURE)/#cd $$(SOURCE); $$(CONFIGURE)/' tools/rbp/depends/xbmc/Makefile; \
make -C tools/rbp/depends/xbmc/ || exit; \
touch dezi.tools
xbmc-frodo/dezi.configure: xbmc-frodo
$(xbmc-git-env); \
cd xbmc-frodo; \
./bootstrap || exit; \
./configure \
--prefix=/usr/local \
--build=arm-linux-gnueabihf \
--localstatedir=/var/lib \
--with-platform=raspberry-pi \
--disable-gl --enable-gles --disable-x11 --disable-sdl \
--enable-ccache --enable-optimizations --disable-external-libraries \
--disable-goom --disable-hal --disable-pulse --disable-vaapi \
--disable-vdpau --disable-xrandr --enable-airplay --disable-alsa \
--enable-avahi --enable-libbluray --enable-dvdcss --disable-debug \
--disable-joystick --disable-mid --enable-nfs --disable-profiling \
--disable-projectm --enable-rsxs --enable-rtmp --disable-vaapi \
--disable-vdadecoder --disable-external-ffmpeg \
--enable-optical-drive --enable-player=omxplayer \
|| exit; \
touch dezi.configure
xbmc-frodo/dezi.make: xbmc-frodo
cd xbmc-frodo; \
make; \
xbmc-frodo-doit: \
xbmc-frodo/dezi.taglib \
xbmc-frodo/dezi.shairport \
xbmc-frodo/dezi.tools \
xbmc-frodo/dezi.configure \
xbmc-frodo/dezi.make \
xbmc-frodo-dontdoit: \
xbmc-frodo/dezi.patch \