sudar/Arduino-Makefile — pull request #2 by jeffkowalski (2012-08-19 06:48:45+00:00)
Title: auto-detect all variables

Hi Sudar,

Great work on the makefile. I've enjoyed using it, and have made a few contributions which I hope you'll include. With these changes, the remaining variables can be autodetected, in most cases eliminating the need to create a "wrapper" Makefile to set the vars before including yours. Normal usage will simply be to symlink your makefile into a sketch and execute it.

ARDUINO_LIBS is now derived by default through examination of the source files for the libraries they reference.
ARDUINO_SKETCHBOOK is kept in sync with the value set in the Arduino IDE
ARDMK_DIR is presumed to be the fully resolved location containing this makefile
Utility directories within referenced libraries are also included and built (this is necessary in particular for the system Wire library, and other user-contributed libraries)

The specific changes are broken into 4 separate commits, plus a final commit to update the changelog.

I've tested these changes only on linux, but hopefully have followed conventions that would enable it to work on the target development platforms.

-Jeff