summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-26 09:13:21 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-26 09:13:21 +0200
commita51413988caaff7001f47c8a62bff11a72ca48bc (patch)
tree6662a7ddd9f07e22495ddde2a6d61d136a648e46 /Makefile
parent94b1366de313c4d1c0c1ea8f0b859bc44d0b231a (diff)
downloadiwinfo-a51413988caaff7001f47c8a62bff11a72ca48bc.tar.gz
build: compile with -ffunction-sections, -fdata-sections and LTO
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 715c03e..d4f0f00 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
IWINFO_BACKENDS = $(BACKENDS)
-IWINFO_CFLAGS = $(CFLAGS) -std=gnu99 -fstrict-aliasing -Iinclude
-IWINFO_LDFLAGS = -luci -lubox -lubus
+IWINFO_CFLAGS = $(CFLAGS) -std=gnu99 -fstrict-aliasing -ffunction-sections -fdata-sections -flto -Iinclude
+IWINFO_LDFLAGS = -Wl,-gc-sections -flto -luci -lubox -lubus
IWINFO_LIB = libiwinfo.so
IWINFO_LIB_LDFLAGS = $(LDFLAGS) -shared