25 Star 52 Fork 16

youngwolf/st_asio_wrapper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config.mk 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
youngwolf 提交于 2022-11-30 17:25 +08:00 . Make function endpoint_to_string to be static.
# If your compiler cannot find boost, please specify it explicitly like this:
#boost_include_dir = -I/usr/local/include/
#boost_lib_dir = -L/usr/local/lib/
ifeq (, ${STD})
STD = c++98
endif
cflag = -Wall -fexceptions -std=${STD}
ifeq (${MAKECMDGOALS}, debug)
cflag += -g -DDEBUG
dir = debug
else
cflag += -O2 -DNDEBUG
lflag = -s
dir = release
endif
cflag += -DBOOST_ASIO_NO_DEPRECATED -DBOOST_CHRONO_HEADER_ONLY
common_libs = -lboost_system -lboost_thread
target_machine = ${shell ${CXX} -dumpmachine}
ifneq (, ${findstring solaris, ${target_machine}})
cflag += -pthreads
lflag += -pthreads -lsocket -lnsl
else
cflag += -pthread
lflag += -pthread
ifneq (, ${findstring freebsd, ${target_machine}})
common_libs += -lboost_atomic
#here maybe still have other machines need to be separated out
endif
endif
cflag += ${ext_cflag} ${boost_include_dir}
lflag += ${boost_lib_dir} ${common_libs} ${ext_libs}
target = ${dir}/${module}
objects = ${patsubst %.cpp,${dir}/%.o,${wildcard *.cpp}}
deps = ${patsubst %.o,%.d,${objects}}
${shell mkdir -p ${dir}}
release debug : ${target}
-include ${deps}
${target} : ${objects}
${CXX} -o $@ $^ ${lflag}
${objects} : ${dir}/%.o : %.cpp
${CXX} ${cflag} -E -MMD -w -MT '$@' -MF ${patsubst %.cpp,%.d,${dir}/$<} $< 1>/dev/null
${CXX} ${cflag} -c $< -o $@
.PHONY : clean
clean:
-rm -rf debug release
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/youngwolf/st_asio_wrapper.git
git@gitee.com:youngwolf/st_asio_wrapper.git
youngwolf
st_asio_wrapper
st_asio_wrapper
master

搜索帮助