You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
701 B
35 lines
701 B
8 years ago
|
SYSTEM_TYPE := $(shell gcc -dumpmachine)
|
||
4 years ago
|
GCC_VERSION := $(shell gcc --version 2>/dev/null)
|
||
8 years ago
|
|
||
4 years ago
|
CC = $(CC_PREFIX) gcc
|
||
5 years ago
|
OBJCOPY =
|
||
|
OBJDUMP =
|
||
|
SIZE =
|
||
|
AR =
|
||
|
NM =
|
||
|
HEX =
|
||
|
EEP =
|
||
9 years ago
|
BIN =
|
||
|
|
||
|
|
||
|
COMPILEFLAGS += -funsigned-char
|
||
4 years ago
|
ifeq ($(findstring clang, ${GCC_VERSION}),)
|
||
9 years ago
|
COMPILEFLAGS += -funsigned-bitfields
|
||
4 years ago
|
endif
|
||
9 years ago
|
COMPILEFLAGS += -ffunction-sections
|
||
|
COMPILEFLAGS += -fdata-sections
|
||
|
COMPILEFLAGS += -fshort-enums
|
||
8 years ago
|
ifneq ($(findstring mingw, ${SYSTEM_TYPE}),)
|
||
|
COMPILEFLAGS += -mno-ms-bitfields
|
||
|
endif
|
||
9 years ago
|
|
||
|
CFLAGS += $(COMPILEFLAGS)
|
||
4 years ago
|
ifeq ($(findstring clang, ${GCC_VERSION}),)
|
||
9 years ago
|
CFLAGS += -fno-inline-small-functions
|
||
4 years ago
|
endif
|
||
9 years ago
|
CFLAGS += -fno-strict-aliasing
|
||
|
|
||
5 years ago
|
CXXFLAGS += $(COMPILEFLAGS)
|
||
|
CXXFLAGS += -fno-exceptions
|
||
|
CXXFLAGS += -std=gnu++11
|