summaryrefslogtreecommitdiff
path: root/Makefile
blob: 3271857a28417c2c803d198527b186bbee8e2a47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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

# Flags
LOG_MONITOR = 0

# Functions
rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))

ARDUINO_VERSION_FULL = 1.8.4

# 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

#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)

# Libraries
ARDUINO_LIBS = Wire

# Target
space :=
space +=
TARGET = Gyronardo

include $(ARDMK_DIR)/Arduino.mk