diff options
author | Jesse Vincent <jesse@keyboard.io> | 2017-10-04 23:46:51 -0700 |
---|---|---|
committer | Jesse Vincent <jesse@keyboard.io> | 2017-10-04 23:46:51 -0700 |
commit | cd9780a309109c7e766f9a0715f1ef1b0137db9c (patch) | |
tree | 7b05c429a745d12b4f3c72857cef09c915b19430 /Makefile | |
parent | beb849f84f6f96019e5c57c2800d033946bd0b07 (diff) | |
download | Model01-Firmware-cd9780a309109c7e766f9a0715f1ef1b0137db9c.tar.gz Model01-Firmware-cd9780a309109c7e766f9a0715f1ef1b0137db9c.zip |
Fix our arduino-ide package detection to work on OSX
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -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 |