summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2015-01-01 16:26:55 -0600
committerNicolas Williams <nico@cryptonector.com>2015-01-01 16:26:55 -0600
commit972c0481496a6b93c760b122f700212c2a3edeb6 (patch)
tree7d7c6180db5d9af8debe85e2df411bab555b313d /README.md
parent902aa39fce4cc036333bb7c7a935c33e8d7314a3 (diff)
Add static build instructions (fix #294)
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/README.md b/README.md
index b792ecc1..c77f3d76 100644
--- a/README.md
+++ b/README.md
@@ -15,11 +15,15 @@ shovel. Also, read the wiki: http://github.com/stedolan/jq/wiki
If you're building directly from the latest git, you'll need flex,
bison, libtool, make, autoconf and libonig installed. To build, run:
- autoreconf -i
+ autoreconf -i # if building from git
./configure
make -j8
make check
+To build a statically linked version of jq, run:
+
+ make LDFLAGS=-all-static
+
After make finishes, you'll be able to use `./jq`. You can also
install it using:
@@ -33,3 +37,13 @@ To cross-compile for OS X and Windows, see docs/Rakefile's build task
and scripts/crosscompile. You'll need a cross-compilation environment,
such as Mingw for cross-compiling for Windows.
+Cross-compilation requires a clean workspace, then:
+
+ # git clean ...
+ autoreconf -i
+ ./configure
+ make distclean
+ scripts/crosscompile <name-of-build> <configure-options>
+
+Use the --host= and --target= ./configure options to select a
+cross-compilation environment. See the wiki.