summaryrefslogtreecommitdiffstats
path: root/platforms/test/platform.mk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-11-19 18:41:02 +0000
committerGitHub <noreply@github.com>2021-11-19 10:41:02 -0800
commit2728603fe6d73e805a539d337fd01051c46ca806 (patch)
tree5c83ffc7efa112da870bd5d8502a9d91d4792f35 /platforms/test/platform.mk
parent43b9e23bae12916d5161f03700c9bfe46737324b (diff)
Move tmk_core/common/<plat> (#13918)
Diffstat (limited to 'platforms/test/platform.mk')
-rw-r--r--platforms/test/platform.mk34
1 files changed, 34 insertions, 0 deletions
diff --git a/platforms/test/platform.mk b/platforms/test/platform.mk
new file mode 100644
index 0000000000..eb2424ec5c
--- /dev/null
+++ b/platforms/test/platform.mk
@@ -0,0 +1,34 @@
+SYSTEM_TYPE := $(shell gcc -dumpmachine)
+GCC_VERSION := $(shell gcc --version 2>/dev/null)
+
+CC = $(CC_PREFIX) gcc
+OBJCOPY =
+OBJDUMP =
+SIZE =
+AR =
+NM =
+HEX =
+EEP =
+BIN =
+
+
+COMPILEFLAGS += -funsigned-char
+ifeq ($(findstring clang, ${GCC_VERSION}),)
+COMPILEFLAGS += -funsigned-bitfields
+endif
+COMPILEFLAGS += -ffunction-sections
+COMPILEFLAGS += -fdata-sections
+COMPILEFLAGS += -fshort-enums
+ifneq ($(findstring mingw, ${SYSTEM_TYPE}),)
+COMPILEFLAGS += -mno-ms-bitfields
+endif
+
+CFLAGS += $(COMPILEFLAGS)
+ifeq ($(findstring clang, ${GCC_VERSION}),)
+CFLAGS += -fno-inline-small-functions
+endif
+CFLAGS += -fno-strict-aliasing
+
+CXXFLAGS += $(COMPILEFLAGS)
+CXXFLAGS += -fno-exceptions
+CXXFLAGS += -std=gnu++11