forked from yifanlu/KindleTool
-
Notifications
You must be signed in to change notification settings - Fork 43
/
COMPILING
41 lines (31 loc) · 2.4 KB
/
COMPILING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Recommended Compilation Directions
Basically, you'll need a working toolchain, nettle, and libarchive >= 3.0.3 (with gzip support).
If you don't want to bother, static binaries are available:
here for the latest releases: http://www.mobileread.com/forums/showthread.php?t=187880
and here for the latest development snapshots, which are most likely the builds you'll be interested in: http://www.mobileread.com/forums/showthread.php?t=225030
To compile for Linux:
1) Install the required (development) dependencies in the appropriate manner for your distro (i.e., use your PMS).
1.5) For Debian/Ubuntu people: You'll need zlib1g-dev, libarchive-dev and nettle-dev
1.5) For Fedora people: You'll need zlib-devel, libarchive-devel and nettle-devel
1.5) For OpenSuse people: You'll need zlib-devel, libarchive-devel and libnettle-devel
2) Compile using "make" in the tool's directory
3) If you want to install it in /usr/local, run "make install". (I'd recommend using this through the checkinstall tool on Debian/Ubuntu).
2.5) If GCC throws a fit about libarchive, or if it fails to link with a bunch of undefined references to archive_* symbols, your libarchive version is too old.
You'll have to build it manually (get the latest 3.x release from http://libarchive.github.com/).
See https://github.com/NiLuJe/KindleTool/issues/1 for more details. Or try using the simple-linux-static-build.sh script in the tools folder.
Fellow Gentoo users, there's a portage overlay over on https://github.com/NiLuJe/gentoo-kindletool, enjoy ;).
To compile for OSX:
1) If you're using Homebrew, see https://github.com/NiLuJe/homebrew-kindletool
To compile for Windows:
Native)
You can build a native version with a MinGW-w64 toolchain.
On a native MinGW+MSYS toolchain, you'll probably have to tweak the Makefile, but it should handle a Linux cross toolchain properly with the mingw target ;).
Check the tools/mingw directory for more details.
Cygwin)
1) Get Cygwin
2) Install the required packages for a proper toolchain (gcc, binutils, autoconf, automake, libtool, make, ...)
3) Install the packages: zlib / zlib-devel, libarchive13 / libarchive-devel, libnettle4 / libnettle-devel, git, cmake, patch, pkg-config, libxml2-devel
5) Compile using "make" in the tool's directory
6) Install it by running "make install"
----
If you need more complex examples, the various scripts found in the tools directory are what I personally use.