.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 CFLAGS += \ -Wno-unused-function \ -O$(OPTIM) \ $(addprefix -I, $(INCLUDES)) \ -Wall CPPCHECK_FLAGS = --template=gcc --error-exitcode=1 --enable=all --inline-suppr include $(ROOT_DIR)/config/make/tools.mk SRC_DIR = $(ROOT_DIR)/source ifeq ($(DEBUG),y) OBJ_DIR = $(ROOT_DIR)/release/object/$(ARCH)/debug EXE_DIR = $(ROOT_DIR)/release/execute/$(ARCH)/debug MAP_DIR = $(ROOT_DIR)/release/map/$(ARCH)/debug SIZE_DIR = $(ROOT_DIR)/release/size/$(ARCH)/debug else OBJ_DIR = $(ROOT_DIR)/release/object/$(ARCH)/release EXE_DIR = $(ROOT_DIR)/release/execute/$(ARCH)/release MAP_DIR = $(ROOT_DIR)/release/map/$(ARCH)/release SIZE_DIR = $(ROOT_DIR)/release/size/$(ARCH)/release endif 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