forked from Traumflug/Teacup_Firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile-SIM
63 lines (53 loc) · 3.42 KB
/
Makefile-SIM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
##############################################################################
# #
# 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 <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
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
#CFLAGS += -dM -E # To list all predefined macros into the .o file.
# 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)