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 -