From 3bbc1695f48e2b450023b96abdc26a0ce894f4cf Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 23 Jun 2018 21:59:52 -0600 Subject: Adjusted client to fail if logger is not found --- Makefile | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3-70-g09d2