]> sigrok.org Git - sigrok-util.git/blobdiff - cross-compile/linux/sigrok-cross-linux
Add sigrok-fwextract-dreamsourcelab-dslogic script and manpage.
[sigrok-util.git] / cross-compile / linux / sigrok-cross-linux
index 8dd770d9ef921a12eed0418f6dace9aa4e108b71..2a4ff9da9137de1c872011e318fd061dcc8fe8e5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 ##
 ## This file is part of the sigrok-util project.
 ##
@@ -36,9 +36,22 @@ BUILDDIR=./build
 # The path where the libsigrok Python bindings will be installed.
 PYPATH=$PREFIX/lib/python2.7/site-packages
 
+# JDK include path. Usually found automatically, except on FreeBSD.
+if [ `uname` = "FreeBSD" ]; then
+       JDK="--with-jni-include-path=/usr/local/openjdk7/include"
+fi
+
+# 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 +75,8 @@ cd libserialport
 mkdir build
 cd build
 ../configure $C
-make $PARALLEL
-make install
+$SB make $PARALLEL $V
+make install $V
 cd ../..
 
 # libsigrok
@@ -73,10 +86,10 @@ cd libsigrok
 ./autogen.sh
 mkdir build
 cd build
-PKG_CONFIG_PATH=$P ../configure $C
-make $PARALLEL
-PYTHONPATH=$PYPATH make install
-make check
+PKG_CONFIG_PATH=$P ../configure $C $JDK
+$SB make $PARALLEL $V
+PYTHONPATH=$PYPATH $SB make install $V
+$SB make check $V
 cd ../..
 
 # libsigrokdecode
@@ -86,9 +99,9 @@ cd libsigrokdecode
 mkdir build
 cd build
 PKG_CONFIG_PATH=$P ../configure $C
-make $PARALLEL
-make install
-make check
+$SB make $PARALLEL $V
+make install $V
+$SB make check $V
 cd ../..
 
 # sigrok-firmware
@@ -99,7 +112,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
@@ -110,8 +123,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
@@ -120,9 +133,14 @@ cd sigrok-cli
 ./autogen.sh
 mkdir build
 cd build
-PKG_CONFIG_PATH=$P ../configure $C
-make $PARALLEL
-make install
+if [ `uname` = "FreeBSD" ]; then
+       # Temporary fix for: http://sigrok.org/bugzilla/show_bug.cgi?id=552
+       PKG_CONFIG_PATH=$P ../configure $C LDFLAGS=-lusb
+else
+       PKG_CONFIG_PATH=$P ../configure $C
+fi
+$SB make $PARALLEL $V
+make install $V
 cd ../..
 
 # PulseView
@@ -130,8 +148,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
-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 ../..
-