From 31d1b0960369e112ebff47eebb95c2c90a35d1f1 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 21 Nov 2017 14:30:17 +0000 Subject: Prototype makefile using the new inclusion mechanism and autobuilder. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11052 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../multi/QSPI-MFS/Makefile-stm32l476_discovery | 73 ++++++++++------------ 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/testhal/STM32/multi/QSPI-MFS/Makefile-stm32l476_discovery b/testhal/STM32/multi/QSPI-MFS/Makefile-stm32l476_discovery index ff8483b94..7512eb088 100644 --- a/testhal/STM32/multi/QSPI-MFS/Makefile-stm32l476_discovery +++ b/testhal/STM32/multi/QSPI-MFS/Makefile-stm32l476_discovery @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). @@ -91,6 +91,8 @@ CONFDIR := ./cfg-stm32l476_discovery BUILDDIR := ./build-stm32l476_discovery DEPDIR := ./.dep-stm32l476_discovery +# Licensing files. +include $(CHIBIOS)/os/license/license.mk # Startup files. include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l4xx.mk # HAL-OSAL files (optional). @@ -101,6 +103,8 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk # RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk +# Auto-build files in ./source recursively. +include $(CHIBIOS)/tools/mk/autobuild.mk # Other files (optional). include $(CHIBIOS)/test/lib/test.mk include $(CHIBIOS)/test/mfs/mfs_test.mk @@ -113,22 +117,14 @@ LDSCRIPT= $(STARTUPLD)/STM32L476xG.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(STARTUPSRC) \ - $(KERNSRC) \ - $(PORTSRC) \ - $(OSALSRC) \ - $(HALSRC) \ - $(PLATFORMSRC) \ - $(BOARDSRC) \ +CSRC = $(ALLCSRC) \ $(TESTSRC) \ - $(M25QSRC) \ - $(MFSSRC) \ $(CONFDIR)/portab.c \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CPPSRC = +CPPSRC = $(AllCPPSRC) # C sources to be compiled in ARM mode regardless of the global setting. # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler @@ -151,18 +147,38 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = -ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) +ASMSRC = $(ALLASMSRC) +ASMXSRC = $(ALLXASMSRC) -INCDIR = $(CHIBIOS)/os/license \ - $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ - $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ - $(M25QINC) $(MFSINC) $(STREAMSINC) $(CONFDIR) +INCDIR = $(ALLINC) $(TESTINC) $(CONFDIR) # # Project, sources and paths ############################################################################## +############################################################################## +# Start of user section +# + +# List all user C define here, like -D_DEBUG=1 +UDEFS = + +# Define ASM defines here +UADEFS = + +# List all user directories here +UINCDIR = + +# List the user directory to look for the libraries here +ULIBDIR = + +# List all user libraries here +ULIBS = + +# +# End of user section +############################################################################## + ############################################################################## # Compiler settings # @@ -202,28 +218,5 @@ CPPWARN = -Wall -Wextra -Wundef # Compiler settings ############################################################################## -############################################################################## -# Start of user section -# - -# List all user C define here, like -D_DEBUG=1 -UDEFS = - -# Define ASM defines here -UADEFS = - -# List all user directories here -UINCDIR = - -# List the user directory to look for the libraries here -ULIBDIR = - -# List all user libraries here -ULIBS = - -# -# End of user defines -############################################################################## - RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC include $(RULESPATH)/rules.mk -- cgit v1.2.3