sudar/Arduino-Makefile — pull request #291 by ladislas (2014-11-10 10:55:30+00:00)
Title: Add library auto-detection when compiling a sketch

This PR adds library auto-detection when compiling a sketch, which means that you don't need to list all the libraries used in your sketch.

For example:

If `LibOne.h` includes `LibTwo.h` and `LibThree.h`, you **just** need to:

```cpp
#include "LibOne.h"
```
and you **don't** need to:

```cpp
#include "LibOne.h"
#include "LibTwo.h"
#include "LibThree.h"
```

It also fixes speed issues for auto-detection introduced with #277 and referenced in #280.

I got it fixed by using `:=` instead of `=` for [`USER_LIBS`](https://github.com/WeAreLeka/Arduino-Makefile/blob/automatic-lib-detection/Arduino.mk#L886), [`SKETCH_LIBS and SKETCH_LIBS_DEPS`](https://github.com/WeAreLeka/Arduino-Makefile/blob/automatic-lib-detection/Arduino.mk#L769).

It is open for testing and should be good for everyone. :)