From de40ae871576b01eb68fa3eb1ac689e302057c68 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Thu, 20 Oct 2022 19:35:43 +0200 Subject: [PATCH] Actualizado Makefile --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3ba3397..42387f1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,15 @@ +executable = volcano_2016 +source = source/*.cpp + +windows: + @echo off + if not exist bin\ (mkdir bin) + g++ $(source) -std=c++11 -Wall -O2 -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o bin/$(executable).exe + strip -s -R .comment -R .gnu.version bin/$(executable).exe --strip-unneeded macos: mkdir -p bin - g++ source/*.cpp -std=c++11 -Wall -O2 -lSDL2 -o bin/volcano_macos + g++ $(source) -std=c++11 -Wall -O2 -lSDL2 -ffunction-sections -fdata-sections -o bin/$(executable)_macos linux: mkdir -p bin - g++ source/*.cpp -std=c++11 -Wall -O2 -lSDL2 -o bin/volcano_linux \ No newline at end of file + g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o bin/$(executable)_linux + strip -s -R .comment -R .gnu.version bin/$(executable)_linux --strip-unneeded \ No newline at end of file