Comments on Arduino 1.5 Specifications

cmaglie:
@avenue33

avenue33:
My only concerns is the header is on one folder while the code is on another.

Not easy to deal with using plain makefile!

why not?

I have the same problem with the eclipse plugin that is also based on (automatically generated) makefiles.
Basically the code included in the project is "the root folder and all subfolders"
Having method 1 as you describe makes I have 1 folder for each library.
For method 2 I have to do something smart because I do not need all subfolders.
In your servo example for method 1 I only need the folder
./libraries/Servo/src ( Great I don't even need to exclude examples)
To be added to the include and source path.
In method 2 I need to include
./libraries/Servo2/src
To the include path (and probably also to the source path)
and
./libraries/arch/${arch}
to the include and source path.
I think this has following disadvantages:

  1. It is more work for the tool (while C/C++ has already fixed this)
  2. It breaks upwards compatibility for tools.
  3. It is not obvious from the code what is going on.
  4. There is no easy way to notice a hardware is not supported.

I was wondering: have you considered a c/cpp file like this?

#ifdef ARDUINO_ARCH_AVR
#include ../arch/avr/Servo.cpp
#elif ARDUINO_ARCH_SAM
#include ../arch/avr/Servo.cpp
#else
#error The hardware is not supported
#endif

Best regards
Jantje