summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 64facb5..fbef309 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
CXX = g++
-CXXFLAGS = -Wall -Wextra
+GIT = git
+CXXFLAGS = -Wall -Wextra -Iboost-asio-fastbuffer
SERVER_HDRS = socks5.hpp
SERVER_SRCS = socks5.cpp main.cpp
@@ -14,12 +15,20 @@ ifneq ($(DEBUG),)
CXXFLAGS += -g #-DBOOST_ASIO_ENABLE_HANDLER_TRACKING=1
endif
-all: server
+all: git server
-server: $(SERVER_HDRS) $(SERVER_SRCS)
+git: boost-asio-fastbuffer/fastbuffer.hpp
+
+boost-asio-fastbuffer/fastbuffer.hpp:
+ $(GIT) submodule update --init
+
+server: boost-asio-fastbuffer/fastbuffer.hpp $(SERVER_HDRS) $(SERVER_SRCS)
$(CXX) $(CXXFLAGS) $(SERVER_SRCS) -o $@
clean:
rm -f server
-.PHONY: clean
+distclean: clean
+ $(GIT) submodule deinit --all --force
+
+.PHONY: all git clean distclean