Introduce a Makefile for the OS_NONE device example

It currently supports the SAMD21 and SAMD51 only. More will be
added later.
This commit is contained in:
Scott Shawcroft
2018-11-24 10:55:51 -08:00
parent 3bb53273cd
commit bf70f89240
16 changed files with 548 additions and 19 deletions

17
tools/top.mk Normal file
View File

@@ -0,0 +1,17 @@
ifneq ($(lastword a b),b)
$(error This Makefile require make 3.81 or newer)
endif
# 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))
TOP := $(patsubst %/tools/top.mk,%,$(THIS_MAKEFILE))
TOP := $(shell realpath $(TOP))
$(info Top directory is $(TOP))
CURRENT_PATH := $(shell realpath --relative-to=$(TOP) `pwd`)
$(info Path from top is $(CURRENT_PATH))