|
@ -26,6 +26,31 @@ TERM=bash |
|
|
############################################################################
|
|
|
############################################################################
|
|
|
# Below here nothing should be changed...
|
|
|
# Below here nothing should be changed...
|
|
|
|
|
|
|
|
|
|
|
|
LINKORDER=\
|
|
|
|
|
|
applet/Marlin.cpp.o \ |
|
|
|
|
|
applet/EEPROM.o \ |
|
|
|
|
|
applet/main.o \ |
|
|
|
|
|
applet/MarlinSerial.o \ |
|
|
|
|
|
applet/motion_control.o\ |
|
|
|
|
|
applet/pins_arduino.o\ |
|
|
|
|
|
applet/planner.o\ |
|
|
|
|
|
applet/Print.o\ |
|
|
|
|
|
applet/Sd2Card.o\ |
|
|
|
|
|
applet/SdBaseFile.o\ |
|
|
|
|
|
applet/SdFatUtil.o\ |
|
|
|
|
|
applet/SdFile.o\ |
|
|
|
|
|
applet/SdVolume.o\ |
|
|
|
|
|
applet/stepper.o\ |
|
|
|
|
|
applet/temperature.o\ |
|
|
|
|
|
applet/WInterrupts.o\ |
|
|
|
|
|
applet/wiring_analog.o\ |
|
|
|
|
|
applet/wiring_digital.o\ |
|
|
|
|
|
applet/wiring.o\ |
|
|
|
|
|
applet/wiring_pulse.o\ |
|
|
|
|
|
applet/wiring_shift.o\ |
|
|
|
|
|
applet/WMath.o |
|
|
|
|
|
|
|
|
|
|
|
PDES=Marlin.pde ultralcd.pde watchdog.pde cardreader.pde |
|
|
ARDUINO = $(INSTALL_DIR)/hardware/arduino/cores/arduino |
|
|
ARDUINO = $(INSTALL_DIR)/hardware/arduino/cores/arduino |
|
|
#
|
|
|
#
|
|
|
#~ AVR_TOOLS_PATH = $(INSTALL_DIR)/hardware/tools/avr/bin
|
|
|
#~ AVR_TOOLS_PATH = $(INSTALL_DIR)/hardware/tools/avr/bin
|
|
@ -67,18 +92,6 @@ CXXDEFS = -DF_CPU=$(BUILD_F_CPU) -DARDUINO=23 |
|
|
CINCS = -I$(ARDUINO) -I$(INSTALL_DIR)/libraries/LiquidCrystal/ -I$(INSTALL_DIR)/libraries/EEPROM/ |
|
|
CINCS = -I$(ARDUINO) -I$(INSTALL_DIR)/libraries/LiquidCrystal/ -I$(INSTALL_DIR)/libraries/EEPROM/ |
|
|
CXXINCS = -I$(ARDUINO) |
|
|
CXXINCS = -I$(ARDUINO) |
|
|
|
|
|
|
|
|
OBJECTS= applet/Marlin.cpp.o \
|
|
|
|
|
|
applet/EEPROM.o \
|
|
|
|
|
|
applet/pins_arduino.o \
|
|
|
|
|
|
applet/wiring_analog.o \
|
|
|
|
|
|
applet/wiring_pulse.o \
|
|
|
|
|
|
applet/main.o \
|
|
|
|
|
|
applet/Print.o \
|
|
|
|
|
|
applet/wiring_digital.o \
|
|
|
|
|
|
applet/wiring_shift.o \
|
|
|
|
|
|
applet/stepper.o \
|
|
|
|
|
|
applet/wiring.o \
|
|
|
|
|
|
applet/WMath.o |
|
|
|
|
|
# Compiler flag to set the C Standard level.
|
|
|
# Compiler flag to set the C Standard level.
|
|
|
# c89 - "ANSI" C
|
|
|
# c89 - "ANSI" C
|
|
|
# gnu89 - c89 plus GCC extensions
|
|
|
# gnu89 - c89 plus GCC extensions
|
|
@ -141,6 +154,7 @@ MV = mv -f |
|
|
# and then, match to corresponding rule somehow?
|
|
|
# and then, match to corresponding rule somehow?
|
|
|
# or leave this - and parse in rule (auth automatic variable $(@F))?
|
|
|
# or leave this - and parse in rule (auth automatic variable $(@F))?
|
|
|
# "Suffix Replacement"
|
|
|
# "Suffix Replacement"
|
|
|
|
|
|
CXXSRC+=MarlinSerial.cpp SdBaseFile.cpp stepper.cpp motion_control.cpp SdFatUtil.cpp temperature.cpp planner.cpp SdFile.cpp Sd2Card.cpp SdVolume.cpp |
|
|
OBJ = $(SRC:.c=.o) $(CXXSRC:.cpp=.o) $(ASRC:.S=.o) |
|
|
OBJ = $(SRC:.c=.o) $(CXXSRC:.cpp=.o) $(ASRC:.S=.o) |
|
|
|
|
|
|
|
|
# added - OBJ list, transformed into applet/
|
|
|
# added - OBJ list, transformed into applet/
|
|
@ -204,7 +218,9 @@ applet_files: $(TARGET).pde |
|
|
@echo ALL CXXLIBOBJ: $(CXXLIBOBJ) |
|
|
@echo ALL CXXLIBOBJ: $(CXXLIBOBJ) |
|
|
# echo '#include "WProgram.h"' > applet/$(TARGET).cpp
|
|
|
# echo '#include "WProgram.h"' > applet/$(TARGET).cpp
|
|
|
@echo "#include \"WProgram.h\"\nvoid setup();\nvoid loop();\n" > applet/$(TARGET).cpp |
|
|
@echo "#include \"WProgram.h\"\nvoid setup();\nvoid loop();\n" > applet/$(TARGET).cpp |
|
|
cat $(TARGET).pde >> applet/$(TARGET).cpp |
|
|
##cat $(TARGET).pde >> applet/$(TARGET).cpp |
|
|
|
|
|
cat ${PDES}>> applet/$(TARGET).cpp |
|
|
|
|
|
cp *.cpp applet/ |
|
|
# no more need to cat main.cpp (v0022) - now it is compiled in |
|
|
# no more need to cat main.cpp (v0022) - now it is compiled in |
|
|
# cat $(ARDUINO)/main.cpp >> applet/$(TARGET).cpp
|
|
|
# cat $(ARDUINO)/main.cpp >> applet/$(TARGET).cpp
|
|
|
|
|
|
|
|
@ -265,7 +281,9 @@ applet/$(TARGET).elf: $(TARGET).pde applet/$(TARGET).cpp.o applet/core.a |
|
|
# $(CC) $(ALL_CFLAGS) -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS)
|
|
|
# $(CC) $(ALL_CFLAGS) -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS)
|
|
|
# changed as in IDE v0022: link cpp obj files
|
|
|
# changed as in IDE v0022: link cpp obj files
|
|
|
@echo $$(tput bold)$$(tput setaf 2) $(CC) $$(tput sgr0) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS) |
|
|
@echo $$(tput bold)$$(tput setaf 2) $(CC) $$(tput sgr0) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS) |
|
|
$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ $OBJECTS -L. applet/core.a $(LDFLAGS) |
|
|
echo ${OBJT} |
|
|
|
|
|
#$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/$(TARGET).cpp.o -L. applet/core.a $(LDFLAGS) |
|
|
|
|
|
$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ ${LINKORDER} $(LDFLAGS) |
|
|
#@$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/*.o applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS) |
|
|
#@$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/*.o applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS) |
|
|
|
|
|
|
|
|
# added: cpp.o depends on cpp (and .pde which generates it)
|
|
|
# added: cpp.o depends on cpp (and .pde which generates it)
|
|
|