# HG changeset patch # User Paul Boddie # Date 1440864034 -7200 # Node ID ca010cf91fddfc3755d27460de474b1054d778f2 # Parent 308a77d390058ca1789dc92012fd840823e154a1 Removed superfluous Arduino sources and introduced binary size optimisation. diff -r 308a77d39005 -r ca010cf91fdd Makefile --- a/Makefile Thu Aug 27 00:18:27 2015 +0200 +++ b/Makefile Sat Aug 29 18:00:34 2015 +0200 @@ -17,11 +17,9 @@ ARDUINO = $(INSTALL_DIR)/hardware/arduino/cores/arduino VARIANT = $(INSTALL_DIR)/hardware/arduino/variants/standard -SRC = $(ARDUINO)/wiring.c \ - $(ARDUINO)/wiring_analog.c $(ARDUINO)/wiring_digital.c \ - $(ARDUINO)/wiring_pulse.c $(ARDUINO)/wiring_shift.c \ - $(ARDUINO)/WInterrupts.c $(EXTRA_SRC) -CXXSRC = $(ARDUINO)/HardwareSerial.cpp $(ARDUINO)/WMath.cpp \ +SRC = $(ARDUINO)/wiring.c $(ARDUINO)/wiring_digital.c \ + $(EXTRA_SRC) +CXXSRC = $(ARDUINO)/HardwareSerial.cpp \ $(ARDUINO)/Print.cpp $(ARDUINO)/WString.cpp \ $(ARDUINO)/Stream.cpp $(EXTRA_CXXSRC) FORMAT = ihex @@ -54,8 +52,8 @@ OPT = s CFLAGS = $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA) -CXXFLAGS = $(CXXDEFS) $(CXXINCS) -O$(OPT) -LDFLAGS = -lm +CXXFLAGS = $(CXXDEFS) $(CXXINCS) -O$(OPT) -ffunction-sections -fdata-sections +LDFLAGS = -lm -Wl,--gc-sections # Combine all necessary flags and optional flags. # Add target processor to flags.