]> git.localhorst.tv Git - blank.git/blobdiff - Makefile
make command output visible to player(s)
[blank.git] / Makefile
index d2e76cadf7d3e3f2dfb426d9790edc5ada08183e..4e4d994c681901e2c32cd00cc261d4769db2de0e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 CXX = g++ --std=c++11
 LDXX = g++
 
-LIBS = sdl2 SDL2_image SDL2_ttf glew openal freealut
+LIBS = sdl2 SDL2_image SDL2_net SDL2_ttf glew openal freealut zlib
 
 PKGFLAGS := $(shell pkg-config --cflags $(LIBS))
 PKGLIBS := $(shell pkg-config --libs $(LIBS))
@@ -16,8 +16,8 @@ LDXXFLAGS ?=
 LDXXFLAGS += $(PKGLIBS)
 
 DEBUG_FLAGS = -g3 -O0
-PROFILE_FLAGS = -DNDEBUG -O1 -g3
-RELEASE_FLAGS = -DNDEBUG -O2
+PROFILE_FLAGS = -DNDEBUG -O1 -g3 -DBLANK_PROFILING
+RELEASE_FLAGS = -DNDEBUG -O2 -g1
 TEST_FLAGS = -g -O2 -I./src $(TESTFLAGS)
 
 SOURCE_DIR := src
@@ -62,20 +62,27 @@ profile: $(PROFILE_BIN)
 tests: $(TEST_BIN)
 
 run: $(ASSET_DEP) blank
-       ./blank
+       ./blank --save-path saves/
+
+server: $(ASSET_DEP) blank
+       ./blank --server --save-path saves/
+
+client: $(ASSET_DEP) blank
+       ./blank --client --save-path saves/
 
 gdb: $(ASSET_DEP) blank.debug
        gdb ./blank.debug
 
 cachegrind: $(ASSET_DEP) blank.profile
-       valgrind ./blank.profile
+       valgrind ./blank.profile --save-path saves/
 
 callgrind: $(ASSET_DEP) blank.profile
        valgrind --tool=callgrind \
+               --collect-atstart=no --toggle-collect="blank::Runtime::RunStandalone()" \
                --branch-sim=yes --cacheuse=yes --cache-sim=yes \
                --collect-bus=yes --collect-systime=yes --collect-jumps=yes \
                --dump-instr=yes --simulate-hwpref=yes --simulate-wb=yes \
-               ./blank.profile -n 128 -t 16 --no-keyboard --no-mouse -d --no-vsync
+               ./blank.profile -n 256 -t 16 --no-keyboard --no-mouse -d --no-vsync --save-path saves/
 
 test: blank.test
        ./blank.test
@@ -85,6 +92,7 @@ clean:
 
 distclean: clean
        rm -f $(BIN) cachegrind.out.* callgrind.out.*
+       rm -Rf build client-saves saves
 
 .PHONY: all release debug profile tests run gdb cachegrind callgrind test clean distclean