From a89f892640cf12f75c7ce18e6e88c70a8d3965ed Mon Sep 17 00:00:00 2001 From: Uneven Prankster Date: Sat, 23 Sep 2023 19:28:45 -0300 Subject: things can always be nicer :D --- build.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 3ceb991..e450615 100644 --- a/build.sh +++ b/build.sh @@ -24,7 +24,7 @@ set -e while getopts ":hdusrcq" opt; do case $opt in h) - echo "Usage: ./build-linux.sh [-hdusrcqq]" + echo "Usage: ./build.sh [-hdurcqq]" echo " -h Show this information" echo " -d Faster builds that have debug symbols, and enable warnings" echo " -u Run upx* on the executable after compilation (before -r)" @@ -32,14 +32,10 @@ while getopts ":hdusrcq" opt; do echo " -c Remove the temp/(debug|release) directory, ie. full recompile" echo " -q Suppress this script's informational prints" echo "" - echo "* This is mostly here to make building simple \"shipping\" versions" - echo " easier, and it's a very small bit in the build scripts. The option" - echo " requires that you have upx installed and on your path, of course." - echo "" echo "Examples:" - echo " Build a release build: ./build-linux.sh" - echo " Build a release build, full recompile: ./build-linux.sh -c" - echo " Build a debug build and run: ./build-linux.sh -d -r" + echo " Build a release build: ./build.sh" + echo " Build a release build, full recompile: ./build.sh -c" + echo " Build a debug build and run: ./build.sh -d -r" exit 0 ;; d) @@ -76,7 +72,7 @@ RAYLIB_SRC="$ROOT_DIR/$RAYLIB_SRC" TINYCC_SRC="$ROOT_DIR/tinycc" # Flags -COMPILATION_FLAGS="-std=gnu99 -Os -flto -s -D__USE_MINGW_ANSI_STDIO=0 -mno-stack-arg-probe -Xlinker --stack=0x200000,0x200000 +COMPILATION_FLAGS="-std=gnu99 -Os -flto=auto -s -D__USE_MINGW_ANSI_STDIO=0 -mno-stack-arg-probe -Xlinker --stack=0x200000,0x200000 -fno-asynchronous-unwind-tables -fwhole-program -Wl,--gc-sections -mavx" FINAL_FLAGS=$COMPILATION_FLAGS WARNING_FLAGS="-Wall -Wextra" @@ -135,7 +131,7 @@ rm *.o if [ -n "$UPX_IT" ]; then [ -z "$QUIET" ] && echo "COMPILE-INFO: Packing $GAME_NAME with upx." - upx $GAME_NAME > /dev/null 2>&1 + upx $GAME_NAME --brute > /dev/null 2>&1 fi if [ -n "$RUN_AFTER_BUILD" ]; then -- cgit v1.2.3