]> sigrok.org Git - sigrok-util.git/commitdiff
sigrok-cross-linux: Add facility to allow building with clang.
authorUwe Hermann <redacted>
Fri, 31 Oct 2014 22:52:01 +0000 (23:52 +0100)
committerUwe Hermann <redacted>
Fri, 31 Oct 2014 22:52:01 +0000 (23:52 +0100)
cross-compile/linux/sigrok-cross-linux

index 8dd770d9ef921a12eed0418f6dace9aa4e108b71..6e119b0ad03c519c55438141f58f1af9fc0bfbbd 100755 (executable)
@@ -39,6 +39,11 @@ PYPATH=$PREFIX/lib/python2.7/site-packages
 # 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,7 +67,7 @@ cd libserialport
 mkdir build
 cd build
 ../configure $C
-make $PARALLEL
+$SB make $PARALLEL
 make install
 cd ../..
 
@@ -74,9 +79,9 @@ cd libsigrok
 mkdir build
 cd build
 PKG_CONFIG_PATH=$P ../configure $C
-make $PARALLEL
-PYTHONPATH=$PYPATH make install
-make check
+$SB make $PARALLEL
+PYTHONPATH=$PYPATH $SB make install
+$SB make check
 cd ../..
 
 # libsigrokdecode
@@ -86,9 +91,9 @@ cd libsigrokdecode
 mkdir build
 cd build
 PKG_CONFIG_PATH=$P ../configure $C
-make $PARALLEL
+$SB make $PARALLEL
 make install
-make check
+$SB make check
 cd ../..
 
 # sigrok-firmware
@@ -121,7 +126,7 @@ cd sigrok-cli
 mkdir build
 cd build
 PKG_CONFIG_PATH=$P ../configure $C
-make $PARALLEL
+$SB make $PARALLEL
 make install
 cd ../..
 
@@ -130,8 +135,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_TESTS=y ..
-make $PARALLEL
+PKG_CONFIG_PATH=$P $SB cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y -DENABLE_TESTS=y ..
+$SB make $PARALLEL
 make install
 cd ../..