Permalink
Browse files

Make a fat binary for the OS X `make pkg`.

  • Loading branch information...
1 parent 27d8b05 commit 0d77886a83f178179af1b252c228992888b6b29c @TooTallNate committed Feb 22, 2012
Showing with 12 additions and 2 deletions.
  1. +12 −2 Makefile
View
@@ -153,9 +153,19 @@ PKGDIR=out/dist-osx
pkg: $(PKG)
$(PKG):
- -rm -rf $(PKGDIR)
- ./configure --prefix=$(PKGDIR)/usr/local --without-snapshot
+ rm -rf $(PKGDIR)
+ rm -rf out/deps out/Release
+ ./configure --prefix=$(PKGDIR)/32/usr/local --without-snapshot --dest-cpu=ia32
$(MAKE) install
+ rm -rf out/deps out/Release
+ ./configure --prefix=$(PKGDIR)/usr/local --without-snapshot --dest-cpu=x64
+ $(MAKE) install
+ lipo $(PKGDIR)/32/usr/local/bin/node \
+ $(PKGDIR)/usr/local/bin/node \
+ -output $(PKGDIR)/usr/local/bin/node-universal \
+ -create
+ mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
+ rm -rf $(PKGDIR)/32
$(packagemaker) \
--id "org.nodejs.NodeJS-$(VERSION)" \
--doc tools/osx-pkg.pmdoc \

0 comments on commit 0d77886

Please sign in to comment.