aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-04-01 14:41:07 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-04-01 14:41:07 +0530
commit7be7a6d215e861ebec0cae2334b4b4b86d3742da (patch)
treef36f0bedac67f30d439f6e61e5c1bae7ee072553 /Makefile
parentf3d95b6d0db874faa951e670aa1924ebc25ac66c (diff)
downloadnnn-7be7a6d215e861ebec0cae2334b4b4b86d3742da.tar.gz
Optimizations
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
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