From 5acf471ecb7b8e5e5e49ff7be8b349d023728045 Mon Sep 17 00:00:00 2001 From: chrox Date: Sat, 10 Nov 2012 01:36:39 +0800 Subject: [PATCH] use -O3 option in k2pdfopt compilation Koptreader will gain 20% performance boost. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b5468149b..a8dda2aa7 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ HOSTAR:=ar # Base CFLAGS, without arch. We'll need it for luajit, because its Makefiles do some tricky stuff to differentiate HOST/TARGET BASE_CFLAGS:=-O2 -ffast-math -pipe -fomit-frame-pointer +KOPT_CFLAGS:=-O3 -ffast-math -pipe -fomit-frame-pointer # Use this for debugging: #BASE_CFLAGS:=-O0 -g # Misc GCC tricks to ensure backward compatibility with the K2, even when using a fairly recent TC (Linaro/MG). @@ -279,7 +280,7 @@ $(POPENNSLIB): $(MAKE) -C $(POPENNSDIR) CC="$(CC)" AR="$(AR)" $(K2PDFOPTLIB): - $(MAKE) -C $(K2PDFOPTLIBDIR) BUILDMODE=shared CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" all + $(MAKE) -C $(K2PDFOPTLIBDIR) BUILDMODE=shared CC="$(CC)" CFLAGS="$(KOPT_CFLAGS)" AR="$(AR)" all test -d $(LIBDIR) || mkdir $(LIBDIR) cp -a $(K2PDFOPTLIBDIR)/libk2pdfopt.so* $(LIBDIR)