From cd9780a309109c7e766f9a0715f1ef1b0137db9c Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 4 Oct 2017 23:46:51 -0700 Subject: Fix our arduino-ide package detection to work on OSX --- Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 80a5aad..cf76098 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,16 @@ UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Darwin) +SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino/ +PACKAGE_DIR ?= $(HOME)/Library/Arduino15 +else +SKETCHBOOK_DIR ?= $(HOME)/Arduino +PACKAGE_DIR ?= $(HOME)/.arduino15 +endif + -INSTALLED_ENV=$(shell ls -dt ~/.arduino15/packages/keyboardio/hardware/avr/*|head -n 1) +INSTALLED_ENV=$(shell ls -dt $(PACKAGE_DIR)/packages/keyboardio/hardware/avr/*|head -n 1) ifneq ("$(wildcard $(INSTALLED_ENV)/boards.txt)","") BOARD_HARDWARE_PATH = $(INSTALLED_ENV) @@ -13,13 +21,7 @@ KALEIDOSCOPE_BUILDER_DIR ?= $(INSTALLED_ENV)/libraries/Kaleidoscope/bin/ endif - -ifeq ($(UNAME_S),Darwin) -SKETCHBOOK_DIR ?= $(HOME)/Documents/Arduino/ -else -SKETCHBOOK_DIR ?= $(HOME)/Arduino -endif - BOARD_HARDWARE_PATH ?= $(SKETCHBOOK_DIR)/hardware KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/avr/build-tools/makefiles/ + include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk -- cgit v1.2.3