2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

use -O3 option in k2pdfopt compilation

Koptreader will gain 20% performance boost.
This commit is contained in:
chrox 2012-11-10 01:36:39 +08:00
parent c045205775
commit 5acf471ecb

View File

@ -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)