From c577755c3b2528b2759eed6c88b661076316a002 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 9 Jan 2023 17:35:48 +0100 Subject: [PATCH] - Makefile added, batch files removed --- Makefile | 24 ++++++++++++++++++++++++ opti.bat | 2 -- opti.sh | 4 ---- opti_mac.sh | 3 --- 4 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 Makefile delete mode 100644 opti.bat delete mode 100755 opti.sh delete mode 100755 opti_mac.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6821781 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +executable = mini +source = *.cpp ./lua/*.c + +windows: + @echo off + g++ $(source) -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lmingw32 -lSDL2main -lSDL2 -o "$(executable).exe" + strip -s -R .comment -R .gnu.version --strip-unneeded "$(executable).exe" + +windows_debug: + @echo off + g++ $(source) -D DEBUG -g -Wall -Os -lmingw32 -lSDL2main -lSDL2 -o "$(executable)_debug.exe" + +macos: + clang++ $(source) -Wall -Os -ffunction-sections -fdata-sections -lSDL2 -o "$(executable)" + +macos_debug: + clang++ $(source) -D DEBUG -g -Wall -Os -ffunction-sections -fdata-sections -lSDL2 -o "$(executable)_debug" + +linux: + g++ $(source) -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lSDL2 -o "$(executable)" + strip -s -R .comment -R .gnu.version --strip-unneeded "$(executable)" + +linux_debug: + g++ $(source) -D DEBUG -g -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lSDL2 -o "$(executable)_debug" diff --git a/opti.bat b/opti.bat deleted file mode 100644 index 2dcb35f..0000000 --- a/opti.bat +++ /dev/null @@ -1,2 +0,0 @@ -g++ *.cpp ./lua/*.c -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lmingw32 -lSDL2main -lSDL2 -o mini.exe -strip -s -R .comment -R .gnu.version --strip-unneeded mini.exe diff --git a/opti.sh b/opti.sh deleted file mode 100755 index 0334cb5..0000000 --- a/opti.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -g++ *.cpp ./lua/*.c -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lSDL2 -o mini -strip -s -R .comment -R .gnu.version --strip-unneeded mini - diff --git a/opti_mac.sh b/opti_mac.sh deleted file mode 100755 index e5f59ca..0000000 --- a/opti_mac.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -g++ *.cpp ./lua/*.c -Os -ffunction-sections -fdata-sections -lSDL2 -o mini -