## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
+set -e
+
# The path where your MXE directory is located.
MXE=$HOME/mxe-git
# libsigrok
git clone git://sigrok.org/libsigrok
cd libsigrok
+patch -p1 < ../../libsigrok_firmwaredir.patch
./autogen.sh
PKG_CONFIG_PATH_i686_pc_mingw32=$P ./configure $C $L && make install
cd ..
PYTHON3_CONFIG=$PREFIX/bin/python3-config PKG_CONFIG_PATH_i686_pc_mingw32=$P ./configure $C $L && make install
cd ..
+# sigrok-firmware
+git clone git://sigrok.org/sigrok-firmware
+cd sigrok-firmware
+./autogen.sh
+# Nothing gets cross-compiled here, we just need 'make install' basically.
+./configure --prefix=$PREFIX
+make install
+cd ..
+
+# sigrok-firmware-fx2lafw
+git clone git://sigrok.org/sigrok-firmware-fx2lafw
+cd sigrok-firmware-fx2lafw
+./autogen.sh
+# We're building the fx2lafw firmware on the host, no need to cross-compile.
+./configure --prefix=$PREFIX
+make
+make install
+cd ..
+
# sigrok-cli
git clone git://sigrok.org/sigrok-cli
cd sigrok-cli
+patch -p1 < ../../sigrok_cli_decodersdir.patch
./autogen.sh
PKG_CONFIG_PATH_i686_pc_mingw32=$P:$P2 ./configure $C && make install
makensis -DHOME=$HOME contrib/sigrok-cli_cross.nsi
# PulseView
git clone git://sigrok.org/pulseview
cd pulseview
-patch -p1 < ../../pulseview.patch
-PKG_CONFIG_PATH_i686_pc_mingw32=$P:$P2 cmake $CM -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y . && make install VERBOSE=1
+patch -p1 < ../../pulseview_linkfix.patch
+patch -p1 < ../../pulseview_decodersdir.patch
+PKG_CONFIG_PATH_i686_pc_mingw32=$P:$P2 cmake $CM -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y -DENABLE_DECODE=y . && make install VERBOSE=1
makensis -DHOME=$HOME contrib/pulseview_cross.nsi
cd ..