Skip to content

Commit

Permalink
allow custom PREFIX and MULTILIB in bulding TvmJIT
Browse files Browse the repository at this point in the history
`make TVMJIT_PREFIX=/usr` will pass PREFIX to TvmJIT Makefile.

`make TVMJIT_MULTILIB="lib/$(gcc -print-multiarch)"` will pass MULTILIB to
TvmJIT Makefile.

It's useful for building Shine with default package.path and package.cpath
values mimicking the same default values of LuaJIT installed via way preferred
by Linux distro (like LuaJIT packaged in Debian and installed via `apt`).
  • Loading branch information
leonidborisenko committed Sep 25, 2014
1 parent f180fea commit 807888b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ ${BUILD}/deps/liblpeg.a: ${LPEG}
${BUILD}/deps/libtvmjit.a: ${TJ}
cp ${TVMDIR}/libtvmjit.a ${BUILD}/deps/libtvmjit.a

${TJ}: TVMJIT_PREFIX ?= ${PREFIX}
${TJ}: TVMJIT_MULTILIB ?=
${TJ}:
git submodule update --init ${DEPDIR}/tvmjit
${MAKE} PREFIX=${BUILD} TRAVIS=1 -C ${DEPDIR}/tvmjit
${MAKE} PREFIX=${TVMJIT_PREFIX} MULTILIB=${TVMJIT_MULTILIB} TRAVIS=1 -C ${DEPDIR}/tvmjit

${LPEG}:
make -C ${DEPDIR}/lpeg ${LPEG_BUILD}
Expand Down Expand Up @@ -175,6 +177,7 @@ realclean: clean
stat ${DEPDIR}/nanomsg/Makefile && make -C ${DEPDIR}/nanomsg clean
rm -rf ${BUILD}

bootstrap: TVMJIT_PREFIX = ${BUILD}
bootstrap: ${TJ} ${LPEG}
mkdir -p boot/bin
mkdir -p boot/lib
Expand Down

0 comments on commit 807888b

Please sign in to comment.