blob: 1c553593db647619501a3a92b50930144a09922c [file] [log] [blame]
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
####################################################################################################
## Generate a baremetal application for the microcontroller ##
## ##
## Documentation: doc/sw_build_flow.md ##
## ##
## Mandatory variables that need to be set over the command line: ##
## SW_DIR: this is the partial directory path to the SW test being built starting from sw/ ##
## ex: if running hello_world.c, then SW_DIR=examples/hello_world ##
## At this location, there needs to be a 'srcs.mk' file that contains the list of ##
## SW_SRCS to be built for that SW test. ##
## SW_NAME: This is the name of the SW test begin run. Optional if SW_DIR name (last dir) is ##
## the same as the SW test name. ##
## ##
## Optional variables: ##
## SW_BUILD_DIR: This is the output location for generating all sources ##
## SW_FLAGS Global args to pass on to the compiler ##
## SW_OPTS Global args to pass on to the sub-make commands ##
####################################################################################################
# Generate a baremetal application for the microcontroller
SW_ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SW_DIR ?= device/examples/hello_world
# sources
STANDALONE_SW ?= 0
include ${SW_DIR}/srcs.mk
include device/exts/common/srcs.mk
include device/lib/srcs.mk
# common options and rules
include opts.mk
include rules.mk