forked from PelionIoT/mbed-trace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (38 loc) · 985 Bytes
/
Makefile
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
#
# Makefile for mbed Client C++ Library
#
# List of subdirectories to build
TEST_FOLDER := ./test/
# Define compiler toolchain with CC or PLATFORM variables
# Example (GCC toolchains, default $CC and $AR are used)
# make
#
# OR (Cross-compile GCC toolchain)
# make PLATFORM=arm-linux-gnueabi-
#
# OR (ArmCC/Keil)
# make CC=ArmCC AR=ArmAR
#
# OR (IAR-ARM)
# make CC=iccarm
LIB = libmbed-trace.a
# List of unit test directories for libraries
UNITTESTS := $(sort $(dir $(wildcard $(TEST_FOLDER)*/utest/*)))
include sources.mk
include include_dirs.mk
override CFLAGS += $(addprefix -I,$(INCLUDE_DIRS))
override CFLAGS += $(addprefix -D,$(FLAGS))
ifeq ($(DEBUG),1)
override CFLAGS += -DHAVE_DEBUG
endif
COVERAGEFILE := ./lcov/coverage.info
#
# Define compiler toolchain
#
include ../libService/toolchain_rules.mk
$(eval $(call generate_rules,$(LIB),$(SRCS)))
# Extend default clean rule
clean: clean-extra
$(CLEANDIRS):
@make -C $(@:clean-%=%) clean
clean-extra: $(CLEANDIRS)