|
@@ -247,16 +247,6 @@ F_CPU ?= 16000000
|
247
|
247
|
# Libraries, the "hardware variant" are for boards
|
248
|
248
|
# that derives from that, and their source are present in
|
249
|
249
|
# the main Marlin source directory
|
250
|
|
-ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Sanguino))
|
251
|
|
-HARDWARE_DIR = $(ARDUINO_INSTALL_DIR)/hardware
|
252
|
|
-else
|
253
|
|
-ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
|
254
|
|
-HARDWARE_DIR = ../ArduinoAddons/Arduino_1.x.x
|
255
|
|
-else
|
256
|
|
-HARDWARE_DIR = ../ArduinoAddons/Arduino_0.xx
|
257
|
|
-endif
|
258
|
|
-endif
|
259
|
|
-HARDWARE_SRC= $(HARDWARE_DIR)/arduino/avr/cores/arduino
|
260
|
250
|
|
261
|
251
|
TARGET = $(notdir $(CURDIR))
|
262
|
252
|
|
|
@@ -266,12 +256,10 @@ TARGET = $(notdir $(CURDIR))
|
266
|
256
|
|
267
|
257
|
VPATH = .
|
268
|
258
|
VPATH += $(BUILD_DIR)
|
269
|
|
-VPATH += $(HARDWARE_SRC)
|
270
|
|
-ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino))
|
271
|
|
-VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/LiquidCrystal/src
|
272
|
|
-VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/SPI
|
273
|
|
-VPATH += $(HARDWARE_DIR)/arduino/avr/libraries/SPI
|
274
|
|
-VPATH += $(HARDWARE_DIR)/arduino/avr/libraries/SPI/src
|
|
259
|
+VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/cores/arduino
|
|
260
|
+
|
|
261
|
+VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI
|
|
262
|
+VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/libraries/SPI/src
|
275
|
263
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
|
276
|
264
|
ifeq ($(LIQUID_TWI2), 1)
|
277
|
265
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
|
|
@@ -282,22 +270,9 @@ ifeq ($(WIRE), 1)
|
282
|
270
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
|
283
|
271
|
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
|
284
|
272
|
endif
|
285
|
|
-else
|
286
|
|
-VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal
|
287
|
|
-VPATH += $(HARDWARE_DIR)/libraries/SPI
|
288
|
|
-ifeq ($(LIQUID_TWI2), 1)
|
289
|
|
-VPATH += $(HARDWARE_DIR)/libraries/Wire
|
290
|
|
-VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
|
291
|
|
-VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2
|
292
|
|
-endif
|
293
|
|
-ifeq ($(WIRE), 1)
|
294
|
|
-VPATH += $(HARDWARE_DIR)/libraries/Wire
|
295
|
|
-VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
|
296
|
|
-endif
|
297
|
|
-endif
|
|
273
|
+
|
298
|
274
|
ifeq ($(HARDWARE_VARIANT), arduino)
|
299
|
275
|
HARDWARE_SUB_VARIANT ?= mega
|
300
|
|
-VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/$(HARDWARE_SUB_VARIANT)
|
301
|
276
|
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
|
302
|
277
|
else
|
303
|
278
|
ifeq ($(HARDWARE_VARIANT), Sanguino)
|
|
@@ -320,7 +295,8 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \
|
320
|
295
|
SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \
|
321
|
296
|
temperature.cpp cardreader.cpp configuration_store.cpp \
|
322
|
297
|
watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
|
323
|
|
- dac_mcp4728.cpp vector_3.cpp qr_solve.cpp endstops.cpp stopwatch.cpp utility.cpp
|
|
298
|
+ dac_mcp4728.cpp vector_3.cpp qr_solve.cpp endstops.cpp stopwatch.cpp utility.cpp \
|
|
299
|
+ printcounter.cpp nozzle.cpp
|
324
|
300
|
ifeq ($(LIQUID_TWI2), 0)
|
325
|
301
|
CXXSRC += LiquidCrystal.cpp
|
326
|
302
|
else
|
|
@@ -393,7 +369,7 @@ ifneq ($(HARDWARE_MOTHERBOARD),)
|
393
|
369
|
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
394
|
370
|
endif
|
395
|
371
|
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
396
|
|
-CEXTRA = -fno-use-cxa-atexit
|
|
372
|
+CEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics
|
397
|
373
|
|
398
|
374
|
CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) $(CSTANDARD)
|
399
|
375
|
CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) -Wall $(CEXTRA) $(CTUNING) $(CXXSTANDARD)
|