summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2025-03-18 12:16:27 +0100
committerToni Uhlig <matzeton@googlemail.com>2025-03-19 12:16:27 +0100
commit6186488e37b289301f79dc4cb1c1055641e66ef0 (patch)
tree4d3716735a63492845c2a88c18ba370e1bc7ad0d /Makefile
parent9f4705c611de046a7dc07fbca0173430c5d9c04c (diff)
Use boost-asio-fastbuffer submodule..main
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
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