Added SF_UNHARDEN option for Windows builds.
The linker supplied by MXE currently doesn't support the -x option, so this adds a way to skip that and uses that in win32build.sh.
This commit is contained in:
parent
bc3513e5d9
commit
7e8ec72933
|
@ -18,7 +18,6 @@ AC_PROG_CC
|
|||
AC_PROG_INSTALL
|
||||
|
||||
STARFIGHTER_CPPFLAGS="-DVERSION=\\\"$PACKAGE_VERSION\\\""
|
||||
STARFIGHTER_LDADD="-Wl,-z,now"
|
||||
|
||||
# Detect MacOS
|
||||
AC_CANONICAL_HOST
|
||||
|
@ -59,6 +58,7 @@ PKG_CHECK_MODULES([PANGO], [pango], [
|
|||
])
|
||||
|
||||
AC_ARG_VAR([SF_WARN], [Set to 1 to enable compiler warnings])
|
||||
AC_ARG_VAR([SF_UNHARDEN], [Set to 1 to disable hardening flags (for compatibility)])
|
||||
AC_ARG_VAR([SF_SCREEN_WIDTH], [The width of the game window in pixels])
|
||||
AC_ARG_VAR([SF_SCREEN_HEIGHT], [The height of the game window in pixels])
|
||||
AC_ARG_VAR([SF_NOFONT], [Set to 1 to manually force the compiler not to include font/Unicode support])
|
||||
|
@ -67,6 +67,11 @@ AC_ARG_VAR([SF_RUN_IN_PLACE], [Set to 1 to compile Starfighter to run in-place (
|
|||
AS_IF([test -n "$SF_WARN"], [
|
||||
STARFIGHTER_CPPFLAGS="$STARFIGHTER_CPPFLAGS -Wall -Wformat-truncation=0"
|
||||
])
|
||||
AS_IF([test -n "$SF_UNHARDEN"], [
|
||||
echo "Building without hardening flags"
|
||||
], [
|
||||
STARFIGHTER_LDADD="-Wl,-z,now"
|
||||
])
|
||||
AS_IF([test -n "$SF_SCREEN_WIDTH"], [
|
||||
STARFIGHTER_CPPFLAGS="$STARFIGHTER_CPPFLAGS -DSCREEN_WIDTH=$SF_SCREEN_WIDTH"
|
||||
echo "Using default screen width of $SF_SCREEN_WIDTH"
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
# Helper script to cross-compile for Windows with MXE.
|
||||
# Note: Before running, be sure to add the MXE usr/bin location to PATH.
|
||||
|
||||
./configure --host=i686-w64-mingw32.static SF_RUN_IN_PLACE=1 SF_NOWARN=1
|
||||
./configure --host=i686-w64-mingw32.static SF_RUN_IN_PLACE=1 SF_UNHARDEN=1
|
||||
make
|
||||
mv src/starfighter.exe .
|
||||
|
|
Loading…
Reference in New Issue