Building a Framework

Now that we have, we can start to build a framework around our new automation.

Create Build System Directory

Create the nospb directory in the top level directory of your project. Under the nospb directory, create the mk directory.

cd MyProject
mkdir nospb
cd nospb
mkdir mk

Copy to nospb/mk.

Create the Rules Framework

Create a file under nospb/mk called We’ll need a little extra logic in this file to figure out the path to nospb/mk.

# Determine the directory that contains  May be empty path.
__nospb_dir:=$(patsubst,%,$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))

# Declare the "default" target first to guarantee order.

all:: default

# If the Makefile declares SUBDIRS, include
    include $(__nospb_dir)