1 Star 0 Fork 63

hunzino1/libboundscheck

forked from openEuler/libboundscheck 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 991 Bytes
一键复制 编辑 原始数据 按行查看 历史
PROJECT=libboundscheck.so
CC?=gcc
OPTION = -fPIC
OPTION += -fstack-protector-all
OPTION += -D_FORTIFY_SOURCE=2 -O2
OPTION += -Wformat=2 -Wfloat-equal -Wshadow
OPTION += -Wconversion
OPTION += -Wformat-security
OPTION += -Wextra
OPTION += --param ssp-buffer-size=4
OPTION += -Warray-bounds
OPTION += -Wpointer-arith
OPTION += -Wcast-qual
OPTION += -Wstrict-prototypes
OPTION += -Wmissing-prototypes
OPTION += -Wstrict-overflow=1
OPTION += -Wstrict-aliasing=2
OPTION += -Wswitch -Wswitch-default
CFLAG = -Wall -DNDEBUG -O2 $(OPTION)
SOURCES=$(wildcard src/*.c)
OBJECTS=$(patsubst %.c,%.o,$(SOURCES))
.PHONY:clean
CFLAG += -Iinclude
LD_FLAG = -fPIC -s -Wl,-z,relro,-z,now,-z,noexecstack -fstack-protector-all
$(PROJECT): $(OBJECTS)
mkdir -p lib
$(CC) -shared -o lib/$@ $(patsubst %.o,obj/%.o,$(notdir $(OBJECTS))) $(LD_FLAG)
@echo "finish $(PROJECT)"
.c.o:
@mkdir -p obj
$(CC) -c $< $(CFLAG) -o obj/$(patsubst %.c,%.o,$(notdir $<))
clean:
-rm -rf obj lib
@echo "clean up"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hunzino1/libboundscheck.git
git@gitee.com:hunzino1/libboundscheck.git
hunzino1
libboundscheck
libboundscheck
master

搜索帮助