move make.mk and rules.mk to build_system/make

This commit is contained in:
hathach 2023-11-23 20:19:14 +07:00
parent 7213b8abb1
commit 26ca48e7a7
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
34 changed files with 65 additions and 65 deletions

2
.idea/cmake.xml generated
View File

@ -63,7 +63,7 @@
<configuration PROFILE_NAME="stm32f411disco" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32f411disco -DLOG=2 -DLOGGER=RTT" />
<configuration PROFILE_NAME="stm32f769disco" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32f769disco -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="stm32h743eval" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32h743eval -DLOG=3 -DLOGGER=RTT -DTRACE_ETM=1" />
<configuration PROFILE_NAME="stm32h743nucleo" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32h743nucleo -DLOG=3 -DLOGGER=RTT" />
<configuration PROFILE_NAME="stm32h743nucleo" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32h743nucleo -DLOG=3" />
<configuration PROFILE_NAME="stm32l476disco" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32l476disco" />
<configuration PROFILE_NAME="stm32g0b1nucleo" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32g0b1nucleo" />
<configuration PROFILE_NAME="stm32g474nucleo" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=stm32g474nucleo" />

View File

@ -8,9 +8,9 @@
# $(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 ../../..
# strip off /examples/build_system/make to get for example ../../..
# and Set TOP to an absolute path
TOP = $(abspath $(subst make.mk,..,$(THIS_MAKEFILE)))
TOP = $(abspath $(subst make.mk,../../..,$(THIS_MAKEFILE)))
# Set CURRENT_PATH to the relative path from TOP to the current directory, ie examples/device/cdc_msc_freertos
CURRENT_PATH = $(subst $(TOP)/,,$(abspath .))

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -11,4 +11,4 @@ EXAMPLE_SOURCE += \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -12,4 +12,4 @@ EXAMPLE_SOURCE += \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
FREERTOS_SRC = lib/FreeRTOS-Kernel
FREERTOS_PORTABLE_PATH= $(FREERTOS_SRC)/portable/$(if $(USE_IAR),IAR,GCC)
@ -43,4 +43,4 @@ CFLAGS_GCC += -Wno-error=cast-qual
# FreeRTOS (lto + Os) linker issue
LDFLAGS_GCC += -Wl,--undefined=vTaskSwitchContext
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -13,4 +13,4 @@ EXAMPLE_SOURCE += \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -11,4 +11,4 @@ EXAMPLE_SOURCE = \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -11,4 +11,4 @@ EXAMPLE_SOURCE = \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,6 +1,6 @@
DEPS_SUBMODULES += lib/FreeRTOS-Kernel
include ../../make.mk
include ../../build_system/make/make.mk
FREERTOS_SRC = lib/FreeRTOS-Kernel
FREERTOS_PORTABLE_PATH= $(FREERTOS_SRC)/portable/$(if $(USE_IAR),IAR,GCC)
@ -44,4 +44,4 @@ CFLAGS_GCC += -Wno-error=cast-qual
# FreeRTOS (lto + Os) linker issue
LDFLAGS_GCC += -Wl,--undefined=vTaskSwitchContext
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,6 +1,6 @@
DEPS_SUBMODULES += lib/lwip
include ../../make.mk
include ../../build_system/make/make.mk
# suppress warning caused by lwip
CFLAGS_GCC += \
@ -67,4 +67,4 @@ SRC_C += \
lib/networking/dnserver.c \
lib/networking/rndis_reports.c
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
ifeq ($(DISABLE_MJPEG),1)
CFLAGS += -DCFG_EXAMPLE_VIDEO_DISABLE_MJPEG
@ -15,4 +15,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -15,4 +15,4 @@ SRC_C += \
src/host/hub.c \
src/host/usbh.c
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -10,4 +10,4 @@ EXAMPLE_SOURCE += \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -13,4 +13,4 @@ EXAMPLE_SOURCE = \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
FREERTOS_SRC = lib/FreeRTOS-Kernel
FREERTOS_PORTABLE_PATH= $(FREERTOS_SRC)/portable/$(if $(USE_IAR),IAR,GCC)
@ -31,4 +31,4 @@ SRC_C += \
SRC_S += \
$(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.s))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -11,4 +11,4 @@ EXAMPLE_SOURCE += \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
FATFS_PATH = lib/fatfs/source
@ -24,4 +24,4 @@ SRC_C += \
# suppress warning caused by fatfs
CFLAGS += -Wno-error=cast-qual
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -1,4 +1,4 @@
include ../../make.mk
include ../../build_system/make/make.mk
INC += \
src \
@ -8,4 +8,4 @@ INC += \
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk
include ../../build_system/make/rules.mk

View File

@ -43,9 +43,9 @@ if __name__ == '__main__':
# If examples are not specified in arguments, build all
all_examples = []
for d in os.scandir("examples"):
if d.is_dir() and 'cmake' not in d.name:
if d.is_dir() and 'cmake' not in d.name and 'build_system' not in d.name:
for entry in os.scandir(d.path):
if entry.is_dir() and 'cmake' not in entry.name and entry.name != 'build_system':
if entry.is_dir() and 'cmake' not in entry.name:
all_examples.append(d.name + '/' + entry.name)
filter_with_input(all_examples)
all_examples.sort()