2016-07-23 05:59:54 +00:00
|
|
|
.PHONY: clean distclean doc
|
|
|
|
|
|
|
|
ROOT_DIR := $(shell pwd | sed "s/\/source//g")
|
|
|
|
|
|
|
|
ifeq ($(BOARD), msp430-ccrf)
|
|
|
|
include $(ROOT_DIR)/config/make/msp430.mk
|
|
|
|
endif
|
|
|
|
ifeq ($(BOARD), stm32f4-discovery)
|
|
|
|
include $(ROOT_DIR)/config/make/stm32f4xx.mk
|
|
|
|
endif
|
|
|
|
|
2016-07-28 15:01:49 +00:00
|
|
|
INCLUDES += $(SRC_DIR)/os/$(DBG_REL_DIR)/include
|
|
|
|
LIB_DIR += $(SRC_DIR)/os/$(DBG_REL_DIR)
|
|
|
|
LIBS += kosmos-arm-stm32f4-discovery-dbg
|
|
|
|
|
2016-07-23 05:59:54 +00:00
|
|
|
CFLAGS += \
|
|
|
|
-O$(OPTIM) \
|
|
|
|
$(addprefix -I, $(INCLUDES)) \
|
|
|
|
-Wall
|
|
|
|
|
2016-07-26 20:35:17 +00:00
|
|
|
CPPCHECK_FLAGS += \
|
2016-07-23 09:19:32 +00:00
|
|
|
--template=gcc \
|
|
|
|
--error-exitcode=1 \
|
|
|
|
--enable=warning,performance,information,style \
|
2016-07-26 20:35:17 +00:00
|
|
|
--inline-suppr \
|
|
|
|
$(addprefix -I, $(INCLUDES))
|
2016-07-23 08:33:26 +00:00
|
|
|
|
2016-07-23 05:59:54 +00:00
|
|
|
include $(ROOT_DIR)/config/make/tools.mk
|
|
|
|
|
|
|
|
SRC_DIR = $(ROOT_DIR)/source
|
2016-07-28 15:01:49 +00:00
|
|
|
|
2016-07-23 05:59:54 +00:00
|
|
|
ifeq ($(DEBUG),y)
|
2016-07-28 15:01:49 +00:00
|
|
|
DBG_REL_DIR = debug
|
2016-07-23 05:59:54 +00:00
|
|
|
else
|
2016-07-28 15:01:49 +00:00
|
|
|
DBG_REL_DIR = release
|
2016-07-23 05:59:54 +00:00
|
|
|
endif
|
2016-07-28 15:01:49 +00:00
|
|
|
|
|
|
|
OBJ_DIR = $(ROOT_DIR)/release/object/$(ARCH)/$(DBG_REL_DIR)
|
|
|
|
EXE_DIR = $(ROOT_DIR)/release/execute/$(ARCH)/$(DBG_REL_DIR)
|
|
|
|
MAP_DIR = $(ROOT_DIR)/release/map/$(ARCH)/$(DBG_REL_DIR)
|
|
|
|
SIZE_DIR = $(ROOT_DIR)/release/size/$(ARCH)/$(DBG_REL_DIR)
|
2016-07-23 05:59:54 +00:00
|
|
|
DOC_DIR = $(ROOT_DIR)/doc/$(ARCH)
|
|
|
|
TEST_OBJ_DIR = $(ROOT_DIR)/test/object
|
|
|
|
TEST_EXE_DIR = $(ROOT_DIR)/test/execute/
|
|
|
|
|
|
|
|
DOC_SRC :=
|
|
|
|
|
|
|
|
ELF_EXT = .elf
|
|
|
|
BIN_EXT = .bin
|
|
|
|
HEX_EXT = .hex
|
|
|
|
SIZE_EXT = .size
|
|
|
|
TEST_EXT =
|
|
|
|
|
|
|
|
DOXYFILE=$(ROOT_DIR)/config/doxygen/Doxyfile
|
|
|
|
|
|
|
|
define makedep
|
|
|
|
$(CC) -MM \
|
|
|
|
-MF $3 \
|
|
|
|
-MP \
|
|
|
|
-MT $2 \
|
|
|
|
$(CFLAGS) \
|
|
|
|
$1
|
|
|
|
endef
|
|
|
|
|
|
|
|
define maketestdep
|
|
|
|
$(NATIVE_CC) -MM \
|
|
|
|
-MF $3 \
|
|
|
|
-MP \
|
|
|
|
-MT $2 \
|
|
|
|
$(TEST_CFLAGS) \
|
|
|
|
$1
|
|
|
|
endef
|