From 1a8273cdc262082386682ca8666d3fe88f6a11c2 Mon Sep 17 00:00:00 2001 From: nickgravelyn Date: Thu, 8 May 2014 22:59:15 -0700 Subject: [PATCH 1/2] Updating Makefile to include ability to produce release builds. --- Makefile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 21d1467..ea5aab7 100644 --- a/Makefile +++ b/Makefile @@ -93,10 +93,23 @@ MINITK = \ # Targets -build: clean - mkdir bin - cp SDL2-CS.dll.config bin - dmcs /unsafe -debug -out:bin/SDL2-CS.dll -target:library $(SDL2) $(MINITK) $(DEPS) +debug: clean-debug + mkdir -p bin/debug + cp SDL2-CS.dll.config bin/debug + dmcs /unsafe -debug -out:bin/debug/SDL2-CS.dll -target:library $(SDL2) $(MINITK) $(DEPS) -clean: +clean-debug: + rm -rf bin/debug + +release: clean-release + mkdir -p bin/release + cp SDL2-CS.dll.config bin/release + dmcs /unsafe -out:bin/release/SDL2-CS.dll -target:library $(SDL2) $(MINITK) $(DEPS) + +clean-release: + rm -rf bin/release + +clean: clean-debug clean-release rm -rf bin + +all: debug release From 55c7c04b0b8d3357d465c3de8d6105b6919b882f Mon Sep 17 00:00:00 2001 From: nickgravelyn Date: Thu, 8 May 2014 23:02:10 -0700 Subject: [PATCH 2/2] Adding proper -optimize flag to release build make target. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ea5aab7..0930485 100644 --- a/Makefile +++ b/Makefile @@ -104,7 +104,7 @@ clean-debug: release: clean-release mkdir -p bin/release cp SDL2-CS.dll.config bin/release - dmcs /unsafe -out:bin/release/SDL2-CS.dll -target:library $(SDL2) $(MINITK) $(DEPS) + dmcs /unsafe -optimize -out:bin/release/SDL2-CS.dll -target:library $(SDL2) $(MINITK) $(DEPS) clean-release: rm -rf bin/release