From 0a188e2de8ffdb21ca97487a20f7c9c184f94449 Mon Sep 17 00:00:00 2001 From: "Ian A. Mason" Date: Wed, 23 Oct 2019 13:29:11 +0000 Subject: [PATCH] nodejs example with the extra baggage of the gist. --- examples/nodejs/Makefile | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 examples/nodejs/Makefile diff --git a/examples/nodejs/Makefile b/examples/nodejs/Makefile new file mode 100644 index 0000000..59a68da --- /dev/null +++ b/examples/nodejs/Makefile @@ -0,0 +1,44 @@ + +# https://gist.github.com/ianamason/1c3a54697465436dce2822b80ee364d1 + +VERSION=v10.16.0 +SRC=node-${VERSION} +TAR=${SRC}.tar.gz +URL=https://nodejs.org/dist/${VERSION}/${TAR} + +all: node.bc + + +bitcode: libnode.bc libzlib.bc libuv.bc libv8_base.bc libopenssl.bc node_main.bc \ + libv8_libplatform.bc libicui18n.bc libhttp_parser.bc libcares.bc libnghttp2.bc \ + libbrotili.bc libv8_libbase.bc libv8_sampler.bc libicuucx.bc libicudata.bc \ + libicustubdata.bc libv8_snapshot.bc + + +${TAR}: + wget https://nodejs.org/dist/v10.16.0/node-v10.16.0.tar.gz + +${SRC}: ${TAR} + tar xvfz ${TAR} + +${SRC}/Makefile: ${SRC} + cd ${SRC}; CC=gclang CXX=gclang++ ./configure --openssl-no-asm + #make sure ${SRC}/node isn't earlier than ${SRC} + touch ${SRC}/Makefile + +${SRC}/node: ${SRC}/Makefile + cd ${SRC}; CC=gclang CXX=gclang++ make + #make sure ${SRC}/node isn't earlier than ${SRC} + touch ${SRC}/node + +node.bc: ${SRC}/node + get-bc -o node.bc ${SRC}/node + +clean: + make -C ${SRC} clean + +spotless: + rm -rf ${SRC} + + +.PHONY: bitcode clean spotless