aboutsummaryrefslogtreecommitdiff
path: root/Teensy.mk
diff options
context:
space:
mode:
authorstepcut <jeremy@n-heptane.com>2014-10-22 15:27:59 -0500
committerstepcut <jeremy@n-heptane.com>2014-10-22 15:27:59 -0500
commit6534cf8f15e64df55bb98576e43fb46855bdbd2a (patch)
tree1bf50d2d2254fc8590423944c60491bf2b33b2ed /Teensy.mk
parent1f5e0b33671fe1032163a3a8e3af9366cd758b9b (diff)
move ARDUINO_DIR auto-detection into Common.mk. This allows Teensy.mk to use auto-detected location.
Diffstat (limited to 'Teensy.mk')
-rw-r--r--Teensy.mk33
1 files changed, 24 insertions, 9 deletions
diff --git a/Teensy.mk b/Teensy.mk
index 3b9676d..42282aa 100644
--- a/Teensy.mk
+++ b/Teensy.mk
@@ -4,7 +4,9 @@
#
# https://www.pjrc.com/teensy/
#
-# Example sketch: https://github.com/stepcut/teensy-blink
+# You must install teensyduino for this Makefile to work:
+#
+# http://www.pjrc.com/teensy/teensyduino.html
#
# Copyright (C) 2014 Jeremy Shaw <jeremy@n-heptane.com> based on
# work that is copyright Sudar, Nicholas Zambetti, David A. Mellis
@@ -19,12 +21,18 @@
#
# Original Arduino adaptation by mellis, eighthave, oli.keller
#
-# Current version: 1.3.4
-#
# Refer to HISTORY.md file for complete history of changes
#
########################################################################
+
+ifndef ARDMK_DIR
+ ARDMK_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
+endif
+
+# include Common.mk now we know where it is
+include $(ARDMK_DIR)/Common.mk
+
VENDOR = teensy
ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/teensy/cores/teensy3
BOARDS_TXT = $(ARDUINO_DIR)/hardware/$(VENDOR)/boards.txt
@@ -121,11 +129,22 @@ ifndef MCU
MCU := $(call PARSE_TEENSY,$(BOARD_TAG),build.cpu)
ifndef MCU
MCU := $(call PARSE_TEENSY,$(BOARD_TAG),build.mcu)
- else
- MCU_FLAG_NAME=mcpu
endif
endif
+ifndef MCU_FLAG_NAME
+ MCU_FLAG_NAME=mcpu
+endif
+
+#ifndef MCU
+# MCU := $(call PARSE_TEENSY,$(BOARD_TAG),build.cpu)
+# ifndef MCU
+# MCU := $(call PARSE_TEENSY,$(BOARD_TAG),build.mcu)
+# else
+# MCU_FLAG_NAME=mcpu
+# endif
+#endif
+
########################################################################
# FLAGS
@@ -159,8 +178,4 @@ RESET_CMD = nohup $(ARDUINO_DIR)/hardware/tools/teensy_post_compile -board=$(BOA
########################################################################
# automatially include Arduino.mk for the user
-ifndef ARDMK_DIR
- ARDMK_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
-endif
-
include $(ARDMK_DIR)/Arduino.mk