Skip to content

Commit

Permalink
configure: Clean-up how/when options are set and add project.config o…
Browse files Browse the repository at this point in the history
…verride file
  • Loading branch information
andoma committed Feb 10, 2016
1 parent 1cdff24 commit 5a84531
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 92 deletions.
24 changes: 12 additions & 12 deletions configure.android
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ show_help(){
exit 1
}

enable sqlite_internal
enable glw_backend_opengl_es
enable glw
#enable librtmp
enable httpserver
enable libfreetype
enable stdin
enable openssl

[ -f project.config ] && source project.config

for opt do
optval="${opt#*=}"
case "$opt" in
Expand Down Expand Up @@ -81,14 +92,6 @@ if [ ! -f "${CC}" ]; then
${NDK}/build/tools/make-standalone-toolchain.sh --platform=${ANDROID_API} --install-dir=${TOPDIR}/build.android/toolchain --toolchain=${ANDROID_EABI}
fi

enable sqlite_internal
enable glw_backend_opengl_es
enable glw
#enable librtmp
enable httpserver
enable libfreetype
enable stdin
enable openssl

bzip2_setup
freetype_setup --host=arm-linux-gnueabihf
Expand All @@ -100,11 +103,8 @@ LIBAV_CFLAGS="-I${EXT_INSTALL_DIR}/include ${ARCH_CFLAGS}"
LIBAV_LDFLAGS="-L${EXT_INSTALL_DIR}/lib ${ARCH_LDFLAGS}"
LIBAV_ARCH_FLAGS="--cross-prefix=${TOOLCHAIN} --enable-cross-compile --arch=armv7 --target-os=android --enable-shared --disable-static"

libav_setup
rtmpdump_setup
xmp_setup
ext_setup
libyuv_setup
gumbo_setup

cat >> ${CONFIG_MAK} <<EOF
CFLAGS_arch = ${ARCH_CFLAGS}
Expand Down
19 changes: 7 additions & 12 deletions configure.linux
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ fatal() {
}


enable libpthread
enable zlib
enable dvd
enable dvd_linux
enable libfreetype
enable libfontconfig
enable libpulse
Expand All @@ -104,6 +108,8 @@ enable webkit
#enable airplay -- not functional yet
#enable libxrandr -- code does not really work yet

[ -f project.config ] && source project.config

for opt do
optval="${opt#*=}"
case "$opt" in
Expand All @@ -115,9 +121,6 @@ for opt do
;;
--arch=*) ARCH="$optval"
;;
--enable-all)
enable libgme
;;
--glw-frontend=*) GLWFRONTEND="$optval"
;;
--pkg-config-path=*) export PKG_CONFIG_PATH="$optval"
Expand Down Expand Up @@ -160,11 +163,6 @@ done

setup_env "$@"

enable libpthread
enable zlib
enable dvd
enable dvd_linux


#
# pkgconfig
Expand Down Expand Up @@ -584,10 +582,7 @@ fi


LIBAV_ARCH_FLAGS="--disable-shared --enable-static"
libav_setup
rtmpdump_setup
xmp_setup
gumbo_setup
ext_setup

#
# Finalize
Expand Down
35 changes: 19 additions & 16 deletions configure.nacl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ show_help(){
exit 1
}


enable sqlite_internal
enable libfreetype
enable trex
enable emu_thread_specifics
enable glw
enable polarssl
enable httpserver
enable sqlite_vfs
enable sqlite_locking
enable glw_backend_opengl_es


disable xmp
disable ftpserver
disable netlog

[ -f project.config ] && source project.config

for opt do
optval="${opt#*=}"
case "$opt" in
Expand Down Expand Up @@ -71,22 +90,6 @@ LIBAV_CFLAGS="-I${EXT_INSTALL_DIR}/include"
LIBAV_LDFLAGS="-L${EXT_INSTALL_DIR}/lib"
LIBAV_ARCH_FLAGS="--cross-prefix=${TOOLCHAIN} --enable-cross-compile --arch=i686 --target-os=linux --disable-asm --disable-inline-asm --disable-programs --disable-ssse3 --disable-mmx --disable-mmxext --disable-amd3dnow --disable-amd3dnowext"

enable sqlite_internal
enable libfreetype
enable trex
enable emu_thread_specifics
enable glw
enable polarssl
enable httpserver
enable sqlite_vfs
enable sqlite_locking
enable glw_backend_opengl_es


disable xmp
disable ftpserver
disable netlog

zlib_setup
bzip2_setup
freetype_setup --host=i686-none-nacl
Expand Down
12 changes: 5 additions & 7 deletions configure.osx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ enable librtmp
enable dvd
enable fsevents
enable webpopup
enable libpthread
enable zlib

[ -f project.config ] && source project.config

for opt do
optval="${opt#*=}"
Expand Down Expand Up @@ -79,9 +83,6 @@ done

setup_env "$@"

enable libpthread
enable zlib

MACOSXSDK_CFLAGS="-mmacosx-version-min=10.8"
MACOSXSDK_LDFLAGS="$MACOSXSDK_CFLAGS"
LIBAV_CFLAGS="$MACOSXSDK_CFLAGS"
Expand Down Expand Up @@ -113,10 +114,7 @@ freetype_setup
export -n CFLAGS

LIBAV_ARCH_FLAGS="--disable-shared --enable-static"
libav_setup
rtmpdump_setup
xmp_setup
gumbo_setup
ext_setup

#
# Some compatibility defines
Expand Down
46 changes: 25 additions & 21 deletions configure.ps3
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,32 @@ LIBAV_CFLAGS="-mminimal-toc -I${PSL1GHT}/target/include -B${PSL1GHT}/target/lib

LIBAV_ARCH_FLAGS="--cross-prefix=${PS3DEV}/host/ppu/bin/ppu- --enable-cross-compile --arch=powerpc64 --cpu=cell --target-os=none --malloc-prefix=my --disable-shared --enable-static"


enable sqlite_internal
enable libfreetype
enable emu_thread_specifics
enable glw_frontend_ps3
enable glw_backend_rsx
enable glw
enable polarssl
enable librtmp
enable httpserver
enable dvd
enable sqlite_vfs
enable sqlite_locking
enable tlsf
enable webpopup
enable libntfs


show_help(){
common_help
echo " --logtarget=HOST:PORT Log to HOST:PORT via UDP [disabled]"
exit 1
}

[ -f project.config ] && source project.config

for opt do
optval="${opt#*=}"
case "$opt" in
Expand All @@ -44,34 +64,18 @@ done
setup_env "$@"


enable sqlite_internal
enable libfreetype
enable emu_thread_specifics
enable glw_frontend_ps3
enable glw_backend_rsx
enable glw
enable polarssl
enable librtmp
enable httpserver
enable dvd
enable sqlite_vfs
enable sqlite_locking
enable tlsf
enable webpopup

mkdir -p ${BUILDDIR}/libav
${PS3DEV}/host/ppu/bin/ppu-gcc -c -o ${BUILDDIR}/libav/mallocstub.o ${TOPDIR}/support/mallocstub.c
LIBAV_LDFLAGS="${BUILDDIR}/libav/mallocstub.o"

libav_setup
rtmpdump_setup
xmp_setup
bzip2_setup
gumbo_setup
ext_setup


enable libntfs
update_ext_submodule libntfs_ext

if enabled libntfs; then
update_ext_submodule libntfs_ext
fi
cat >> ${CONFIG_MAK} <<EOF
CFLAGS_cfg += -mminimal-toc -DWORDS_BIGENDIAN
CFLAGS_cfg += -DPATH_MAX=512 -DPS3
Expand Down
47 changes: 23 additions & 24 deletions configure.rpi
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,28 @@ CONFIGURE_POSTFIX="rpi"

source support/configure.inc

enable sqlite_internal
enable glw_backend_opengl_es
enable glw
enable polarssl
enable librtmp
enable httpserver
enable dvd
enable libfreetype
enable stdin
enable realpath
enable bspatch
enable libcec
enable avahi
enable connman

show_help(){
common_help
exit 1
}

[ -f project.config ] && source project.config

for opt do
optval="${opt#*=}"
case "$opt" in
Expand All @@ -35,19 +52,6 @@ CXX=${TOOLCHAIN}g++
setup_env "$@"


enable sqlite_internal
enable glw_backend_opengl_es
enable glw
enable polarssl
enable librtmp
enable httpserver
enable dvd
enable libfreetype
enable stdin
enable realpath
enable bspatch
enable libcec

LIBAV_CFLAGS="-I${EXT_INSTALL_DIR}/include"
LIBAV_LDFLAGS="-L${EXT_INSTALL_DIR}/lib"
LIBAV_ARCH_FLAGS="--cross-prefix=${TOOLCHAIN} --enable-cross-compile --arch=arm --target-os=linux"
Expand Down Expand Up @@ -78,15 +82,14 @@ if [ -n "$SYSROOT" ]; then
echo >>${CONFIG_MAK} "CFLAGS_cfg += " `pkg-config --cflags gio-2.0`
echo "Using gio: `pkg-config --modversion gio-2.0`"

echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs avahi-client`
echo >>${CONFIG_MAK} "CFLAGS_AVAHI += "`pkg-config --cflags avahi-client`
echo "Using AVAHI client: `pkg-config --modversion avahi-client`"
enable avahi
if enabled avahi; then
echo >>${CONFIG_MAK} "LDFLAGS_cfg += " `pkg-config --libs avahi-client`
echo >>${CONFIG_MAK} "CFLAGS_AVAHI += "`pkg-config --cflags avahi-client`
echo "Using AVAHI client: `pkg-config --modversion avahi-client`"
fi

echo >>${CONFIG_MAK} "LDFLAGS_cfg += -lbz2"

enable connman

if [ -z "$VCROOT" ]; then
VCROOT="${SYSROOT}/usr"
fi
Expand All @@ -97,11 +100,7 @@ else
freetype_setup --host=arm-linux-gnueabihf
fi


libav_setup
rtmpdump_setup
xmp_setup
gumbo_setup
ext_setup

cat >> ${CONFIG_MAK} <<EOF
CFLAGS_std += -fgnu89-inline
Expand Down
8 changes: 8 additions & 0 deletions support/configure.inc
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,14 @@ gumbo_setup() {
}


ext_setup() {
libav_setup
rtmpdump_setup
xmp_setup
gumbo_setup
}


#
#
#
Expand Down

0 comments on commit 5a84531

Please sign in to comment.