From 7be7a6d215e861ebec0cae2334b4b4b86d3742da Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 1 Apr 2017 14:41:07 +0530 Subject: Optimizations --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ba9a9b1..5422785 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,11 @@ MANPREFIX = $(PREFIX)/man #CPPFLAGS = -DDEBUG #CFLAGS = -g -CFLAGS = -O3 -march=native +CFLAGS = -O3 -march=native -fno-asynchronous-unwind-tables -fdata-sections \ + -ffunction-sections -Wl,--gc-sections LDLIBS = -lcurses -DISTFILES = nnn.c strlcat.c strlcpy.c util.h config.def.h\ +DISTFILES = nnn.c strlcat.c strlcpy.c util.h config.def.h \ nnn.1 Makefile README.md LICENSE OBJ = nnn.o strlcat.o strlcpy.o BIN = nnn @@ -17,7 +18,9 @@ all: $(BIN) $(BIN): $(OBJ) $(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(LDLIBS) - strip $(BIN) + strip -S --strip-unneeded --remove-section=.note.gnu.gold-version \ + --remove-section=.comment --remove-section=.note \ + --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag $(BIN) nnn.o: util.h config.h strlcat.o: util.h -- cgit v1.2.3-70-g09d2