forked from Mozilla88/tddcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefileCppUTest.mk
More file actions
62 lines (53 loc) · 1.4 KB
/
Copy pathMakefileCppUTest.mk
File metadata and controls
62 lines (53 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#This makefile makes all the main book code with CppUTest test harness
#Set this to @ to keep the makefile quiet
SILENCE = @
#---- Outputs ----#
COMPONENT_NAME = BookCode_CppUTest
#--- Inputs ----#
CPP_PLATFORM = Gcc
PROJECT_HOME_DIR = .
# 1. 源代码目录 (移除了 MyOS)
SRC_DIRS = \
src/HomeAutomation \
src/util\
src/LedDriver \
src/dvr\
src/IO \
src/zune \
# 2. 测试代码目录 (移除了 MyOS, stdio)
TEST_SRC_DIRS = \
.\
mocks\
tests/LedDriver\
tests/util\
tests/IO\
tests/zune\
tests/HomeAutomation\
tests/dvr\
tests\
# 3. 头文件目录 (移除了 MyOS)
INCLUDE_DIRS =\
.\
$(CPPUTEST_HOME)/include\
include/IO\
mocks\
include/util\
include/HomeAutomation\
include/LedDriver\
include/dvr\
include/zune\
MOCKS_SRC_DIRS = \
mocks\
# 编译选项配置 (保持不变)
CPPUTEST_WARNINGFLAGS = -Wall -Wswitch-default -Werror
CPPUTEST_WARNINGFLAGS += -Wall -Werror -Wswitch-default -Wswitch-enum
CPPUTEST_WARNINGFLAGS += -Wno-reserved-id-macro -Wno-keyword-macro -Wno-unused-parameter -Wno-pedantic -Wno-shadow -Wno-format-nonliteral -Wno-missing-field-initializers
#CPPUTEST_CFLAGS = -std=c89
CPPUTEST_CFLAGS += -Wall -Wstrict-prototypes -pedantic
LD_LIBRARIES = -lpthread
# 引入 CppUTest 的构建逻辑
ifeq ($(CPPUTEST_HOME),)
$(info CPPUTEST_HOME not set! See README.txt)
else
include $(CPPUTEST_HOME)/build/MakefileWorker.mk
endif