|
@@ -26,6 +26,31 @@ TERM=bash
|
26
|
26
|
############################################################################
|
27
|
27
|
# Below here nothing should be changed...
|
28
|
28
|
|
|
29
|
+LINKORDER=\
|
|
30
|
+applet/Marlin.cpp.o \
|
|
31
|
+applet/EEPROM.o \
|
|
32
|
+applet/main.o \
|
|
33
|
+applet/MarlinSerial.o \
|
|
34
|
+applet/motion_control.o\
|
|
35
|
+applet/pins_arduino.o\
|
|
36
|
+applet/planner.o\
|
|
37
|
+applet/Print.o\
|
|
38
|
+applet/Sd2Card.o\
|
|
39
|
+applet/SdBaseFile.o\
|
|
40
|
+applet/SdFatUtil.o\
|
|
41
|
+applet/SdFile.o\
|
|
42
|
+applet/SdVolume.o\
|
|
43
|
+applet/stepper.o\
|
|
44
|
+applet/temperature.o\
|
|
45
|
+applet/WInterrupts.o\
|
|
46
|
+applet/wiring_analog.o\
|
|
47
|
+applet/wiring_digital.o\
|
|
48
|
+applet/wiring.o\
|
|
49
|
+applet/wiring_pulse.o\
|
|
50
|
+applet/wiring_shift.o\
|
|
51
|
+applet/WMath.o
|
|
52
|
+
|
|
53
|
+PDES=Marlin.pde ultralcd.pde watchdog.pde cardreader.pde
|
29
|
54
|
ARDUINO = $(INSTALL_DIR)/hardware/arduino/cores/arduino
|
30
|
55
|
#
|
31
|
56
|
#~ AVR_TOOLS_PATH = $(INSTALL_DIR)/hardware/tools/avr/bin
|
|
@@ -67,18 +92,6 @@ CXXDEFS = -DF_CPU=$(BUILD_F_CPU) -DARDUINO=23
|
67
|
92
|
CINCS = -I$(ARDUINO) -I$(INSTALL_DIR)/libraries/LiquidCrystal/ -I$(INSTALL_DIR)/libraries/EEPROM/
|
68
|
93
|
CXXINCS = -I$(ARDUINO)
|
69
|
94
|
|
70
|
|
-OBJECTS= applet/Marlin.cpp.o \
|
71
|
|
- applet/EEPROM.o \
|
72
|
|
- applet/pins_arduino.o \
|
73
|
|
- applet/wiring_analog.o \
|
74
|
|
- applet/wiring_pulse.o \
|
75
|
|
- applet/main.o \
|
76
|
|
- applet/Print.o \
|
77
|
|
- applet/wiring_digital.o \
|
78
|
|
- applet/wiring_shift.o \
|
79
|
|
- applet/stepper.o \
|
80
|
|
- applet/wiring.o \
|
81
|
|
- applet/WMath.o
|
82
|
95
|
# Compiler flag to set the C Standard level.
|
83
|
96
|
# c89 - "ANSI" C
|
84
|
97
|
# gnu89 - c89 plus GCC extensions
|
|
@@ -141,6 +154,7 @@ MV = mv -f
|
141
|
154
|
# and then, match to corresponding rule somehow?
|
142
|
155
|
# or leave this - and parse in rule (auth automatic variable $(@F))?
|
143
|
156
|
# "Suffix Replacement"
|
|
157
|
+CXXSRC+=MarlinSerial.cpp SdBaseFile.cpp stepper.cpp motion_control.cpp SdFatUtil.cpp temperature.cpp planner.cpp SdFile.cpp Sd2Card.cpp SdVolume.cpp
|
144
|
158
|
OBJ = $(SRC:.c=.o) $(CXXSRC:.cpp=.o) $(ASRC:.S=.o)
|
145
|
159
|
|
146
|
160
|
# added - OBJ list, transformed into applet/
|
|
@@ -204,7 +218,9 @@ applet_files: $(TARGET).pde
|
204
|
218
|
@echo ALL CXXLIBOBJ: $(CXXLIBOBJ)
|
205
|
219
|
# echo '#include "WProgram.h"' > applet/$(TARGET).cpp
|
206
|
220
|
@echo "#include \"WProgram.h\"\nvoid setup();\nvoid loop();\n" > applet/$(TARGET).cpp
|
207
|
|
- cat $(TARGET).pde >> applet/$(TARGET).cpp
|
|
221
|
+ ##cat $(TARGET).pde >> applet/$(TARGET).cpp
|
|
222
|
+ cat ${PDES}>> applet/$(TARGET).cpp
|
|
223
|
+ cp *.cpp applet/
|
208
|
224
|
# no more need to cat main.cpp (v0022) - now it is compiled in
|
209
|
225
|
# cat $(ARDUINO)/main.cpp >> applet/$(TARGET).cpp
|
210
|
226
|
|
|
@@ -265,7 +281,9 @@ applet/$(TARGET).elf: $(TARGET).pde applet/$(TARGET).cpp.o applet/core.a
|
265
|
281
|
# $(CC) $(ALL_CFLAGS) -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS)
|
266
|
282
|
# changed as in IDE v0022: link cpp obj files
|
267
|
283
|
@echo $$(tput bold)$$(tput setaf 2) $(CC) $$(tput sgr0) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS)
|
268
|
|
- $(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ $OBJECTS -L. applet/core.a $(LDFLAGS)
|
|
284
|
+ echo ${OBJT}
|
|
285
|
+ #$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/$(TARGET).cpp.o -L. applet/core.a $(LDFLAGS)
|
|
286
|
+ $(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ ${LINKORDER} $(LDFLAGS)
|
269
|
287
|
#@$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/*.o applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS)
|
270
|
288
|
|
271
|
289
|
# added: cpp.o depends on cpp (and .pde which generates it)
|