- "Traumflug" and "Markus Hitter" are the same, mention him only
once.
- Add more common F_CPU choices in comments.
- Hint to another choice in Makefile-example.
Move builds for non-avr target (simulator) into a $(BUILD_FLAVOR)
build subdir (build/sim) to isolate it more completely and
cleanly from the AVR builds. This allows AVR and SIM to use common
build rules again.
Move newly bits out of Makefile-{SIM,AVR} and into Makefile-common.
Test code which wants to customize config.h can do so without
touching config.h itself by wrapping config.h in a macro variable
which is passed in to the compiler. It defaults to "config.h" if
no override is provided.
This change would break makefile dependency checking since the selection
of a different header file on the command line is not noticed by make
as a build-trigger. To solve this, we add a layer to the BUILDDIR path
so build products are now specific to the USER_CONFIG choice if it is
not "config.h".
Dependency automation seems a bit confused in these makefiles.
Clean it up following ancient sage wisdom here:
http://mad-scientist.net/make/autodep.html
In short, use -MMD to generate dependency files for each .o target,
and then use a sed script to extend that to avoiding "missing file"
dependencies when headers are renamed/removed.
Also, make everything dependent on makefiles other than our
autodependency (*.P) makefiles.
Make the BUILDDIR an order-only prerequisite for our targets so any
changed file therein does not cause all other files to appear to be
out of date.
Also, some makefile cleanup:
- Remove obsolete 'depend' target.
- Move AVR-specific targets to AVR makefile.
- Add TARGET variable to identify target to make and to clean.
- Tidy up dependency make.
We have now Makefile-AVR - AVR specific stuff - and
Makefile-common - common build instructions.
This effort is the begin of preparing Teacup for ARM targets.
To build the target, copy or link Makefile-AVR or Makefile-ARM
(depending on your target) to Makefile.