-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile.picoreplayer-aarch64
335 lines (251 loc) · 10.7 KB
/
Makefile.picoreplayer-aarch64
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
################################################################################
# Squeezeplay makefile for picoreplayer raspberry pi aarch64
# Copyright 2007 Logitech
# Copyright 2021 Ralph Irving
################################################################################
# Additional packages required to build
#
# tce-load -i compiletc squashfs-tools readline-dev libasound-dev patchelf svnclient
#
# Checkout the touchscreen library
#
# svn checkout https://github.com/ralph-irving/tcz-libts.git/trunk/libts-1.0
#
# Need to uncomment the PATH line which includes /usr/sbin in squeezeplay.sh for the arp command
#
# Absolute path to top of SQUEEZEPLAY directories
#
SRC_DIR = $(realpath ${PWD})
BASE_DIR = $(dir ${SRC_DIR})
export BUILD_TOP=$(BASE_DIR)build/linux
DESTDIR=${BUILD_TOP}
export PREFIX=${DESTDIR}
export CFLAGS=-I${PREFIX}/include -I${PREFIX}/include/SDL -I${PREFIX}/include/freetype2 -pipe -s -O2 -march=armv8-a+crc -mtune=cortex-a72
export CPPFLAGS=-I${PREFIX}/include -I${PREFIX}/include/SDL -I${PREFIX}/include/freetype2
export CXXFLAGS=-I${PREFIX}/include -I${PREFIX}/include/SDL -I${PREFIX}/include/freetype2 -pipe -s -O2 -march=armv8-a+crc -mtune=cortex-a72 -fno-exceptions -fno-rtti
export LDFLAGS=-s -L${PREFIX}/lib
export TOOLPATH = $(shell dirname `which gcc`)
export SDL_CONFIG = ${BUILD_TOP}/bin/sdl-config
# BUILD=aarch64-unknown-linux-gnu
# ENABLE_SHAREDLIBS=--build=${BUILD} --enable-shared=yes --enable-static=no
ENABLE_SHAREDLIBS=--enable-shared=yes --enable-static=no
USE_MMX=--disable-mmx
#
# Top level targets
#
.PHONY: all
all: sdl-all lua-all app
#####
# SDL
#####
.PHONY: sdl-all freetype sdl sdl-image sdl-tff sdl-gfx c-ares
sdl-all: zlib expat freetype tslib sdl libpng libjpeg sdl-image sdl-ttf sdl-gfx
generated:
mkdir -p generated
# zlib
zlib-1.2.11/Makefile:
cd zlib-1.2.11; ./configure --shared --prefix=${PREFIX}
zlib: zlib-1.2.11/Makefile
cd zlib-1.2.11; make; make prefix=${PREFIX} install
-rm -f ${PREFIX}/lib/libz.a
# expat
expat-2.0.1/Makefile:
cd expat-2.0.1; ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
expat: expat-2.0.1/Makefile
cd expat-2.0.1; make; make prefix=${PREFIX} install
# freetype
freetype-2.4.2/config.mk:
cd freetype-2.4.2; ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
freetype: freetype-2.4.2/config.mk
cd freetype-2.4.2; make; make install
# png
libpng-1.2.59/Makefile:
cd libpng-1.2.59; ./configure --enable-static=no --prefix=${PREFIX}
libpng: libpng-1.2.59/Makefile
cd libpng-1.2.59; make && make install
# jpeg
jpeg-9d/Makefile:
-mkdir -p ${BUILD_TOP}/man/man1
cd jpeg-9d; ./configure --enable-static=no --prefix=${PREFIX}
libjpeg: jpeg-9d/Makefile
cd jpeg-9d; make && make install
# tslib
libts-1.0/Makefile:
cd libts-1.0; ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
tslib: libts-1.0/Makefile
cd libts-1.0; make && make install
# sdl
SDL-1.2.15/Makefile:
cd SDL-1.2.15; ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS} --enable-audio=no --enable-video --enable-events --enable-joystick=no --enable-cdrom=no --enable-threads --enable-timers --enable-file --enable-loadso --enable-esd=no --enable-arts=no --enable-esd-shared=no --enable-clock_gettime --enable-video-x11=no --enable-video-opengl=no --enable-video-dummy=no --enable-video-directfb=no --enable-pulseaudio=no --enable-input-tslib=yes
sdl: SDL-1.2.15/Makefile
cd SDL-1.2.15; make && make install
# sdl_image (requires jpeg tiff png)
SDL_image-1.2.5/Makefile:
cd SDL_image-1.2.5; SDL_CONFIG=${PREFIX}/bin/sdl-config ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS} --disable-tif ${LIBPNG} ${LIBJPEG}
sdl-image: SDL_image-1.2.5/Makefile
cd SDL_image-1.2.5; make && make install
# sdl_ttf
SDL_ttf-2.0.11/Makefile:
cd SDL_ttf-2.0.11; SDL_CONFIG=${PREFIX}/bin/sdl-config ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS} --with-freetype-prefix=${PREFIX} --without-opengl
sdl-ttf: SDL_ttf-2.0.11/Makefile
cd SDL_ttf-2.0.11; make && make install
# sdl_gfx
SDL_gfx-2.0.15/Makefile:
cd SDL_gfx-2.0.15; ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS} ${USE_MMX}
sdl-gfx: SDL_gfx-2.0.15/Makefile
cd SDL_gfx-2.0.15; make && make install
#####
# lua
#####
.PHONY: lua-all lua luasocket slnunicode luajson loop luaexpat luafilesystem luaprofiler luazipfilter luamd5
lua-all: lua tolua++ luasocket slnunicode luajson loop luaexpat luafilesystem luaprofiler luazipfilter luamd5
# lua (requires readline ncurses)
lua:
cd lua-5.1.5; make linux INSTALL_TOP=${PREFIX} && make install INSTALL_TOP=${PREFIX}
# luasocket (requires lua)
luasocket: lua
cd luasocket-2.0.2; make install LD="gcc -shared" INSTALL_TOP=${PREFIX} TARGET=$(TARGET) PLATFORM=linux
slnunicode: lua
cd slnunicode-1.1; make install INSTALL_TOP=${PREFIX} TARGET=$(TARGET) PLATFORM=linux
luajson/Makefile:
cd luajson; ./configure --prefix=${PREFIX}
luajson: luajson/Makefile
cd luajson; make && cp .libs/json.so ${PREFIX}/lib/lua/5.1/json.so
luazipfilter/Makefile:
cd luazipfilter; ./configure --prefix=${PREFIX}
luazipfilter: luazipfilter/Makefile
cd luazipfilter; make && cp .libs/zipfilter.so ${PREFIX}/lib/lua/5.1/zipfilter.so
luamd5:
cd luamd5; make G="${CFLAGS}" LUA=${PREFIX} MYNAME=sha1 MYLDFLAGS="${LDFLAGS}"
cd luamd5; make G="${CFLAGS}" LUA=${PREFIX} MYNAME=md5 MYLDFLAGS="${LDFLAGS}"
cp luamd5/md5.so ${PREFIX}/lib/lua/5.1/md5.so
cp luamd5/sha1.so ${PREFIX}/lib/lua/5.1/sha1.so
loop:
-mkdir ${PREFIX}/share/lua/5.1/loop
-mkdir ${PREFIX}/share/lua/5.1/loop/collection
-mkdir ${PREFIX}/share/lua/5.1/loop/debug
cd loop-2.2-alpha; install loop/base.lua ${PREFIX}/share/lua/5.1/loop/.
cd loop-2.2-alpha; install loop/simple.lua ${PREFIX}/share/lua/5.1/loop/.
cd loop-2.2-alpha; install loop/table.lua ${PREFIX}/share/lua/5.1/loop/.
cd loop-2.2-alpha; install loop/collection/ObjectCache.lua ${PREFIX}/share/lua/5.1/loop/collection/.
cd loop-2.2-alpha; install loop/debug/Viewer.lua ${PREFIX}/share/lua/5.1/loop/debug/.
luaexpat: lua expat
cd luaexpat-1.0.2; make PREFIX=${PREFIX} PLATFORM=linux && make install PREFIX=${PREFIX} PLATFORM=linux
luafilesystem:
cd luafilesystem-1.2 && make install PREFIX=${PREFIX} PLATFORM=linux
luaprofiler:
cd luaprofiler-2.0.2 && make -f Makefile.linux install
# just compile the library for to tolua++
.PHONY: tolua++
tolua++: lua
cd tolua++-1.0.92/src/lib; ${CC} -shared -fPIC -o libtolua++.so -I../../include -I${PREFIX}/include *.c
mkdir -p ${PREFIX}/lib
install tolua++-1.0.92/include/tolua++.h ${PREFIX}/include
install tolua++-1.0.92/src/lib/libtolua++.so ${PREFIX}/lib
#
# squeezeplay
#
.PHONY: app fdkaac libogg flac libmad tremor squeezeplay squeezeplay_desktop squeezeplay_contrib freefont freefont-debian rtmp
app: fdkaac libogg flac libmad tremor ${SPPRIVATE_TARGETS} squeezeplay squeezeplay_desktop squeezeplay_contrib freefont rtmp squeezeplay-tgz
fdk-aac-2.0.1/Makefile:
cd fdk-aac-2.0.1; ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
fdkaac: fdk-aac-2.0.1/Makefile
cd fdk-aac-2.0.1; make; make install
# libogg
libogg-1.2.2/Makefile:
cd libogg-1.2.2; ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
libogg: libogg-1.2.2/Makefile
cd libogg-1.2.2; make && make install
# flac
flac-1.2.1/Makefile:
cd flac-1.2.1; ./configure --disable-oggtest --disable-cpplibs --disable-xmms-plugin --with-ogg-libraries=${PREFIX}/lib --with-ogg-includes=${PREFIX}/include --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
flac: flac-1.2.1/Makefile
cd flac-1.2.1; make && make install
#libmad
LIBMAD_DIR=libmad-0.15.1b-11
generated/${LIBMAD_DIR}/Makefile.am:
mkdir -p generated
cd generated; tar -xzf ../${LIBMAD_DIR}.tar.gz
generated/${LIBMAD_DIR}/Makefile: generated/${LIBMAD_DIR}/Makefile.am
cd generated/${LIBMAD_DIR}; ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
libmad: generated/${LIBMAD_DIR}/Makefile.am generated/${LIBMAD_DIR}/Makefile
cd generated/${LIBMAD_DIR}; make && make install
# ogg
Tremor/Makefile:
cd Tremor; CFLAGS="-DSQUEEZEPLAY ${CFLAGS}" ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
tremor: Tremor/Makefile
cd Tremor; make && make install
rtmp: squeezeplay
cd luartmp-squeezeplay; make
cp luartmp-squeezeplay/rtmp.so ${PREFIX}/lib/lua/5.1/rtmp.so
# squeezeplay
squeezeplay/Makefile:
cd squeezeplay; SDL_CONFIG=${SDL_CONFIG} ./configure ${ENABLE_SPPRIVATE} --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
squeezeplay: squeezeplay/Makefile
cd squeezeplay; make && make install
squeezeplay_desktop/Makefile:
cd squeezeplay_desktop; SDL_CONFIG=${SDL_CONFIG} ./configure --prefix=${PREFIX} ${ENABLE_SHAREDLIBS}
squeezeplay_desktop: squeezeplay_desktop/Makefile
cd squeezeplay_desktop; make install
cp squeezeplay_desktop/squeezeplay.sh ${PREFIX}/bin/
chmod +x ${PREFIX}/bin/squeezeplay.sh
# cd /lib; tar -cf - libgcc_s\.* | (cd ${PREFIX}/lib; tar -xf -)
cd ${PREFIX} && patch -p1 -i ../../src/disable-server-version-check.patch
squeezeplay_contrib: squeezeplay/Makefile
cd squeezeplay_contrib; make PREFIX=${PREFIX}
# freefont
freefont:
mkdir -p ${PREFIX}/share/jive/fonts
cp freefont-20090104/FreeSans.ttf ${PREFIX}/share/jive/fonts
cp freefont-20090104/FreeSansBold.ttf ${PREFIX}/share/jive/fonts
#
# This builds the .tarball. It's called by 'all' so no need to run it manually
#
squeezeplay-tgz: squeezeplay/Makefile
cd squeezeplay; make squeezeplay-tgz
#
# Allow user to call the -deb build and it runs both the 'all' and then packages it
#
.PHONY: squeezeplay-deb
squeezeplay-deb: all squeezeplay-deb-make
squeezeplay-deb-make: squeezeplay/Makefile
cd squeezeplay; make squeezeplay-deb
.PHONY: clean_generated
clean_generated:
@echo "----------------------------------------------------------"
@echo "Cleaning: generated dir"
-rm -rf generated
#
# clean
#
.PHONY: clean
clean:
-cd zlib-1.2.11; make distclean; rm -f Makefile
-cd expat-2.0.1; make distclean
-cd freetype-2.4.2; make distclean
-cd libpng-1.2.59; make distclean
-cd jpeg-9d; make distclean
-cd libts-1.0; make distclean; rm -f Makefile
-cd SDL-1.2.15; make distclean; rm -f include/SDL_config.h sdl.pc;
-cd SDL_image-1.2.5; make distclean
-cd SDL_ttf-2.0.11; make distclean
-cd SDL_gfx-2.0.15; make distclean
-cd lua-5.1.5; make clean
-cd luasocket-2.0.2; make clean PLATFORM=linux
-cd slnunicode-1.1; make clean PLATFORM=linux
-cd luaexpat-1.0.2; make clean PLATFORM=linux
-cd luafilesystem-1.2; make clean PLATFORM=linux
-cd luajson; make distclean
-cd luazipfilter; make distclean
-cd luaprofiler-2.0.2; make -f Makefile.linux clean
-cd luamd5; make MYNAME=sha1 clean
-cd luamd5; make MYNAME=md5 clean
-cd tolua++-1.0.92/src/lib; rm libtolua++.so; rm *.o
-cd fdk-aac-2.0.1; make distclean
-cd libogg-1.2.2; make distclean
-cd Tremor; make distclean
-cd flac-1.2.1; make distclean; rm src/libFLAC++/flac++.pc; find . -type f -name Makefile -exec rm {} \; ; find . -type d -name '.deps' -exec rm -rf {} \;
-cd squeezeplay; make distclean; rm src/version.h
-cd squeezeplay_desktop; make distclean
-cd $(BASE_DIR)build; rm -rf linux
-rm -rf generated