-include $(TOP_DIR)/Makefile.user
ifeq ($(CONFIG_CCACHE), y)
CC := $(CCACHE) $(CC)
HOST_CC := $(CCACHE) $(CC)
endif
# Quiet the build process
build = \
@if [ X"$V" = X"1" ]; then \
echo '$2'; \
else \
printf "[ %-8s ] %s\n" $1 $@; \
fi; \
$2
define rm_files
@printf "[ RM ] %s\n" "$1";
@$(RM) -f $1
endef
define rm_dir
@printf "[ RM dir ] %s\n" "$1";
@-$(RM) -rf $1
endef
FLAGS=\
-Wp,-MMD,$(patsubst %.o,%.d,$(dir $@)$(notdir $@)) \
-Wp,-MT,$@ \
-nostdlib \
-fomit-frame-pointer \
-fno-strict-aliasing \
-I$(TOP_DIR)/include
TARGET_COMPILER ?= arm-gcc
CFLAGS =
ifeq ($(TARGET_COMPILER), arm-gcc)
CFLAGS += -Os -march=armv5te \
-D__ARM__
endif
CFLAGS +=\
$(FLAGS) \
-Wall \
-Wextra \
-Wno-unused-parameter \
-Wno-unused-function \
-Werror-implicit-function-declaration \
-Wno-missing-field-initializers \
-Wno-format \
-Wdouble-promotion \
-ffast-math \
-fsingle-precision-constant \
-fno-builtin-printf \
-std=gnu99 \
-Winline \
-I$(PLATFORM_INC) \
-I$(PLATFORM_INC)/include \
-I$(SRC_DIR) \