#Source directories SDIR_ARD_CORE = $(ARDUINO_DIR)/hardware/arduino/cores/arduino SDIR_ARD_SPI = $(ARDUINO_DIR)/libraries/SPI SDIR_ARD_ETH = $(ARDUINO_DIR)/libraries/Ethernet SDIR_ARD_ETH_UTIL = $(ARDUINO_DIR)/libraries/Ethernet/utility SDIR_ARD_WIFI = $(ARDUINO_DIR)/libraries/WiFi/src SDIR_ARD_WIFI_UTIL = $(ARDUINO_DIR)/libraries/WiFi/src/utility SDIR_ARD_TIME = $(ARDUINO_DIR)/libraries/Time/Time SDIR_ARD_PLATFORM = $(SDIR_ARD_CORE):$(SDIR_ARD_SPI):$(SDIR_ARD_ETH):$(SDIR_ARD_ETH_UTIL):$(SDIR_ARD_TIME) \ :$(SDIR_ARD_WIFI):$(SDIR_ARD_WIFI_UTIL) #include directories INCD_ARD_CORE = -I$(ARDUINO_DIR)/hardware/arduino/cores/arduino INCD_ARD_VARIANT = -I$(ARDUINO_DIR)/hardware/arduino/variants/mega INCD_ARD_SPI = -I$(ARDUINO_DIR)/libraries/SPI INCD_ARD_ETH = -I$(ARDUINO_DIR)/libraries/Ethernet INCD_ARD_ETH_UTIL = -I$(ARDUINO_DIR)/libraries/Ethernet/utility INCD_ARD_WIFI = -I$(ARDUINO_DIR)/libraries/WiFi/src INCD_ARD_WIFI_UTIL = -I$(ARDUINO_DIR)/libraries/WiFi/src/utility INCD_ARD_TIME = -I$(ARDUINO_DIR)/libraries/Time/Time INC_DIR_PLATFORM = $(INCD_ARD_CORE) $(INCD_ARD_VARIANT) $(INCD_ARD_SPI) $(INCD_ARD_ETH) $(INCD_ARD_ETH_UTIL) \ $(INCD_ARD_TIME) $(INCD_ARD_WIFI) $(INCD_ARD_WIFI_UTIL) #Compiler/Linker flags CFLAGS_PLATFORM = -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=156 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -DWITH_ARDUINO \ -MMD -std=c++0x -Wno-write-strings -ffunction-sections -fdata-sections -fno-exceptions -felide-constructors -DATMEGA2560 -DNDEBUG #Compilers CXX=$(ARDUINO_TOOLS_DIR)/avr-g++ CC=$(ARDUINO_TOOLS_DIR)/avr-gcc AR=$(ARDUINO_TOOLS_DIR)/avr-ar RANLIB=$(ARDUINO_TOOLS_DIR)/avr-ranlib AVR_OBJCOPY=$(ARDUINO_TOOLS_DIR)/avr-objcopy AVR_PROGRAMMER=$(ARDUINO_TOOLS_DIR)/../../avrdude CORE_COBJ = WInterrupts.o wiring.o wiring_digital.o CORE_CPPOBJ = main.o Stream.o WMath.o WString.o HardwareSerial.o Print.o SPI.o IPAddress.o ETH_CPPOBJ = Dhcp.o Dns.o Ethernet.o EthernetUdp.o ETH_UTIL_CPPOBJ = socket.o w5100.o WIFI_COBJ = WiFi.o WiFiClient.o WiFiServer.o WiFiUdp.o server_drv.o spi_drv.o wifi_drv.o OCDEPENDENT_CPPOBJ = wiring_analog.o PLATFORM_OBJS = $(CORE_COBJ) $(CORE_CPPOBJ) $(ETH_CPPOBJ) $(ETH_UTIL_CPPOBJ) $(OCDEPENDENT_CPPOBJ) ifeq ($(ARDUINOWIFI),1) PLATFORM_OBJS += $(WIFI_COBJ) endif