Debian Codegraph @

docker/images/armabuild/build_libsdl_image.sh

raw
1 #!/bin/bash
2
3 # usage: $0 <name of library directory>, e.g. SDL_image-1.2.12
4 set -x
5 archive=$1
6
7 # if it already exists (Steam SDK), don't bother
8 test -r /usr/include/SDL/SDL_image.h && exit 0
9
10 # from debian, mostly
11 confflags="--disable-jpg-shared \
12 --disable-tif \
13 --disable-png-shared \
14 "
15
16 # fetch
17 curl https://www.libsdl.org/projects/SDL_image/release/${archive}.tar.gz -o ${archive}.tar.gz || exit $?
18
19 # unpack, configure, build, install, cleanup
20 tar -xzf ${archive}.tar.gz
21 rm ${archive}.tar.gz
22 cd ${archive}
23 CFLAGS="-Os -pipe" LDFLAGS="-Wl,--as-needed" ./configure --prefix=/usr/ ${confflags} || exit $?
24 make -j 5 || exit $?
25 make install || exit $?
26 cd .. && rm -rf ${archive}
27