summarylogtreecommitdiffstats
path: root/djgpp-cmake.sh
diff options
context:
space:
mode:
Diffstat (limited to 'djgpp-cmake.sh')
-rw-r--r--djgpp-cmake.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/djgpp-cmake.sh b/djgpp-cmake.sh
new file mode 100644
index 00000000000..c497ef5b96d
--- /dev/null
+++ b/djgpp-cmake.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+djgpp_prefix=/usr/i686-pc-msdosdjgpp
+
+export PKG_CONFIG_LIBDIR="${djgpp_prefix}/lib/pkgconfig"
+
+djgpp_c_flags="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
+export CFLAGS="$djgpp_c_flags"
+export CXXFLAGS="$djgpp_c_flags"
+
+PATH=${djgpp_prefix}/bin:$PATH cmake \
+ -DCMAKE_INSTALL_PREFIX:PATH=${djgpp_prefix} \
+ -DCMAKE_INSTALL_LIBDIR:PATH=${djgpp_prefix}/lib \
+ -DINCLUDE_INSTALL_DIR:PATH=${djgpp_prefix}/include \
+ -DLIB_INSTALL_DIR:PATH=${djgpp_prefix}/lib \
+ -DSYSCONF_INSTALL_DIR:PATH=${djgpp_prefix}/etc \
+ -DSHARE_INSTALL_DIR:PATH=${djgpp_prefix}/share \
+ -DBUILD_SHARED_LIBS:BOOL=OFF \
+ -DCMAKE_TOOLCHAIN_FILE=/usr/share/djgpp/toolchain-i686-pc-msdosdjgpp.cmake \
+ -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/i686-pc-msdosdjgpp-wine \
+ "$@"