Encountered lousy boo-boo in arduino IDE generated compilation commands

There is another important step.
The .o files from the core files are all put into a real library archive called core.a
(you can see the archive commands "avr-ar" in the build output)
The final link is done by combining the sketch .o files with all the library .o files and then
linking against the core.a library archive and the math library.

Note that the core files are put into a real library while the "library" files are not.
The Arduino IDE does not treat the libraries and their module files like real library archive files.

What would be better is if all the library .o modules were also put into a library archive and then the users
.o files linked against the "libraries" library as well as the core library and the math library.

In fact with proper compiler options, there is no need to do the silly file copying that the IDE is doing
for the library source files.

The IDE is great example of why make and makefiles are so useful and better at doing builds.
The ideal would have been to build the IDE on top of make so that the all the IDE has to do is
build a stub sketch makefile and then let the make and a primary makefile handle all the rules for the actual build.
This would have allowed making tweaks to the build process without having to modify the actual JAVA code.

--- bill