-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Makefile.linux
38 lines (28 loc) · 968 Bytes
/
Makefile.linux
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
.PHONY: tiny_loopback clean_tiny_loopback
CONFIG_ENABLE_FCS32 ?= y
CONFIG_ENABLE_FCS16 ?= y
CONFIG_ENABLE_CHECKSUM ?= y
CONFIG_ENABLE_STATS ?=y
# ************* Common defines ********************
CPPFLAGS += -I./tools/serial
CPPFLAGS += -fPIC -pthread -pg -fexceptions
CFLAGS += -g
LDFLAGS += -L. -lm -shared
TOOLS_LDFLAGS += -L$(BLD) -lm -pthread -ltinyprotocol
TOOLS_EXT ?=
include Makefile.common
include Makefile.cpputest
OBJ_TINY_LOOPBACK = examples/linux/loopback/tiny_loopback.o
all: tiny_loopback
tiny_loopback: $(OBJ_TINY_LOOPBACK) library
$(CXX) $(CPPFLAGS) -o $(BLD)/tiny_loopback$(TOOLS_EXT) $(OBJ_TINY_LOOPBACK) $(TOOLS_LDFLAGS)
clean: clean_tiny_loopback
clean_tiny_loopback:
rm -rf $(OBJ_TINY_LOOPBACK) $(OBJ_TINY_LOOPBACK:.o=.gcno) $(OBJ_TINY_LOOPBACK:.o=.gcda)
cppcheck:
@cppcheck --force \
--enable=warning,style,performance,portability \
--suppress=information \
-q -I ./src \
--error-exitcode=1 src
@echo "[DONE]"