Removed ARDMK_FILE as it was in the wrong case and a bit pointless anyway.
Fixed ChipKIT.mk which wouldn't work when packaged and had a lot of
duplicated code (needs checking this still works!)
Removed the git vs. package detection of the arduino-mk subdirectory -
ARDMK_DIR is now calculated based on where the *.mk files are.
Removed ARDMK_PATH as we now check for ard-reset-arduino in the $PATH
when packaged or fall back to it being one level above the *.mk files
in bin/ when checked out of git.
Merged Common.mk back into Arduino.mk as it meant nasty workarounds for
missing routines e.g. dir_if_exists and show_config_variable which
meant that AUTO_ARDUINO_DIR was broken.
So now all you need to set is BOARD_TAG (plus MONITOR_PORT or ISP_PROG
for upload/reset).
If `ARDMK_DIR` is not defined, then it is assumed to be the directory
where `Arduino.mk` or `chipKIT.mk` is present.
Since this assumption is made, `ARDMK_DIR` will always be set, whether
the user has explicitly set it or not. Therefore checking whether
`ARDMK_DIR` is not set is unnecessary. This commit removes these
unnecessary checks.
When support for ChipKit was added recently (issue #98) it broke the way
ARDMK_PATH and ARDMK_DIR were handled, if the package was installed
through package. It was only working if you have done a git checkout.
This commit fixes it, but searching for `Common.mk` both in
`ARDMK_DIR/arduino-mk` and `ARDMK_DIR/` directories.
Fix#110
It should be possible to use the Makefile without ever running the
Arduino or chipKIT IDE. This change only looks for the preferences file
if the sketchbook path is not defined, and even then, will use the
default skethbook path if the preferences file is unavailable.
This commit modifies a few things in Arduino.mk to be able to support
overriding the necessary configuration options to support the chipKIT build,
and also includes an example sketch configured to build for the Max32 platform.
In addition the following changes were done as well
- Control C standard with a CFLAGS_STD flag, GNU99 by default.
- Duplicate show_config_variable in each sub-makefile.
- Remove redundant output of ARDUINO_PREFERENCES_PATH from config table.
- Defer Priting ARDMK_DIR until Arduino.mk.
- Define names of compiler tools earlier to use for path checking.
Duplicating show_config_variable is unfortunate because the code is duplicated,
but I don't see a good way around it since we need to dupliacate the check
for ARDMK_DIR before we can find Common.mk.
Fix#98