代码拉取完成,页面将自动刷新
同步操作将从 ChengJingJia/uds-c 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
CC = gcc
INCLUDES = -Isrc -Ideps/bitfield-c/src -Ideps/isotp-c/src
CFLAGS = $(INCLUDES) -c -Wall -Werror -g -ggdb -std=gnu99 -coverage
LDFLAGS = -coverage -lm
LDLIBS = -lcheck
TEST_DIR = tests
TEST_OBJDIR = build
# Guard against \r\n line endings only in Cygwin
OSTYPE := $(shell uname)
ifneq ($(OSTYPE),Darwin)
OSTYPE := $(shell uname -o)
ifeq ($(OSTYPE),Cygwin)
TEST_SET_OPTS = igncr
endif
endif
SRC = $(wildcard src/**/*.c)
SRC += $(wildcard deps/bitfield-c/src/**/*.c)
SRC += $(wildcard deps/isotp-c/src/**/*.c)
OBJS = $(patsubst %,$(TEST_OBJDIR)/%,$(SRC:.c=.o))
TEST_SRC = $(wildcard $(TEST_DIR)/test_*.c)
TESTS=$(patsubst %.c,$(TEST_OBJDIR)/%.bin,$(TEST_SRC))
TEST_SUPPORT_SRC = $(TEST_DIR)/common.c
TEST_SUPPORT_OBJS = $(patsubst %,$(TEST_OBJDIR)/%,$(TEST_SUPPORT_SRC:.c=.o))
all: $(OBJS)
test: $(TESTS)
@set -o $(TEST_SET_OPTS) >/dev/null 2>&1
@export SHELLOPTS
@sh runtests.sh $(TEST_OBJDIR)/$(TEST_DIR)
COVERAGE_INFO_FILENAME = coverage.info
COVERAGE_INFO_PATH = $(TEST_OBJDIR)/$(COVERAGE_INFO_FILENAME)
coverage:
@lcov --base-directory . --directory src --zerocounters -q
@make clean
@make test
@lcov --base-directory . --directory $(TEST_OBJDIR) -c -o $(TEST_OBJDIR)/coverage.info
@lcov --remove $(COVERAGE_INFO_PATH) "deps/*" -o $(COVERAGE_INFO_PATH)
@genhtml -o $(TEST_OBJDIR)/coverage -t "isotp-c test coverage" --num-spaces 4 $(COVERAGE_INFO_PATH)
@$(BROWSER) $(TEST_OBJDIR)/coverage/index.html
@echo "$(GREEN)Coverage information generated in $(TEST_OBJDIR)/coverage/index.html.$(COLOR_RESET)"
$(TEST_OBJDIR)/%.o: %.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(CC_SYMBOLS) $(INCLUDES) -o $@ $<
$(TEST_OBJDIR)/%.bin: $(TEST_OBJDIR)/%.o $(OBJS) $(TEST_SUPPORT_OBJS)
@mkdir -p $(dir $@)
$(CC) $(LDFLAGS) $(CC_SYMBOLS) $(INCLUDES) -o $@ $^ $(LDLIBS)
clean:
rm -rf $(TEST_OBJDIR)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。