aboutsummaryrefslogtreecommitdiff
path: root/cmake/openwattcom-dos/ow-cmake.sh
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2017-11-12 07:32:11 +0300
committerWohlstand <admin@wohlnet.ru>2017-11-12 07:32:11 +0300
commitb043032a89f38e2b3191a65dab9ae4e8202d48f3 (patch)
treefa43cf8e88087b84aff825e8eaac40ff4587f2c3 /cmake/openwattcom-dos/ow-cmake.sh
parentcc2d7237cce71482c04895e5550609534e41413b (diff)
downloadlibADLMIDI-b043032a89f38e2b3191a65dab9ae4e8202d48f3.tar.gz
libADLMIDI-b043032a89f38e2b3191a65dab9ae4e8202d48f3.tar.bz2
libADLMIDI-b043032a89f38e2b3191a65dab9ae4e8202d48f3.zip
libADLMIDI now is buildable under OpenWatcom except of some workarounds
- Need a different way to create a static library, otherwise it don't wanna be built. - Needed a different custom STL containers (std::vector and std::set) implementation that will work and will don't glitch with a crashes
Diffstat (limited to 'cmake/openwattcom-dos/ow-cmake.sh')
-rwxr-xr-xcmake/openwattcom-dos/ow-cmake.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/cmake/openwattcom-dos/ow-cmake.sh b/cmake/openwattcom-dos/ow-cmake.sh
new file mode 100755
index 0000000..921df11
--- /dev/null
+++ b/cmake/openwattcom-dos/ow-cmake.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+export WATCOM=$HOME/Qt/Tools/ow-snapshot-2.0
+export EDPATH=$WATCOM/eddat
+export WIPFC=$WATCOM/wipfc
+export INCLUDE="$WATCOM/h"
+WATCOM_FLAGS="-bdos4g -march=i386"
+export CFLAGS="$WATCOM_FLAGS -xc -std=wc"
+export CXXFLAGS="$WATCOM_FLAGS -xc++ -xs -feh -std=c++11"
+export LFLAGS="$WATCOM_FLAGS"
+
+# export PKG_CONFIG_LIBDIR="${WATCOM}/lib/pkgconfig"
+# djgpp_c_flags="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
+
+SCRIPT_PATH=$HOME/_git_repos/libADLMIDI/cmake/openwattcom-dos
+CUSTOM_PATH=$SCRIPT_PATH:${WATCOM}/binl:$PATH
+
+if [[ "$1" != '--build' ]]; then
+ echo "KEK [${CUSTOM_PATH}]"
+
+ PATH=${CUSTOM_PATH} cmake \
+ -DCMAKE_INSTALL_PREFIX:PATH=${WATCOM} \
+ -DCMAKE_INSTALL_LIBDIR:PATH=${WATCOM}/lib386 \
+ -DINCLUDE_INSTALL_DIR:PATH=${WATCOM}/lib386 \
+ -DLIB_INSTALL_DIR:PATH=${WATCOM}/lib \
+ -DSYSCONF_INSTALL_DIR:PATH=${WATCOM}/etc \
+ -DSHARE_INSTALL_DIR:PATH=${WATCOM}/share \
+ -DBUILD_SHARED_LIBS:BOOL=OFF \
+ -DCMAKE_TOOLCHAIN_FILE="${SCRIPT_PATH}/toolchain-ow.cmake" \
+ "$@"
+
+else
+ PATH=${CUSTOM_PATH} cmake "$@"
+fi
+
+#-DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/i686-pc-msdosdjgpp-wine
+