68 lines
3.5 KiB
Plaintext
68 lines
3.5 KiB
Plaintext
##############################################################################
|
|
# #
|
|
# Teacup - Lean and efficient firmware for RepRap printers #
|
|
# #
|
|
# by Triffid Hunter, Traumflug, jakepoz, Markus Hitter, many others #
|
|
# #
|
|
# This firmware is Copyright (c) ... #
|
|
# 2009 - 2010 Michael Moon aka Triffid_Hunter #
|
|
# 2010 - 2013 Markus "Traumflug" Hitter <mah@jump-ing.de> #
|
|
# #
|
|
# 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
|
|
|
|
# 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)
|
|
|
|
OBJ = $(patsubst %.c,$(BUILDDIR)/%.sim.o,$(SOURCES))
|
|
CFLAGS = -g -Wall -Wstrict-prototypes -Wno-format -Os $(DEFS) -std=gnu99
|
|
CFLAGS += -funsigned-char -funsigned-bitfields -fshort-enums -I.. -I.
|
|
CFLAGS += -DSIMULATOR
|
|
|
|
# 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
|
|
|
|
$(BUILDDIR)/%.sim.o: %.c | $(BUILDDIR)
|
|
@echo " CC $@"
|
|
@cc -c $(CFLAGS) -MMD -o $@ $<
|
|
@$(call CCPOST)
|
|
|
|
$(TARGET): $(OBJ)
|
|
@echo " LINK $@"
|
|
@cc $(CFLAGS) -o $@ $^
|
|
|
|
vpath %.c $(SIM_PATH)
|