# The path where to download files to and where to build packages.
BUILDDIR=./build
+# Edit this to control verbose build output.
+# V="V=1 VERBOSE=1"
+
# Edit this to enable/disable/modify parallel compiles.
PARALLEL="-j 2"
tar xfJ Python-$VER_PYTHON.tar.xz
cd Python-$VER_PYTHON
./configure
-make python
+make python $V
mv python hostpython
cd ..
# Python (needed for libsigrokdecode)
# Don't do parallel Python builds, this doesn't seem to work well.
cd Python-$VER_PYTHON
-make distclean
+make distclean $V
autoreconf
patch -p1 < ../../Python-$VER_PYTHON.patch
ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no ac_cv_func_pipe2=no ac_cv_func_fdatasync=no ac_cv_func_killpg=no ac_cv_func_waitid=no ac_cv_func_sigaltstack=no ./configure $C --build=x86_64-linux-gnu --disable-ipv6
sed -i "s/^#zlib/zlib/g" Modules/Setup
-make PYTHON_FOR_BUILD='_PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) ./hostpython' install
+make PYTHON_FOR_BUILD='_PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) ./hostpython' install $V
cd ..
# libiconv (needed for glib)
cp -f ../config/config.guess libcharset/build-aux
cp -f ../config/config.sub libcharset/build-aux
./configure $C --enable-shared
-make lib/localcharset.h
+make lib/localcharset.h $V
cd libcharset
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ../lib
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ..
test -d $PREFIX/include || mkdir $PREFIX/include
cp include/iconv.h.inst $PREFIX/include/iconv.h
cd gettext-$VER_GETTEXT
./configure $C --enable-shared --disable-libasprintf
cd gettext-runtime
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ../..
# zlib (needed for glib and libzip)
cd zlib-$VER_ZLIB
# Note: zlib's configure doesn't understand --host, we need to pass $CC.
CC="$TOOLCHAIN_TRIPLET-gcc $SYSROOT" ./configure --prefix=$PREFIX
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ..
# pcre (needed for glib)
tar xfz pcre-$VER_PCRE.tar.gz
cd pcre-$VER_PCRE
./configure $C --disable-cpp
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ..
# libffi (needed for glib)
tar xfz libffi-$VER_LIBFFI.tar.gz
cd libffi-$VER_LIBFFI
./configure $C
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ..
# glib (needed for libsigrok)
NOCONFIGURE=yes ./autogen.sh
# Note: Manual LDFLAGS/CPPFLAGS needed for libiconv, rest uses pkg-config.
LDFLAGS=-L$PREFIX/lib CPPFLAGS=-I$PREFIX/include glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=no ac_cv_func_posix_getgrgid_r=no ./configure --disable-compile-warnings $C
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ..
# libzip (needed for libsigrok)
cp -f ../config/config.guess .
cp -f ../config/config.sub .
./configure $C
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ..
# libusb-1.0 (needed for libsigrok)
cd libusb-$VER_LIBUSB
patch -p1 < ../../libusb-1.0.patch
./configure $C --disable-udev
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ..
# libftdi1 (needed for libsigrok)
tar xfj libftdi1-$VER_LIBFTDI1.tar.bz2
cd libftdi1-$VER_LIBFTDI1
cmake $CM -DFTDIPP=no -DDOCUMENTATION=no -DEXAMPLES=no -DFTDI_EEPROM=no -DPYTHON_BINDINGS=no .
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
cd ..
# libserialport
mkdir build
cd build
../configure $C
-make $PARALLEL V=1
-make install
+make $PARALLEL $V
+make install $V
cd ../..
# Build dependencies for libsigrok bindings if needed
cp -f ../config/config.guess build
cp -f ../config/config.sub build
CPPFLAGS="$CPPFLAGS_STL" LDFLAGS="$LDFLAGS_STL -lgnustl_shared" ./configure --disable-documentation $C
- make $PARALLEL
- make install
+ make $PARALLEL $V
+ make install $V
cd ..
# glibmm (needed for libsigrok bindings)
tar xfJ glibmm-$VER_GLIB.tar.xz
cd glibmm-$VER_GLIB
CPPFLAGS="$CPPFLAGS_STL" LDFLAGS="$LDFLAGS_STL -lgnustl_shared" ./configure --disable-documentation $C
- make $PARALLEL
- make install
+ make $PARALLEL $V
+ make install $V
cd ..
fi
mkdir build
cd build
CPPFLAGS="$CPPFLAGS_STL" LDFLAGS="$LDFLAGS_STL" ../configure $C $BINDINGS_CONFIG --datadir=/sdcard
-make $PARALLEL V=1
-make datadir='$(datarootdir)' install
+make $PARALLEL $V
+make datadir='$(datarootdir)' install $V
cd ../..
# libsigrokdecode
mkdir build
cd build
../configure $C
-make $PARALLEL V=1
-make install
+make $PARALLEL $V
+make install $V
cd ../..
# sigrok-cli
mkdir build
cd build
../configure $C
-make $PARALLEL V=1
-make install
+make $PARALLEL $V
+make install $V
cd ../..
# Check if we have all requirements to build PulseView:
cd qt-everywhere-opensource-src-${VER_QT}
patch -p1 < ../../android-qt.patch
CC= CXX= ./configure --prefix="$PREFIX" -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-sdk "$ANDROID_SDK" -android-ndk "$ANDROID_NDK" -android-ndk-host "$NDK_HOST" -android-arch "$TARGET_ARCH" -android-toolchain-version "$NDK_TOOLCHAIN_VERSION" -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -skip qtlocation -skip qtconnectivity -opensource -confirm-license
-make module-qtbase module-qtandroidextras module-qtsvg module-qtimageformats $PARALLEL
-make install
+make module-qtbase module-qtandroidextras module-qtsvg module-qtimageformats $PARALLEL $V
+make install $V
cd ..
# sigrok-androidutils
cd sigrok-androidutils
./autogen.sh
./configure $C --with-android-sdk="${ANDROID_SDK}"
-make $PARALLEL V=1
-make install
+make $PARALLEL $V
+make install $V
cd ..
# Strip all shared libs to reduce size.
$GIT_CLONE git://sigrok.org/pulseview
cd pulseview
cmake $CM .
-make $PARALLEL VERBOSE=1
-make install
+make $PARALLEL $V
+make install $V
${TOOLCHAIN_TRIPLET}-strip -S libs/$TARGET_ARCH/libpulseview.so
cd android
"${ANDROID_SDK}/tools/android" update project -p . -t android-14 -n PulseView