2
0
mirror of https://github.com/koreader/koreader synced 2024-11-13 19:11:25 +00:00
Commit Graph

144 Commits

Author SHA1 Message Date
Tigran Aivazian
7f4be723a0 LuaJIT: make distclean -> make clean
Two reasons for this change:

1. The latest LuaJIT has no "distclean" target
2. The "distclean" is MUCH slower
2012-10-31 21:43:52 -04:00
chrox
9e8a92862c add koptreader.lua file in customupdate
Conflicts:

	Makefile
2012-10-31 21:34:30 -04:00
chrox
441d061664 add DJVU reflow
Conflicts:

	djvu.c
	koptreader.lua
	reader.lua
2012-10-31 21:30:06 -04:00
chrox
f3f97b6223 add pdf page reflow
Conflicts:

	pdfreader.lua
2012-10-31 21:17:08 -04:00
Dobrica Pavlinusic
95f6ed5bd6 fix getCurrentPageLinks segfault on links without target 2012-10-31 21:11:16 -04:00
Tigran Aivazian
6c9a3c3dc5 Factor out JPEG support into a module
This is to make adding support for new formats easier.
See the file pic_jpeg.h for the description of the interface that each
image format must support.

Conflicts:

	Makefile
2012-10-31 20:54:24 -04:00
Tigran Aivazian
879c937762 Force the use of bash.
On some distributions (e.g. Ubuntu) the shell used for scripts is dash,
not bash and we explicitly rely on bash's features in the Makefile, so
we must guarantee that we are running with bash (not dash or anything
else).
2012-10-31 20:33:49 -04:00
Tigran Aivazian
cbfa0d5344 Generate git-rev file at compile time.
The file git-rev containing the program's version should be generated at
kpdfview compile time rather than package generation time.

Conflicts:

	Makefile
2012-10-09 14:41:00 -04:00
NiLuJe
d60504ef83 More comments on the whole unaligned access mess on FW 2.x. Don't even
think about setting the alignment trap to a mode that includes warn,
that simply kills the performance because of the storm of faults the
syslog gets...
2012-10-03 13:03:27 -04:00
NiLuJe
42e66cc605 Yep, -mno-unaligned-access is definitely needed with a GCC 4.7
ToolChain, the kernel used on FW 2.x is too old to handle unaligned
accesses properly.
2012-10-03 13:02:04 -04:00
NiLuJe
24b9678dc6 It's a spaaaaace! 2012-10-03 13:01:25 -04:00
NiLuJe
3e47fe8e01 Quote that to avoid potential issues... 2012-10-03 12:57:20 -04:00
NiLuJe
0790190af5 Slightly nicer fix for building mupdf's .host stuff with CFLAGS in the env. 2012-10-03 12:55:26 -04:00
NiLuJe
c68ac9c8c8 Add a note about -mno-unaligned-access (check my x-compile.sh script for
more details, I'll revisit this once Linaro 2012.10 comes out).
2012-10-03 12:54:58 -04:00
NiLuJe
d55138113f Split the backward compat stuff between CFLAGS/CXXFLAGS 2012-10-03 12:54:34 -04:00
NiLuJe
c35b5d2d56 Don't use the backward compat flags on the host. Move to a dedicated
variable, with a few comments to explain ;).
2012-10-03 12:53:19 -04:00
NiLuJe
9520c9b662 Add -fno-finite-math-only (after -ffast-math) to the ARM flags to avoid
MG 2012.03 pulling GLIBC_2.15 symbols from libm (because -ffast-math asks
for it).
I didn't see this on my own TC because it's using a much older glibc version (2.9).
2012-10-03 12:53:09 -04:00
NiLuJe
b0f7ea5d81 revert the whole 'let's use ld' thing. It's useless, and might wreak
havoc on EMU builds picking up system libs instead of the bundled ones.
2012-10-03 12:52:39 -04:00
NiLuJe
9169ac7541 Make sure we're always building luajit statically, so ld doesn't pick a
shared version. Of course that explained the size difference :D.
2012-10-03 12:52:18 -04:00
NiLuJe
5a2e4dec99 Fix the luajit clean fix (forgot to quote *_*).
Let ld do its job when linking, don't pass the static libs as object
files (we end up with a smaller native binary).
2012-10-03 12:51:27 -04:00
NiLuJe
679fce3df4 Make sure we're building for the softfp float ABI, and not in Thumb.
Might fix #359
2012-10-03 12:50:17 -04:00
NiLuJe
b5134ee4f2 Honor toplevel settings re: CC/FLAGS when building libdjvu. Define
_GNU_SOURCE to fix build with CS/MG TC. Fixes #341
2012-10-03 12:49:50 -04:00
NiLuJe
51345c6f08 Let's do a distclean, actually. Less noise in git status that way. 2012-10-03 12:49:27 -04:00
NiLuJe
9173f0a549 Don't require a cross-tc for cleanthirdparty (still confuzzled about why
luajit needs CFLAGS for a clean target, but, hey!). Fixes #357
2012-10-03 12:48:38 -04:00
Qingping Hou
7352ff8a65 revert commit 9127d1c9a1
As NiLuJe points out, that line is not needed, clean
stage of the popen Makefile will take care of it.
2012-10-03 05:36:59 -04:00
NiLuJe
bccccba794 Reimplement kpdf.sh changes from PR#348 after the PR#352 merge, and fix
customupdate to actually bundle kpdf.sh in the new location

Conflicts:

	launchpad/kpdf.sh
2012-10-02 21:40:05 -04:00
Qingping Hou
e82121b72e add HOSTAR for emu mode complie 2012-10-02 21:15:37 -04:00
Qingping Hou
9a1e581f7a add popennslib to cleanthirdparty 2012-10-02 21:14:21 -04:00
NiLuJe
30c3497654 Slight syntax tweak 2012-10-02 21:05:05 -04:00
NiLuJe
4c5341fb30 Hello, tiny stupid typo! 2012-10-02 21:04:45 -04:00
NiLuJe
4310b68b3b Don't checkout popen_noshell twice (it reverts parts of our patch) 2012-10-02 20:57:06 -04:00
NiLuJe
84e107313c Don't patch popen-noshell twice 2012-10-02 20:56:58 -04:00
NiLuJe
8250d77390 Properly fix the luajit *FLAGS mess 2012-10-02 20:56:46 -04:00
NiLuJe
3672d79fef Restore Makefiles tweaks 2012-10-02 20:56:37 -04:00
NiLuJe
10c9b3a58c Fetch popen_noshell during fetchthirdparty, don't bundle it in our repo 2012-10-02 20:53:42 -04:00
NiLuJe
18ed67ba2c Fix a stupid typo 2012-10-02 20:52:59 -04:00
NiLuJe
ead342926c Use popen_noshell as a static lib instead of an object file. Use CHOST
instead of HOST (and allow it to be set from the env), use $(MAKE)
instead of make to allow using the jobserver properly, and remove the
dash from commands where we do care about the return code (or inhibit
errors the usual way: rm -f instead of -rm)

Conflicts:

	Makefile
2012-10-02 20:52:49 -04:00
NiLuJe
ee7122d6c4 Revert Makefile changes potentially unsuitable for upstream 2012-10-02 20:49:12 -04:00
NiLuJe
7ce8ff58f8 Update the standalone testcase, too. 2012-10-02 20:49:04 -04:00
NiLuJe
26e10c6069 Fix input device closing, and fix lipc-wait-event handling (using
popen-noshell from http://code.google.com/p/popen-noshell/)

Conflicts:

	input.c
2012-10-02 20:48:43 -04:00
NiLuJe
acae9e618b Makefile tweaks for my TC 2012-10-02 20:43:48 -04:00
Dobrica Pavlinusic
c6ead8690e use git describe to generate version
Last release had git annotate tag (added with git -a) so this is
now much better alternative to just git sha1
2012-10-02 20:18:21 -04:00
Tigran Aivazian
47e5065d6a Be minimalistic wrt LDFLAGS
Passing CFLAGS and LDFLAGS to kpdfview link stage has no effect in our
particular case, so I ripped it out, leaving it only for the crengine.
2012-10-02 20:18:21 -04:00
Tigran Aivazian
d5fb6c846f Enable LTO for kpdfview and crengine
Enaling link time optimizations for kpdfview binary and crengine library
causes another slight performance increase --- almost negligible (1-2ms
per page) but still noticeable by precise measurements.
2012-10-02 20:18:21 -04:00
Tigran Aivazian
15baa52889 ARM-specific optimizations
Thanks to NiLuJe who pointed out that our generic -march=armv6 can be
replaced (for K2/K3/DX/DXG) with a more specific optimization:
-march=armv6j -mtune=arm1136jf-s -mfpu=vfp. This I have now done and
also passed ARM_CFLAGS value to CXXFLAGS which is then passed to
crengine build. Tested, works fine. The performance improvement is
negligible (a few ms per page, but seems to be consistently better, i.e.
not just plus/minus fluctuations).
2012-10-02 20:18:21 -04:00
Tigran Aivazian
5dc488e8c8 Build mupdf in release mode, not debug.
Thanks to NiLuJe who pointed out that we are building mupdf in debug
mode. Switching to "release" build reduced the size of the kpdfview
binary and did not cause any performance degradation (but no noticeable
improvement either --- the page handling times seem to be exactly the
same, i.e. fluctuating a couple of ms in both directions).
2012-10-02 20:18:21 -04:00
Tigran Aivazian
2ac7c7d4cf Optimize compilation of cre.cpp
1. Remove unused "-lsdtc++" from the compilation stage as no linking is
done then.
2. Add our standard CFLAGS to the compilation of cre.cpp which brings in
-O3 -march=armv6 which enables optimizations.
It seemed strange that we compile a cpp file with gcc (as opposed to
g++), but I left it as is for now.
2012-09-30 03:30:48 +08:00
Tigran Aivazian
c5565146f9 Typo: --disable-largefiles -> --disable-largefile
As a result of a simple typo we were continuing to include LFS
support unnecessarily...
2012-09-30 03:30:00 +08:00
Tigran Aivazian
35701e6ec0 Create static directories at build, not runtime.
Instead of calling lfs.mkdir() to create "./history" and "./screenshots"
at runtime it is easier to create them at package build time.
I hesitated whether to add "./clipboard" to this list but decided
against it as we can perhaps change current directory and then
all the code manipulating clipboard would break, so I left it as is.

Conflicts:

	filechooser.lua
	screen.lua
	settings.lua
2012-09-25 10:48:50 -04:00
Tigran Aivazian
50a76c09a0 Optimize building djvulibre.
1. Don't build xmltools in the emulator
2. Remove duplicate --disable-desktopfiles
3. Don't build LFS support. The largest DjVu file I have ever published
was a highres facsimile edition of the London Walton Polyglot (1657)
which was a "mere" 1GB in size and I don't think anyone produced
anything bigger. Besides, storing DjVu files >2GB in size (even if
they existed, which I doubt) on a Kindle with only 3GB total storage
space is _exceedingly_ unlikely.
2012-09-25 10:33:45 -04:00