aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJesse Vincent <jesse@keyboard.io>2017-05-23 18:29:30 -0700
committerJesse Vincent <jesse@keyboard.io>2017-05-23 18:29:30 -0700
commite92cdf6b58b655eae2332c367a175797802e86a7 (patch)
treeb676ced582a776c635dffcfdaff335d106985a18 /Makefile
parentCut down the example key layouts (diff)
downloadkeyboardio-model01-e92cdf6b58b655eae2332c367a175797802e86a7.tar.gz
keyboardio-model01-e92cdf6b58b655eae2332c367a175797802e86a7.tar.bz2
keyboardio-model01-e92cdf6b58b655eae2332c367a175797802e86a7.zip
Switch to more standard kaleidoscope plugin build infra
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 8 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index b39fc75..9ce0c4a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,23 +1,12 @@
-## Platform-specific overrides
-# Shamelessly stolen from git's Makefile
-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+# This stub makefile for a Kaleidoscope plugin pulls in
+# all targets from the Kaleidoscope-Plugin library
-ARDUINO_HARDWARE_PATH=${HOME}/Arduino/hardware
+MAKEFILE_PREFIX=keyboardio/avr/libraries/Kaleidoscope-Plugin/build
+UNAME_S := $(shell uname -s)
-ifeq ($(uname_S),Darwin)
- ARDUINO_HARDWARE_PATH=${HOME}/Documents/Arduino/hardware
+BOARD_HARDWARE_PATH ?= $(HOME)/Arduino/hardware
+ifeq ($(UNAME_S),Darwin)
+BOARD_HARDWARE_PATH ?= $(HOME)/Library/Arduino/hardware
endif
-BUILDER_PATH=${ARDUINO_HARDWARE_PATH}/keyboardio/avr/libraries/Kaleidoscope/tools/kaleidoscope-builder
-
-
-# default action for `make` is `build`
-build:
-
-astyle:
- find . -type f -name \*.cpp |xargs -n 1 astyle --style=google
- find . -type f -name \*.ino |xargs -n 1 astyle --style=google
- find . -type f -name \*.h |xargs -n 1 astyle --style=google
-
-%:
- ${BUILDER_PATH} $@
+include $(BOARD_HARDWARE_PATH)/$(MAKEFILE_PREFIX)/*.mk