sudar/Arduino-Makefile — pull request #238 by ladislas (2014-08-14 17:48:55+00:00)
Title: Add Support for Library Auto-detection

## Note

This a work in progress, made available for testing purposes and collaboration.

Here is the first pull request regarding library auto-detection when one library uses another library, as discussed in https://github.com/sudar/Arduino-Makefile/issues/93

## Goal

Right now we have to `#include` all the libraries used by the sketch and by any other library by hand. This can become quickly cumbersome when you use a lot a libraries...

With library auto-detection, no need to do that anymore.

## Current status

*It works*. I've added an `AUTO_LIB` variable that you can set in your `Makefile` to:

- `1` - to activate auto-detection *or* use the Makefile as usual (with all libraries in the same sketch)
- `0` - to use the Makefile as usual

It works by listing every header file in your `USER_LIB_PATH` folder and including them while compiling.

Even though it's working, the solution is not very elegant.