make binary: allow custom config flags
authorNathan Rajlich <nathan@tootallnate.net>
Fri, 11 Jan 2013 00:59:09 +0000 (16:59 -0800)
committerNathan Rajlich <nathan@tootallnate.net>
Fri, 11 Jan 2013 01:05:14 +0000 (17:05 -0800)
For example, to cross-compile from my OS X laptop for Raspberry Pi, you would
do something like:

  $ make binary BINARYNAME=node-v`python tools/getnodeversion.py`-linux-arm-pi \
      DESTCPU=arm CONFIG_FLAGS="--dest-os=linux"

Makefile

index d02a64a..0ebc14f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -278,7 +278,7 @@ tar: $(TARBALL)
 $(BINARYTAR): release-only
        rm -rf $(BINARYNAME)
        rm -rf out/deps out/Release
-       ./configure --prefix=/ --without-snapshot --dest-cpu=$(DESTCPU)
+       ./configure --prefix=/ --without-snapshot --dest-cpu=$(DESTCPU) $(CONFIG_FLAGS)
        $(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1
        cp README.md $(BINARYNAME)
        cp LICENSE $(BINARYNAME)