From c59e8b96bedd54b756e0bbfd6ea5e3ad40cadabf Mon Sep 17 00:00:00 2001 From: Midgard Date: Mon, 10 Aug 2020 17:04:21 +0200 Subject: [PATCH] Add makefile --- .gitmodules | 3 +++ arduino-makefile | 1 + src/makefile | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 .gitmodules create mode 160000 arduino-makefile create mode 100644 src/makefile diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f720bb9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Arduino-Makefile"] + path = arduino-makefile + url = https://github.com/sudar/Arduino-Makefile diff --git a/arduino-makefile b/arduino-makefile new file mode 160000 index 0000000..6f786a9 --- /dev/null +++ b/arduino-makefile @@ -0,0 +1 @@ +Subproject commit 6f786a96b0acfb0c9b2d2f4e39911d2803088729 diff --git a/src/makefile b/src/makefile new file mode 100644 index 0000000..5c2b1c7 --- /dev/null +++ b/src/makefile @@ -0,0 +1,19 @@ +ARCHITECTURE = avr +BOARD_TAG = nano +BOARD_SUB = atmega328old +ARDUINO_LIBS = arduino-mcp2515 + +ARDUINO_DEV ?= /dev/ttyUSB0 + +ARDUINO_VERSION ?= 1.5 +ifeq ($(origin ARDUINO_SKETCHBOOK), undefined) +ARDUINO_SKETCHBOOK := $(shell sed -n 's/^sketchbook.path=//p' ~/.arduino$(subst .,,$(ARDUINO_VERSION))/preferences.txt) +endif +ifeq ($(origin BOARDS_TXT), undefined) +BOARDS_TXT := $(shell locate '*/arduino/*/boards.txt') # ¯\_(ツ)_/¯ +endif + +ARDMK_DIR ?= ../arduino-makefile +AVR_TOOLS_DIR ?= /usr + +include $(ARDMK_DIR)/Arduino.mk