summaryrefslogtreecommitdiff
path: root/examples/make.mk
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-11-23 11:44:14 +0700
committerhathach <[email protected]>2023-11-23 11:44:14 +0700
commit51312f70fde779f59dcc48b41132291c10d3ad0b (patch)
treeabf7ea5c2fbd6bfddd66930f3fefc88fd1a3bf5b /examples/make.mk
parent08f9ed67c92421cbd0bc09270d2f363886681866 (diff)
move make to examples/build_system
add -Wl,--no-warn-rwx-segment for gcc 12+
Diffstat (limited to 'examples/make.mk')
-rw-r--r--examples/make.mk18
1 files changed, 8 insertions, 10 deletions
diff --git a/examples/make.mk b/examples/make.mk
index 448d7883d..b646b46ce 100644
--- a/examples/make.mk
+++ b/examples/make.mk
@@ -2,14 +2,10 @@
# Common make definition for all examples
# ---------------------------------------
-# Supported toolchain: gcc, iar
-TOOLCHAIN ?= gcc
-
#-------------- TOP and CURRENT_PATH ------------
-# Set TOP to be the path to get from the current directory (where make was
-# invoked) to the top of the tree. $(lastword $(MAKEFILE_LIST)) returns
-# the name of this makefile relative to where make was invoked.
+# Set TOP to be the path to get from the current directory (where make was invoked) to the top of the tree.
+# $(lastword $(MAKEFILE_LIST)) returns the name of this makefile relative to where make was invoked.
THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
# strip off /tools/top.mk to get for example ../../..
@@ -38,7 +34,6 @@ __check_defined = \
$(if $(value $1),, \
$(error Undefined make flag: $1$(if $2, ($2))))
-
# Build directory
BUILD := _build/$(BOARD)
@@ -73,7 +68,10 @@ else
SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FAMILY_PATH)/*.c))
endif
-#-------------- Cross Compiler ------------
+#-------------- Toolchain ------------
+
+# Supported toolchain: gcc, iar
+TOOLCHAIN ?= gcc
# Can be set by board, default to ARM GCC
CROSS_COMPILE ?= arm-none-eabi-
@@ -139,8 +137,8 @@ endif
# CPU specific flags
ifdef CPU_CORE
-include $(TOP)/tools/make/cpu/$(CPU_CORE).mk
+ include ${TOP}/examples/build_system/make/cpu/$(CPU_CORE).mk
endif
# toolchain specific
-include $(TOP)/tools/make/toolchain/arm_$(TOOLCHAIN).mk
+include ${TOP}/examples/build_system/make/toolchain/arm_$(TOOLCHAIN).mk