From b043032a89f38e2b3191a65dab9ae4e8202d48f3 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Sun, 12 Nov 2017 07:32:11 +0300 Subject: 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 --- cmake/openwattcom-dos/ow-cmake.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 cmake/openwattcom-dos/ow-cmake.sh (limited to 'cmake/openwattcom-dos/ow-cmake.sh') 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 + -- cgit v1.2.3