Mercurial > MadButterfly
changeset 1094:613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sat, 04 Dec 2010 12:40:04 +0800 |
parents | e9f617b21db1 |
children | bced6fe39856 |
files | nodejs/run.sh nodejs/wscript |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/nodejs/run.sh Fri Dec 03 22:24:42 2010 +0800 +++ b/nodejs/run.sh Sat Dec 04 12:40:04 2010 +0800 @@ -1,10 +1,19 @@ #!/bin/sh ABS=`realpath $0` -BASE=`dirname $ABS` -NODE_PATH=$BASE:$BASE/objs/default:$NODE_PATH +if [ -z "$SRCDIR" ]; then + SRCDIR=`dirname $ABS`/.. +fi +if [ -z "$BUILDDIR" ]; then + BUILDDIR=`dirname $ABS`/.. +fi + +NODE_PATH=${BUILDDIR}/nodejs/objs/default:${SRCDIR}/nodejs:$NODE_PATH export NODE_PATH +LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BUILDDIR}/src/.libs/ +export LD_LIBRARY_PATH + DIR=`dirname $1` FNAME=`basename $1`
--- a/nodejs/wscript Fri Dec 03 22:24:42 2010 +0800 +++ b/nodejs/wscript Sat Dec 04 12:40:04 2010 +0800 @@ -32,7 +32,7 @@ obj.source = 'font.cc image_ldr.cc' obj.add_objects = 'njs_mb_supp.o observer.o coord.o mbfly_njs.o ' + \ 'shapes.o paints.o' - obj.staticlib = 'mbfly' + obj.lib = 'mbfly' for src in 'observer.cc coord.cc mbfly_njs.cc shapes.cc paints.cc'.split(): obj = conf.new_task_gen('cxx', 'shlib', 'node_addon')