aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlexander Pickering <alex@cogarr.net>2018-06-23 21:59:52 -0600
committerAlexander Pickering <alex@cogarr.net>2018-06-23 21:59:52 -0600
commit3bbc1695f48e2b450023b96abdc26a0ce894f4cf (patch)
tree20a6d239838dc68e9e1e1d13f766457b67c8d3d6 /Makefile
parent101d9b7ac8b3ae03a87364dc464fa7de36fbccf1 (diff)
downloadbrokengine-3bbc1695f48e2b450023b96abdc26a0ce894f4cf.tar.gz
brokengine-3bbc1695f48e2b450023b96abdc26a0ce894f4cf.tar.bz2
brokengine-3bbc1695f48e2b450023b96abdc26a0ce894f4cf.zip
Adjusted client to fail if logger is not found
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 24 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index ea26842..5d98285 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,8 @@ CLIENT_BUILD=build/client/
SERVER_NAME=brokeserver
SERVER_EXE=$(SERVER_NAME)$(EXE_EXT)
-SERVER_PATH=bin/server/bin/$(SERVER_EXE)
+SERVER_DIR=bin/server/bin
+SERVER_PATH=$(SERVER_DIR)/$(SERVER_EXE)
SERVER_SRC=src/server/
SERVER_BUILD=build/server/
@@ -72,13 +73,13 @@ LIBIRR=lib/libIrrlicht.a
LIBBCO=lib/libBulletCollision.a
LIBBDY=lib/libBulletDynamics.a
LIBBLM=lib/libLinearMath.a
-LIBNAN=lib/libnanomsg.dll.a
+LIBNAN=lib/libnanomsg.a
DLLIRR=$(LIRRDIR)/Irrlicht.dll
-DYNAMIC_LIBS = -lnanomsg.dll #-lIrrlicht
+DYNAMIC_LIBS = #-lnanomsg.dll #-lIrrlicht
#order matters!
-STATIC_LIBS = -lBulletDynamics -lBulletCollision -lLinearMath -lIrrlicht -lluajit -lOpenGL32
+STATIC_LIBS = -lBulletDynamics -lBulletCollision -lLinearMath -lIrrlicht -lluajit -lOpenGL32 -lnanomsg
LIBS=-Bstatic $(STATIC_LIBS) -Bdynamic $(DYNAMIC_LIBS)
SLIBS=$(LIBLUA) $(LIBIRR) $(LIBBDY) $(LIBBCO) $(LIBBLM) $(LIBNAN)
@@ -86,14 +87,21 @@ SLIBS=$(LIBLUA) $(LIBIRR) $(LIBBDY) $(LIBBCO) $(LIBBLM) $(LIBNAN)
#can't compile with -std=c++11 because irrlicht will complain
-CFLAGS=-Wall -static $(INCLUDES) -D_IRR_STATIC_LIB_
+CFLAGS=-Wall -static $(INCLUDES) -D_IRR_STATIC_LIB_ -DNN_STATIC_LIB
LDFLAGS=
ifeq ($(UNAME),Windows)
- LDFLAGS+=-mwindows -Wl,-subsystem,windows -lwinmm
+ LDFLAGS+=-mwindows -lwinmm #-Wl,-subsystem,windows
+ STATIC_LIBS+=-lws2_32 -lmswsock -ladvapi32
+endif
+
+ifeq ($(UNAME),true)
+ ifeq ($(UNAME),Windows)
+ LDFLAGS+=-Wl,-subsystem,console
+ endif
endif
ifeq ($(DEBUG),true)
- CFLAGS+=-g -O0
+ CFLAGS+=-g
else
CFLAGS+=-O3
#LDFLAGS+=--strip-all
@@ -244,11 +252,14 @@ $(LIBLUA) : $(ILUADIR)/Makefile
IRRMAKEFLAGS=
IRRMADELIB=
+ifeq ($(DEBUG),true)
+ IRRMAKEFLAGS+=NDEBUG=1
+endif
ifeq ($(UNAME), Windows)
- IRRMAKEFLAGS=NDEBUG=1 staticlib_win32
+ IRRMAKEFLAGS=staticlib_win32
IRRMADELIB=$(LIRRDIR)/lib/Win32-gcc
else
- IRRMAKEFLAGS=-NDEBUG=1
+ IRRMAKEFLAGS=NDEBUG=1
IRRMADELIB=$(LIRRDIR)/lib/Linux
endif
@@ -273,10 +284,12 @@ $(LBULDIR)/Makefile : $(LBULDIR)/CMakeLists.txt
$(LIBNAN) : $(LNANDIR)/Makefile
cd $(LNANDIR) && make
- cp $(LNANDIR)/libnanomsg.dll.a lib
+ cp $(LNANDIR)/libnanomsg.a lib
+ # cp $(LNANDIR)/libnanomsg.dll $(CLIENT_DIR)
+ # cp $(LNANDIR)/libnanomsg.dll $(SERVER_DIR)
$(LNANDIR)/Makefile : $(LNANDIR)/CMakeLists.txt
- cd $(LNANDIR) && cmake $(CMAKE_FLAGS)
+ cd $(LNANDIR) && cmake -DNN_STATIC_LIB=ON $(CMAKE_FLAGS)
#compile & run tests
test: $(TEST_PATH)test_stream $(TEST_PATH)test_phys