ArduinoAm29F010

Changeset

37:ca010cf91fdd
2015-08-29 Paul Boddie raw files shortlog changelog graph Removed superfluous Arduino sources and introduced binary size optimisation.
Makefile (file)
     1.1 --- a/Makefile	Thu Aug 27 00:18:27 2015 +0200
     1.2 +++ b/Makefile	Sat Aug 29 18:00:34 2015 +0200
     1.3 @@ -17,11 +17,9 @@
     1.4  
     1.5  ARDUINO = $(INSTALL_DIR)/hardware/arduino/cores/arduino
     1.6  VARIANT = $(INSTALL_DIR)/hardware/arduino/variants/standard
     1.7 -SRC = $(ARDUINO)/wiring.c \
     1.8 -	$(ARDUINO)/wiring_analog.c $(ARDUINO)/wiring_digital.c \
     1.9 -	$(ARDUINO)/wiring_pulse.c $(ARDUINO)/wiring_shift.c \
    1.10 -	$(ARDUINO)/WInterrupts.c $(EXTRA_SRC)
    1.11 -CXXSRC = $(ARDUINO)/HardwareSerial.cpp $(ARDUINO)/WMath.cpp \
    1.12 +SRC = $(ARDUINO)/wiring.c $(ARDUINO)/wiring_digital.c \
    1.13 +	$(EXTRA_SRC)
    1.14 +CXXSRC = $(ARDUINO)/HardwareSerial.cpp \
    1.15  	$(ARDUINO)/Print.cpp $(ARDUINO)/WString.cpp \
    1.16  	$(ARDUINO)/Stream.cpp $(EXTRA_CXXSRC)
    1.17  FORMAT = ihex
    1.18 @@ -54,8 +52,8 @@
    1.19  OPT = s
    1.20  
    1.21  CFLAGS = $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA)
    1.22 -CXXFLAGS = $(CXXDEFS) $(CXXINCS) -O$(OPT)
    1.23 -LDFLAGS = -lm
    1.24 +CXXFLAGS = $(CXXDEFS) $(CXXINCS) -O$(OPT) -ffunction-sections -fdata-sections
    1.25 +LDFLAGS = -lm -Wl,--gc-sections
    1.26  
    1.27  # Combine all necessary flags and optional flags.
    1.28  # Add target processor to flags.