|
@ -247,16 +247,6 @@ F_CPU ?= 16000000 |
|
|
# Libraries, the "hardware variant" are for boards
|
|
|
# Libraries, the "hardware variant" are for boards
|
|
|
# that derives from that, and their source are present in
|
|
|
# that derives from that, and their source are present in
|
|
|
# the main Marlin source directory
|
|
|
# the main Marlin source directory
|
|
|
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Sanguino)) |
|
|
|
|
|
HARDWARE_DIR = $(ARDUINO_INSTALL_DIR)/hardware |
|
|
|
|
|
else |
|
|
|
|
|
ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true) |
|
|
|
|
|
HARDWARE_DIR = ../ArduinoAddons/Arduino_1.x.x |
|
|
|
|
|
else |
|
|
|
|
|
HARDWARE_DIR = ../ArduinoAddons/Arduino_0.xx |
|
|
|
|
|
endif |
|
|
|
|
|
endif |
|
|
|
|
|
HARDWARE_SRC= $(HARDWARE_DIR)/arduino/avr/cores/arduino |
|
|
|
|
|
|
|
|
|
|
|
TARGET = $(notdir $(CURDIR)) |
|
|
TARGET = $(notdir $(CURDIR)) |
|
|
|
|
|
|
|
@ -266,12 +256,10 @@ TARGET = $(notdir $(CURDIR)) |
|
|
|
|
|
|
|
|
VPATH = . |
|
|
VPATH = . |
|
|
VPATH += $(BUILD_DIR) |
|
|
VPATH += $(BUILD_DIR) |
|
|
VPATH += $(HARDWARE_SRC) |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino |
|
|
ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino)) |
|
|
|
|
|
VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/LiquidCrystal/src |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI |
|
|
VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/SPI |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src |
|
|
VPATH += $(HARDWARE_DIR)/arduino/avr/libraries/SPI |
|
|
|
|
|
VPATH += $(HARDWARE_DIR)/arduino/avr/libraries/SPI/src |
|
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src |
|
|
ifeq ($(LIQUID_TWI2), 1) |
|
|
ifeq ($(LIQUID_TWI2), 1) |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire |
|
@ -282,22 +270,9 @@ ifeq ($(WIRE), 1) |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility |
|
|
endif |
|
|
endif |
|
|
else |
|
|
|
|
|
VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal |
|
|
|
|
|
VPATH += $(HARDWARE_DIR)/libraries/SPI |
|
|
|
|
|
ifeq ($(LIQUID_TWI2), 1) |
|
|
|
|
|
VPATH += $(HARDWARE_DIR)/libraries/Wire |
|
|
|
|
|
VPATH += $(HARDWARE_DIR)/libraries/Wire/utility |
|
|
|
|
|
VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2 |
|
|
|
|
|
endif |
|
|
|
|
|
ifeq ($(WIRE), 1) |
|
|
|
|
|
VPATH += $(HARDWARE_DIR)/libraries/Wire |
|
|
|
|
|
VPATH += $(HARDWARE_DIR)/libraries/Wire/utility |
|
|
|
|
|
endif |
|
|
|
|
|
endif |
|
|
|
|
|
ifeq ($(HARDWARE_VARIANT), arduino) |
|
|
ifeq ($(HARDWARE_VARIANT), arduino) |
|
|
HARDWARE_SUB_VARIANT ?= mega |
|
|
HARDWARE_SUB_VARIANT ?= mega |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/$(HARDWARE_SUB_VARIANT) |
|
|
|
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT) |
|
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT) |
|
|
else |
|
|
else |
|
|
ifeq ($(HARDWARE_VARIANT), Sanguino) |
|
|
ifeq ($(HARDWARE_VARIANT), Sanguino) |
|
@ -320,7 +295,8 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \ |
|
|
SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \
|
|
|
SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \
|
|
|
temperature.cpp cardreader.cpp configuration_store.cpp \
|
|
|
temperature.cpp cardreader.cpp configuration_store.cpp \
|
|
|
watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
|
|
|
watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
|
|
|
dac_mcp4728.cpp vector_3.cpp qr_solve.cpp endstops.cpp stopwatch.cpp utility.cpp |
|
|
dac_mcp4728.cpp vector_3.cpp qr_solve.cpp endstops.cpp stopwatch.cpp utility.cpp \
|
|
|
|
|
|
printcounter.cpp nozzle.cpp |
|
|
ifeq ($(LIQUID_TWI2), 0) |
|
|
ifeq ($(LIQUID_TWI2), 0) |
|
|
CXXSRC += LiquidCrystal.cpp |
|
|
CXXSRC += LiquidCrystal.cpp |
|
|
else |
|
|
else |
|
@ -393,7 +369,7 @@ ifneq ($(HARDWARE_MOTHERBOARD),) |
|
|
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD} |
|
|
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD} |
|
|
endif |
|
|
endif |
|
|
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
|
|
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
|
|
CEXTRA = -fno-use-cxa-atexit |
|
|
CEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics |
|
|
|
|
|
|
|
|
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) $(CSTANDARD) |
|
|
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) $(CSTANDARD) |
|
|
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) -Wall $(CEXTRA) $(CTUNING) $(CXXSTANDARD) |
|
|
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) -Wall $(CEXTRA) $(CTUNING) $(CXXSTANDARD) |
|
|