aboutsummaryrefslogtreecommitdiff
path: root/build_wxwidgets.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build_wxwidgets.sh')
-rwxr-xr-xbuild_wxwidgets.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/build_wxwidgets.sh b/build_wxwidgets.sh
new file mode 100755
index 0000000..6622ecf
--- /dev/null
+++ b/build_wxwidgets.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+set -e
+set -x
+
+HOSTT="${1}"
+if [ "x${HOSTT}" = "x" -o "x${HOSTT}" = "xhost" ]; then
+ HOSTARG=""
+else
+ HOSTARG="--host=${HOSTT}"
+fi
+
+WDIR="wxWidgets"
+git submodule init
+git submodule update
+cd ${WDIR}
+git checkout .
+
+cd ..
+mkdir -p "${WDIR}-${HOSTT:-host}"
+cd "${WDIR}-${HOSTT:-host}"
+CXXFLAGS="-ffunction-sections -fdata-sections -Os -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-undef"
+../${WDIR}/configure --without-expat --disable-compat28 --disable-compat30 \
+ --disable-richtooltip --disable-richmsgdlg --disable-richtext \
+ --without-libpng --without-libjpeg --without-regex \
+ --disable-ole --disable-mediactrl --disable-dataobj --disable-dataviewctrl \
+ --disable-treebook --disable-treelist --disable-stc \
+ --disable-webkit --disable-webview --disable-webviewwebkit --disable-webviewie \
+ --disable-svg --without-libtiff --without-zlib --without-opengl \
+ --without-gtkprint --disable-printfposparam --disable-printarch --disable-ps-in-msw \
+ --enable-cxx11 \
+ --disable-mshtmlhelp --disable-html --disable-htmlhelp \
+ --disable-ribbon --disable-propgrid --disable-aui \
+ --disable-sockets --disable-dialupman --disable-fs_inet \
+ --disable-shared ${HOSTARG} \
+ --disable-sys-libs \
+ --disable-debug --disable-debug_flag \
+ CXXFLAGS="${CXXFLAGS}"
+make -j${BUILDJOBS:-4} BUILD=release
+
+# fix static lib path for cross compile targets
+for lib in lib/*-${HOSTT:-host}.a; do
+ NEWNAME="$(echo -n "${lib}" | sed -n "s/-${HOSTT}\.a$//gp").a"
+ ln -sr "${lib}" "${NEWNAME}" 2>/dev/null || true
+done