spark/core-firmware — pull request #206 by sej7278 (2014-05-22 14:37:53+00:00)
Title: New local build setup.

See https://community.spark.io/t/tweak-request-to-core-firmware-src-build-mk/2900/14

Put whatever subdirectories you like in the applications directory, they won't conflict with the upstream core-firmware git repo. The directory structure should be, for example:

```
bmp085_test/
bmp085_test.cpp (main file)
bmp085.cpp (library)
bmp085.h (library)
build.mk (makefile)
```

Then bmp085_test/build.mk should be, for example:

```
ifeq ($(APP),bmp085_test)
INCLUDE_DIRS += applications/bmp085_test
CPPSRC += applications/bmp085_test/bmp085_test.cpp
CPPSRC += applications/bmp085_test/bmp085.cpp
endif
```

Refer to the default tinker application for details.

When you want to compile a specific application, call make and pass in the application's name, for example:

```
make APP=bmp085_test
```
Or to simply compile the default tinker application, omit the APP flag, for example:

```
make clean all
```

If you wish to change the default application, or don't want to pass in the APP flag each time, then edit the APP in applications/build.mk, for example:

```
APP=bmp085_test
```

Then just call make.