2017-07-12 03:05:01 +08:00
|
|
|
SYSTEM_TYPE := $(shell gcc -dumpmachine)
|
|
|
|
|
2016-08-22 14:16:08 +08:00
|
|
|
CC = gcc
|
|
|
|
OBJCOPY =
|
|
|
|
OBJDUMP =
|
|
|
|
SIZE =
|
|
|
|
AR =
|
|
|
|
NM =
|
|
|
|
HEX =
|
|
|
|
EEP =
|
|
|
|
BIN =
|
|
|
|
|
|
|
|
|
|
|
|
COMPILEFLAGS += -funsigned-char
|
|
|
|
COMPILEFLAGS += -funsigned-bitfields
|
|
|
|
COMPILEFLAGS += -ffunction-sections
|
|
|
|
COMPILEFLAGS += -fdata-sections
|
|
|
|
COMPILEFLAGS += -fshort-enums
|
2017-07-12 03:05:01 +08:00
|
|
|
ifneq ($(findstring mingw, ${SYSTEM_TYPE}),)
|
|
|
|
COMPILEFLAGS += -mno-ms-bitfields
|
|
|
|
endif
|
2016-08-22 14:16:08 +08:00
|
|
|
|
|
|
|
CFLAGS += $(COMPILEFLAGS)
|
|
|
|
CFLAGS += -fno-inline-small-functions
|
|
|
|
CFLAGS += -fno-strict-aliasing
|
|
|
|
|
|
|
|
CPPFLAGS += $(COMPILEFLAGS)
|
|
|
|
CPPFLAGS += -fno-exceptions
|
|
|
|
CPPFLAGS += -std=gnu++11
|