Tenative port for Linux
This commit is contained in:
+11
-1
@@ -1,5 +1,5 @@
|
||||
#include directories
|
||||
INCLUDES+=. accounts characters clients entities monsters rooms server_utilities triggers ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
|
||||
INCLUDES+=SDL . accounts characters clients entities monsters rooms server_utilities triggers ../common/debugging ../common/gameplay ../common/map ../common/network ../common/network/packet_types ../common/utilities
|
||||
|
||||
#libraries
|
||||
#the order of the $(LIBS) is important, at least for MinGW
|
||||
@@ -8,6 +8,10 @@ ifeq ($(OS),Windows_NT)
|
||||
LIBS+=-lwsock32 -liphlpapi -lmingw32
|
||||
endif
|
||||
LIBS+=-lSDLmain -lSDL -llua -lsqlite3
|
||||
ifeq ($(shell uname), Linux)
|
||||
#I don't know what this does, but Ubuntu needs it
|
||||
LIBS+=-ldl
|
||||
endif
|
||||
|
||||
#flags
|
||||
CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES))
|
||||
@@ -49,6 +53,12 @@ $(OBJDIR)/%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
$(RM) *.o *.a *.exe
|
||||
else ifeq ($(shell uname), Linux)
|
||||
find . -type f -name *.o -exec rm -f -r -v {} \;
|
||||
find . -type f -name *.a -exec rm -f -r -v {} \;
|
||||
rm -f -v out/client out/server
|
||||
endif
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
Reference in New Issue
Block a user