]> sigrok.org Git - sigrok-util.git/blobdiff - cross-compile/linux/sigrok-cross-linux
Create README
[sigrok-util.git] / cross-compile / linux / sigrok-cross-linux
index ae9195970b51852544a262d38fbe48eaed6e446d..c7ae22ef05e3ec8f0a2b92376f0a445bfd783237 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 ##
 ## This file is part of the sigrok-util project.
 ##
@@ -36,9 +36,17 @@ BUILDDIR=./build
 # The path where the libsigrok Python bindings will be installed.
 PYPATH=$PREFIX/lib/python2.7/site-packages
 
+# Edit this to control verbose build output.
+# V="V=1 VERBOSE=1"
+
 # Edit this to enable/disable/modify parallel compiles.
 PARALLEL="-j 2"
 
+# Uncomment the following lines to build with clang and run scan-build.
+# export CC=clang
+# export CXX=clang++
+# SB="scan-build -k -v"
+
 # You usually don't need to change anything below this line.
 
 # -----------------------------------------------------------------------------
@@ -62,8 +70,8 @@ cd libserialport
 mkdir build
 cd build
 ../configure $C
-make $PARALLEL
-make install
+$SB make $PARALLEL $V
+make install $V
 cd ../..
 
 # libsigrok
@@ -74,8 +82,9 @@ cd libsigrok
 mkdir build
 cd build
 PKG_CONFIG_PATH=$P ../configure $C
-make $PARALLEL
-PYTHONPATH=$PYPATH make install
+$SB make $PARALLEL $V
+PYTHONPATH=$PYPATH $SB make install $V
+$SB make check $V
 cd ../..
 
 # libsigrokdecode
@@ -85,8 +94,9 @@ cd libsigrokdecode
 mkdir build
 cd build
 PKG_CONFIG_PATH=$P ../configure $C
-make $PARALLEL
-make install
+$SB make $PARALLEL $V
+make install $V
+$SB make check $V
 cd ../..
 
 # sigrok-firmware
@@ -97,7 +107,7 @@ mkdir build
 cd build
 # Nothing gets cross-compiled here, we just need 'make install' basically.
 ../configure $C
-make install
+make install $V
 cd ../..
 
 # sigrok-firmware-fx2lafw
@@ -108,8 +118,8 @@ mkdir build
 cd build
 # We're building the fx2lafw firmware on the host, no need to cross-compile.
 ../configure $C
-make $PARALLEL
-make install
+make $PARALLEL $V
+make install $V
 cd ../..
 
 # sigrok-cli
@@ -119,8 +129,8 @@ cd sigrok-cli
 mkdir build
 cd build
 PKG_CONFIG_PATH=$P ../configure $C
-make $PARALLEL
-make install
+$SB make $PARALLEL $V
+make install $V
 cd ../..
 
 # PulseView
@@ -128,8 +138,8 @@ $GIT_CLONE git://sigrok.org/pulseview
 cd pulseview
 mkdir build
 cd build
-PKG_CONFIG_PATH=$P cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y -DENABLE_DECODE=y ..
-make $PARALLEL
-make install
+PKG_CONFIG_PATH=$P $SB cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y -DENABLE_TESTS=y ..
+$SB make $PARALLEL $V
+make install $V
+$SB make test $V
 cd ../..
-