blob: fbef3094900536c59c590405755f32a03fa12dd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
CXX = g++
GIT = git
CXXFLAGS = -Wall -Wextra -Iboost-asio-fastbuffer
SERVER_HDRS = socks5.hpp
SERVER_SRCS = socks5.cpp main.cpp
ifneq ($(ENABLE_SANITIZER),)
CXXFLAGS += -fsanitize=address -fsanitize=leak -fsanitize=undefined
else
ifneq ($(ENABLE_THREAD_SANITIZER),)
CXXFLAGS += -fsanitize=thread -fsanitize=undefined
endif
endif
ifneq ($(DEBUG),)
CXXFLAGS += -g #-DBOOST_ASIO_ENABLE_HANDLER_TRACKING=1
endif
all: git server
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
distclean: clean
$(GIT) submodule deinit --all --force
.PHONY: all git clean distclean
|