You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.2 KiB
49 lines
1.2 KiB
4 years ago
|
# This makefile for a Kaleidoscope sketch pulls in all the targets
|
||
5 years ago
|
# required to build the example
|
||
|
|
||
|
|
||
|
|
||
|
|
||
4 years ago
|
ifneq ($(KALEIDOSCOPE_DIR),)
|
||
|
search_path += $(KALEIDOSCOPE_DIR)
|
||
|
endif
|
||
5 years ago
|
|
||
4 years ago
|
ifneq ($(ARDUINO_DIRECTORIES_USER),)
|
||
|
search_path += $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||
|
endif
|
||
5 years ago
|
|
||
4 years ago
|
ifeq ($(shell uname -s),Darwin)
|
||
|
search_path += $(HOME)/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||
|
else
|
||
|
search_path += $(HOME)/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
|
||
5 years ago
|
endif
|
||
|
|
||
4 years ago
|
sketch_makefile := etc/makefiles/sketch.mk
|
||
5 years ago
|
|
||
4 years ago
|
$(foreach candidate, $(search_path), $(if $(wildcard $(candidate)/$(sketch_makefile)), $(eval ks_dir ?= $(candidate))))
|
||
5 years ago
|
|
||
4 years ago
|
ifneq ($(ks_dir),)
|
||
5 years ago
|
|
||
4 years ago
|
$(info Using Kaleidoscope from $(ks_dir))
|
||
5 years ago
|
|
||
4 years ago
|
export KALEIDOSCOPE_DIR := $(ks_dir)
|
||
|
include $(ks_dir)/$(sketch_makefile)
|
||
5 years ago
|
|
||
|
else
|
||
|
|
||
4 years ago
|
$(info I can't find your Kaleidoscope installation.)
|
||
5 years ago
|
$(info )
|
||
4 years ago
|
$(info I tried looking in:)
|
||
5 years ago
|
$(info )
|
||
4 years ago
|
$(foreach candidate, $(search_path), $(info $(candidate)))
|
||
5 years ago
|
$(info )
|
||
4 years ago
|
$(info The easiest way to fix this is to set the 'KALEIDOSCOPE_DIR' environment)
|
||
|
$(info variable to the location of your Kaleidoscope directory.)
|
||
5 years ago
|
|
||
|
endif
|
||
4 years ago
|
|
||
|
|
||
|
null-target:
|
||
|
$(info You should never see this message)
|
||
|
@:
|