############################################################################## # # # Teacup - Lean and efficient firmware for RepRap printers # # # # by Triffid Hunter, Traumflug, jakepoz, many others. # # # # This firmware is Copyright (c) ... # # 2009 - 2010 Michael Moon aka Triffid_Hunter # # 2010 - 2013 Markus "Traumflug" Hitter # # # # This program is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program; if not, write to the Free Software # # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # # ############################################################################## ############################################################################## # # # Makefile for PC-Based simulator # # # # make -f Makefile-SIM # # # ############################################################################## TARGET = sim SIM_PATH = simulator BUILD_FLAVOR = $(TARGET) # Arduino IDE takes the "compile everything available"-approach, so we have # to keep this working and can take a shortcut: SOURCES = $(wildcard *.c) SIM_SOURCES = $(subst $(SIM_PATH)/,,$(wildcard $(SIM_PATH)/*.c)) SOURCES := $(filter-out $(subst _sim.c,.c,$(SIM_SOURCES)),$(SOURCES)) $(SIM_SOURCES) CFLAGS = $(EXTRA_CFLAGS) CFLAGS += -g -Wall -Wstrict-prototypes -Wno-format -Os $(DEFS) -std=gnu99 CFLAGS += -funsigned-char -funsigned-bitfields -fshort-enums -I.. -I. CFLAGS += -DSIMULATOR -Wno-format -Wno-format-security # Satisfy all current config chip targets CFLAGS += -D__AVR_ATmega644__ -D__AVR_ATmega644A__ -D__AVR_ATmega644P__ CFLAGS += -D__AVR_ATmega2560__ -D__AVR_ATmega32U4__ -D__AVR_AT90USB1286__ CFLAGS += -D__AVR_ATmega1280__ include Makefile-common $(TARGET): $(BUILDDIR)/$(TARGET).elf cp $< $@ vpath %.c $(SIM_PATH)