Browse Source

Merge pull request #5994 from StefanBruens/fix_Makefile_errors

Fix makefile errors, cleanup
Scott Lahteine 7 years ago
parent
commit
7ddd94dc61
1 changed files with 8 additions and 32 deletions
  1. 8
    32
      Marlin/Makefile

+ 8
- 32
Marlin/Makefile View File

247
 # Libraries, the "hardware variant" are for boards
247
 # Libraries, the "hardware variant" are for boards
248
 # that derives from that, and their source are present in
248
 # that derives from that, and their source are present in
249
 # the main Marlin source directory
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
 TARGET = $(notdir $(CURDIR))
251
 TARGET = $(notdir $(CURDIR))
262
 
252
 
266
 
256
 
267
 VPATH = .
257
 VPATH = .
268
 VPATH += $(BUILD_DIR)
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
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
263
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal/src
276
 ifeq ($(LIQUID_TWI2), 1)
264
 ifeq ($(LIQUID_TWI2), 1)
277
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
265
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
282
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
270
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
283
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
271
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
284
 endif
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
 ifeq ($(HARDWARE_VARIANT), arduino)
274
 ifeq ($(HARDWARE_VARIANT), arduino)
299
 HARDWARE_SUB_VARIANT ?= mega
275
 HARDWARE_SUB_VARIANT ?= mega
300
-VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/$(HARDWARE_SUB_VARIANT)
301
 VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
276
 VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/avr/variants/$(HARDWARE_SUB_VARIANT)
302
 else
277
 else
303
 ifeq ($(HARDWARE_VARIANT), Sanguino)
278
 ifeq ($(HARDWARE_VARIANT), Sanguino)
320
 	SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \
295
 	SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \
321
 	temperature.cpp cardreader.cpp configuration_store.cpp \
296
 	temperature.cpp cardreader.cpp configuration_store.cpp \
322
 	watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
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
 ifeq ($(LIQUID_TWI2), 0)
300
 ifeq ($(LIQUID_TWI2), 0)
325
 CXXSRC += LiquidCrystal.cpp
301
 CXXSRC += LiquidCrystal.cpp
326
 else
302
 else
393
 CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
369
 CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
394
 endif
370
 endif
395
 #CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
371
 #CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
396
-CEXTRA = -fno-use-cxa-atexit
372
+CEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics
397
 
373
 
398
 CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) $(CSTANDARD)
374
 CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) $(CSTANDARD)
399
 CXXFLAGS :=         $(CDEFS) $(CINCS) -O$(OPT) -Wall    $(CEXTRA) $(CTUNING) $(CXXSTANDARD)
375
 CXXFLAGS :=         $(CDEFS) $(CINCS) -O$(OPT) -Wall    $(CEXTRA) $(CTUNING) $(CXXSTANDARD)

Loading…
Cancel
Save