diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 50 |
1 files changed, 13 insertions, 37 deletions
@@ -1,44 +1,20 @@ -# Arduino specs -ARDUINO_VERSION = 184 -BOARD_TAG = leonardo -ARCHITECTURE = avr -ARDUINO_ARCH_FLAG = -DARDUINO_ARCH_AVR -ARDMK_VENDOR = arduino -ARDUINO_PORT=/dev/ttyACM0 -MONITOR_BAUDRATE = 9600 -OPTIMIZATION_LEVEL=s -DEBUG_FLAGS = -O0 -g -MCU_FLAG_NAME = mmcu +TARGET = gyronardo -# Flags -LOG_MONITOR = 0 +PIO = pio -# Functions -rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d)) +all: $(TARGET) -ARDUINO_VERSION_FULL = 1.8.4 +.PHONY: $(TARGET) upload clean monitor -# Paths -ARDUINO_DIR = $(HOME)/.arduino15/packages/arduino -BOARDS_TXT = $(ARDUINO_DIR)/hardware/$(ARCHITECTURE)/$(ARDUINO_VERSION_FULL)/boards.txt -ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/$(ARCHITECTURE)/$(ARDUINO_VERSION_FULL)/cores/arduino -ARDUINO_PLATFORM_LIB_PATH = $(ARDUINO_DIR)/hardware/$(ARCHITECTURE)/$(ARDUINO_VERSION_FULL)/libraries -ARDUINO_VAR_PATH = $(ARDUINO_DIR)/hardware/$(ARCHITECTURE)/$(ARDUINO_VERSION_FULL)/variants +$(TARGET): + $(PIO) run + $(PIO) run --target compiledb -#ARDUINO_DIR = C:/Arduino -ARDMK_DIR = make-scripts -# AVRDUDE_CONF = /etc/avrdude.conf -OBJDIR = build -#LOCAL_SRCS = $(wildcard src/*.cpp) -LOCAL_CPP_SRCS = $(call rwildcard,src/,*.cpp) -# LOCAL_OBJ_FILES = $(LOCAL_SRCS:.cpp=.cpp.o) +upload: + $(PIO) run --target upload -# Libraries -ARDUINO_LIBS = Wire +clean: + $(PIO) run --target clean -# Target -space := -space += -TARGET = Gyronardo - -include $(ARDMK_DIR)/Arduino.mk +monitor: + $(PIO) run --target monitor |