executable = jaildoctors_dilemma source = source/*.cpp source/common/*.cpp macosBundle = ../jaildoctors_dilemma_release/JailDoctor's Dilemma.app/Contents/ windows: @echo off if not exist data\config (mkdir data\config) g++ $(source) -std=c++11 -Wall -O2 -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o $(executable).exe strip -s -R .comment -R .gnu.version $(executable).exe --strip-unneeded macos: rm -rdf data/config mkdir -p data/config g++ $(source) -std=c++11 -Wall -O2 -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos macos_f: rm -rdf data/config mkdir -p data/config cp -r data "$(macosBundle)Resources" cp -r "$(macosBundle)/Frameworks" . clang++ $(source) -std=c++11 -Wall -O2 -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(macosBundle)MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 rm -rdf ./Frameworks linux: rm -rdf data/config mkdir -p data/config g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(executable)_linux strip -s -R .comment -R .gnu.version $(executable)_linux --strip-unneeded