From de0a51cf050a2eb661612f10e2364cd85eacbd10 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Tue, 28 Apr 2015 09:55:43 -0400 Subject: [PATCH] Windows makefile fixes --- Makefile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index b92d972..f3dd224 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ ifeq ($(OS),Linux) CXX += -std=c++11 endif ifeq ($(OS),Windows_NT) + CXXFLAGS = -DNDEBUG -DSTATIC_BUILD CXX += -I/include -DWIN32 LDLIBS += -L/lib -lwsock32 endif @@ -51,32 +52,37 @@ json_wrapper_build: build: @mkdir -p build -$(TYRO_LIB): $(OBJECTS) +$(TYRO_LIB): build $(OBJECTS) ar rcs $@ $(OBJECTS) ranlib $@ $(PROGRAM): CXXFLAGS += $(WX_CXXFLAGS) $(TYRO_LIB) $(PROGRAM): - $(CXX) $(CXXFLAGS) $(PROGRAM_SRC) $(TYRO_LIB) $(WX_LDLIBS) -o $(PROGRAM) + $(CXX) $(CXXFLAGS) $(PROGRAM_SRC) $(TYRO_LIB) $(WX_LDLIBS) $(LDLIBS) -o $(PROGRAM) +lib: $(OBJECTS) $(TYRO_LIB) run: ./build/Tyro run-grind: - valgrind ./build/Tryo + valgrind $(PROGRAM) # Make optimized and striped executable -release: all - strip -SXx $(PROGRAM) +release: ifeq ($(OS),Darwin) + strip -SXx $(PROGRAM) make Tyro.app endif ifeq ($(OS),Windows_NT) make exe endif +ifeq ($(OS),Linux) + make all + strip -SXx $(PROGRAM) +endif # Windows resource linking @@ -84,7 +90,8 @@ msw_resource: $(WX_RES) resources/platform/msw/resource.rc -O coff -o resource.res exe: LDLIBS += resource.res -exe: msw_resource all +exe: json_wrapper_build json_wrapper $(TYRO_LIB) +exe: msw_resource $(PROGRAM) # OS X application bundle Tyro.app: all resources/platform/osx/Info.plist