1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 07:17:59 +00:00

Add support of LiquidTWI2-based panels to Makefile

Use LIQUID_TWI2=1 as make argument to enable this support
This commit is contained in:
Guillaume Seguin 2013-07-24 12:09:53 +02:00 committed by Nicolas Rossi
parent 6c42a3a339
commit 4d435c38a6

View File

@ -54,6 +54,9 @@ UPLOAD_PORT ?= /dev/arduino
#Directory used to build files in, contains all the build files, from object files to the final hex file. #Directory used to build files in, contains all the build files, from object files to the final hex file.
BUILD_DIR ?= applet BUILD_DIR ?= applet
# This defines whether Liquid_TWI2 support will be built
LIQUID_TWI2 ?= 0
############################################################################ ############################################################################
# Below here nothing should be changed... # Below here nothing should be changed...
@ -199,9 +202,19 @@ VPATH += $(HARDWARE_SRC)
ifeq ($(HARDWARE_VARIANT), arduino) ifeq ($(HARDWARE_VARIANT), arduino)
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI
ifeq ($(LIQUID_TWI2), 1)
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
endif
else else
VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal
VPATH += $(HARDWARE_DIR)/libraries/SPI 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
endif endif
ifeq ($(HARDWARE_VARIANT), arduino) ifeq ($(HARDWARE_VARIANT), arduino)
HARDWARE_SUB_VARIANT ?= mega HARDWARE_SUB_VARIANT ?= mega
@ -218,8 +231,13 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \
MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \ MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \
SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp \ SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp \
stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \ stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \
watchdog.cpp watchdog.cpp SPI.cpp Servo.cpp Tone.cpp ultralcd.cpp
CXXSRC += LiquidCrystal.cpp ultralcd.cpp SPI.cpp Servo.cpp Tone.cpp ifeq ($(LIQUID_TWI2), 0)
CXXSRC += LiquidCrystal.cpp
else
SRC += twi.c
CXXSRC += Wire.cpp LiquidTWI2.cpp
endif
#Check for Arduino 1.0.0 or higher and use the correct sourcefiles for that version #Check for Arduino 1.0.0 or higher and use the correct sourcefiles for that version
ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true) ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)