From e92cdf6b58b655eae2332c367a175797802e86a7 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 23 May 2017 18:29:30 -0700 Subject: Switch to more standard kaleidoscope plugin build infra --- Makefile | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3