aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Vincent <jesse@keyboard.io>2017-02-28 17:51:54 +0800
committerJesse Vincent <jesse@keyboard.io>2017-02-28 17:51:54 +0800
commit7f42dae5ad137cfcd42ca6ebeecadb95c17cd86b (patch)
treeaf0d2d6fb239c16d3f1c5706359d6d903415a418
parentb34785706c65b4e10eb76af44a1e0eeb448cf632 (diff)
downloadModel01-Firmware-7f42dae5ad137cfcd42ca6ebeecadb95c17cd86b.tar.gz
Model01-Firmware-7f42dae5ad137cfcd42ca6ebeecadb95c17cd86b.zip
First step of getting the makefile to use an external kaleidoscope builder
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e73d34f..b39fc75 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,16 @@
+## Platform-specific overrides
+# Shamelessly stolen from git's Makefile
+uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+
+ARDUINO_HARDWARE_PATH=${HOME}/Arduino/hardware
+
+ifeq ($(uname_S),Darwin)
+ ARDUINO_HARDWARE_PATH=${HOME}/Documents/Arduino/hardware
+endif
+
+BUILDER_PATH=${ARDUINO_HARDWARE_PATH}/keyboardio/avr/libraries/Kaleidoscope/tools/kaleidoscope-builder
+
+
# default action for `make` is `build`
build:
@@ -7,4 +20,4 @@ astyle:
find . -type f -name \*.h |xargs -n 1 astyle --style=google
%:
- @tools/kaleidoscope-builder $@
+ ${BUILDER_PATH} $@