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
This commit is contained in:
Giovanni Di Sirio 2017-11-21 14:30:17 +00:00
parent 77c0d5d354
commit 31d1b09603
1 changed files with 33 additions and 40 deletions

View File

@ -5,7 +5,7 @@
# Compiler options here. # Compiler options here.
ifeq ($(USE_OPT),) ifeq ($(USE_OPT),)
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif endif
# C specific options here (added to USE_OPT). # C specific options here (added to USE_OPT).
@ -91,6 +91,8 @@ CONFDIR := ./cfg-stm32l476_discovery
BUILDDIR := ./build-stm32l476_discovery BUILDDIR := ./build-stm32l476_discovery
DEPDIR := ./.dep-stm32l476_discovery DEPDIR := ./.dep-stm32l476_discovery
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
# Startup files. # Startup files.
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l4xx.mk include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l4xx.mk
# HAL-OSAL files (optional). # HAL-OSAL files (optional).
@ -101,6 +103,8 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional). # RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.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). # Other files (optional).
include $(CHIBIOS)/test/lib/test.mk include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/test/mfs/mfs_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 # C sources that can be compiled in ARM or THUMB mode depending on the global
# setting. # setting.
CSRC = $(STARTUPSRC) \ CSRC = $(ALLCSRC) \
$(KERNSRC) \
$(PORTSRC) \
$(OSALSRC) \
$(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
$(TESTSRC) \ $(TESTSRC) \
$(M25QSRC) \
$(MFSSRC) \
$(CONFDIR)/portab.c \ $(CONFDIR)/portab.c \
main.c main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global # C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting. # setting.
CPPSRC = CPPSRC = $(AllCPPSRC)
# C sources to be compiled in ARM mode regardless of the global setting. # C sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
@ -151,18 +147,38 @@ TCSRC =
TCPPSRC = TCPPSRC =
# List ASM source files here # List ASM source files here
ASMSRC = ASMSRC = $(ALLASMSRC)
ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) ASMXSRC = $(ALLXASMSRC)
INCDIR = $(CHIBIOS)/os/license \ INCDIR = $(ALLINC) $(TESTINC) $(CONFDIR)
$(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(M25QINC) $(MFSINC) $(STREAMSINC) $(CONFDIR)
# #
# Project, sources and paths # 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 # Compiler settings
# #
@ -202,28 +218,5 @@ CPPWARN = -Wall -Wextra -Wundef
# Compiler settings # 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 RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk include $(RULESPATH)/rules.mk