1 Star 0 Fork 5

kekelele/isotp-c

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
Simon Cahill 提交于 2019-06-05 19:09 +08:00 . Added specific build target for Travis.
include vars.mk
CFLAGS := -Wall -g -ggdb $(STD)
LDFLAGS := -shared
BIN := ./bin
.PHONY: all clean fPIC no_opt $(BIN)/$(LIB_NAME) $(BIN)/$(LIB_NAME).$(MAJOR_VER) $(BIN)/$(LIB_NAME).$(MAJOR_VER).$(MINOR_VER).$(REVISION) travis
###
# BEGIN TARGETS
###
###
# Builds all library artifacts
###
all: $(BIN)/$(LIB_NAME)
@printf "########## BUILT $^ ##########\n\n\n"
fPIC: CFLAGS += "-fPIC"
travis: fPIC all
###
# Builds all targets w/o optimisations enabled
###
no_opt: CFLAGS += -g -O0 all
###
# Removes all build artifacts
###
clean:
-rm -f *.o $(BIN)/$(LIB_NAME)*
###
# Builds all library artifacts, including all symlinks.
###
$(BIN)/$(LIB_NAME): $(BIN)/$(LIB_NAME).$(MAJOR_VER)
-ln -s $^ $@
@printf "Linked $^ --> $@...\n"
###
# Builds the shared object along with one symlink
###
$(BIN)/$(LIB_NAME).$(MAJOR_VER): $(BIN)/$(LIB_NAME).$(MAJOR_VER).$(MINOR_VER).$(REVISION)
-ln -s $^ $@
@printf "Linked $^ --> $@...\n"
$(BIN)/$(LIB_NAME).$(MAJOR_VER).$(MINOR_VER).$(REVISION): libisotp.o
if [ ! -d $(BIN) ]; then mkdir $(BIN); fi;
${COMP} $^ -o $@ ${LDFLAGS}
###
# Compiles the isotp.c TU to an object file.
###
libisotp.o: isotp.c
${COMP} -c $^ -o $@ ${CFLAGS}
install: all
@printf "Installing $(LIB_NAME) to $(INSTALL_DIR)...\n"
cp $(BIN)/$(LIB_NAME)* $(INSTALL_DIR)
@printf "Library was installed...\n"
###
# END TARGETS
###
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/kekelele1990/isotp-c.git
git@gitee.com:kekelele1990/isotp-c.git
kekelele1990
isotp-c
isotp-c
master

搜索帮助