Ai
1 Star 0 Fork 0

子安/tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile.inc 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
子安 提交于 2020-04-06 23:15 +08:00 . 添加inc_in_bash
# Makefile.inc - common definitions used by all makefiles
TLPI_DIR = ..
TLPI_LIB =
TLPI_INCL_DIR = ${TLPI_DIR}/inc
JSON_INCL_DIR = ${TLPI_DIR}/lib
LINUX_LIBRT = -lrt
LINUX_LIBDL = -ldl
LINUX_LIBACL = -lacl
LINUX_LIBCRYPT = -lcrypt
LINUX_LIBCAP = -lcap
# "-Wextra" is a more descriptive synonym for "-W", but only
# available in more recent gcc versions
# Defining _DEFAULT_SOURCE is a workaround to avoid the warnings that
# would otherwise be produced when compiling code that defines _BSD_SOURCE
# or _SVID_SOURCE against glibc headers in version 2.20 and later.
# (The alternative would be to replace each instance of "#define _SVID_SOURCE"
# or "#define _BSD_SOURCE" in the example programs with
# "#define _DEFAULT_SOURCE".)
IMPL_CFLAGS = -std=c99 -D_XOPEN_SOURCE=600 \
-D_DEFAULT_SOURCE \
-g -I${TLPI_INCL_DIR} \
-pedantic \
-I${JSON_INCL_DIR} \
-Wall \
-W \
-Wmissing-prototypes \
-Wno-sign-compare \
-Wno-unused-parameter
# clang(1) is a little more zealous than gcc(1) with respect to some warnings.
# Suppress those warnings (which, at least in the book code, relate to code
# that is fine).
ifeq ($(CC),clang)
IMPL_CFLAGS += -Wno-uninitialized -Wno-infinite-recursion
endif
CFLAGS = ${IMPL_CFLAGS}
IMPL_THREAD_FLAGS = -pthread
IMPL_LDLIBS = ${TLPI_LIB} -lm
LDLIBS = ${IMPL_LDLIBS}
RM = rm -f
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/andrewgithub/tools.git
git@gitee.com:andrewgithub/tools.git
andrewgithub
tools
tools
master

搜索帮助