From d36536e3743f5868f39908762bdab728802232b3 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 25 Jun 2019 15:26:46 +0200 Subject: Use 'arduino-mk' as build system. It feels simpler than `arduino-builder` and we can rely on more OS-shipped components. Also for some reason with `arduino-builder` weak symbols don't always seem to be overriden properly. --- Makefile | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ba2d8ab..86ad49e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,30 @@ -BOARD_HARDWARE_PATH ?= ./lib/hardware -KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR ?= keyboardio/build-tools/makefiles +AVR_TOOLS_DIR = /usr +ARDUINO_DIR = /usr/local/arduino +ARDMK_DIR = /usr/share/arduino +ARDMK_VENDOR = arduino --include $(BOARD_HARDWARE_PATH)/$(KALEIDOSCOPE_PLUGIN_MAKEFILE_DIR)/rules.mk +ARCHITECTURE = avr +BOARD_TAG = model01 +ALTERNATE_CORE = keyboardio + +ARDUINO_SKETCHBOOK = ./lib +ARDUINO_VERSION = $(shell tr "." "0" <$(ARDUINO_DIR)/lib/version.txt) + +SOURCEDIR = ./src +OBJDIR = ./build +LOCAL_CPP_SRCS = $(wildcard $(SOURCEDIR)/*.cpp) +LOCAL_INO_SRCS = $(wildcard $(SOURCEDIR)/*.ino) + +USER_LIB_PATH = $(ALTERNATE_CORE_PATH)/libraries +ARDUINO_LIBS = EEPROM Kaleidoscope Kaleidoscope-HIDAdaptor-KeyboardioHID KeyboardioHID KeyboardioScanner + +# extra definitions from boards.txt +CXXFLAGS = -DARDUINO_AVR_MODEL01 \ + -DUSB_MANUFACTURER="\"keyboardio\"" -DUSB_PRODUCT="\"Model 01\"" \ + -DKALEIDOSCOPE_HARDWARE_H="\"Kaleidoscope-Hardware-Model01.h\"" + +AVRDUDE_OPTS = -q +AVRDUDE_CONF = /etc/avrdude.conf +#MONITOR_PORT = $(firstword $(wildcard /dev/serial/by-id/usb-keyboardio_Model_01_*)) + +include $(ARDMK_DIR)/Arduino.mk -- cgit v1.2.3