diff options
| author | Uneven Prankster <unevenprankster@protonmail.com> | 2023-09-23 19:28:45 -0300 |
|---|---|---|
| committer | Uneven Prankster <unevenprankster@protonmail.com> | 2023-09-23 19:28:45 -0300 |
| commit | a89f892640cf12f75c7ce18e6e88c70a8d3965ed (patch) | |
| tree | e917bda607b86cb7c5bd80df2e5abf549d972163 /build.sh | |
| parent | 83505b7be49dbf7789deb814bd159d9c37181d05 (diff) | |
things can always be nicer :D
Diffstat (limited to 'build.sh')
| -rw-r--r-- | build.sh | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -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 |
