summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2014-01-15 23:16:32 +0100
committerMichael Buesch <m@bues.ch>2014-02-06 18:45:48 +0100
commit24cad167655b3bf40d2050735e83c2229b3069ad (patch)
tree078754f0d2e862439a7e9f7c136439a62de23cf4
parent2153ba0c0c1a4e025d550d5a054fc80ed9d03611 (diff)
downloadmoistcontrol-24cad167655b3bf40d2050735e83c2229b3069ad.zip
moistcontrol-24cad167655b3bf40d2050735e83c2229b3069ad.tar.xz
Use link time optimization
Signed-off-by: Michael Buesch <m@bues.ch>
-rw-r--r--firmware/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index db6fa66..8b31dff 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -84,7 +84,8 @@ WARN_CFLAGS = -Wall -Wextra -Wno-unused-parameter -Wswitch-enum \
CFLAGS += -mmcu=$(GCC_ARCH) -std=c99 -g -O$(O) $(WARN_CFLAGS) \
"-Dinline=inline __attribute__((__always_inline__))" \
- -fshort-enums -DF_CPU=$(F_CPU)
+ -fshort-enums -DF_CPU=$(F_CPU) \
+ -flto
BIN := $(NAME).bin
HEX := $(NAME).hex
@@ -149,7 +150,7 @@ all: $(HEX)
$(QUIET_CC) $(CFLAGS) -S $*.c
$(BIN): $(call OBJS,$(SRCS))
- $(QUIET_CC) $(CFLAGS) -o $(BIN) $(call OBJS,$(SRCS)) $(LDFLAGS) $(LDFLAGS)
+ $(QUIET_CC) $(CFLAGS) -o $(BIN) -fwhole-program $(call OBJS,$(SRCS)) $(LDFLAGS)
$(HEX): $(BIN)
$(QUIET_OBJCOPY) -R.eeprom -O ihex $(BIN) $(HEX)
bues.ch cgit interface