1# Note that if cross compiling, build with: 2# 3# make NOTEST=1 4# 5# to avoid trying to load the resulting module. 6# Also note that you will need a build-host version of jimsh in the 7# PATH in order to build the extension. 8 9# Prefer jimsh in the PATH because it is more likely to be built 10# for the build-host rather than the target. 11 12ifdef NOTEST 13BUILDOPTS := --notest 14endif 15 16export PATH := $(PATH):.. 17 18all: helloworld.so 19 20helloworld.so: helloworld.c 21 ../build-jim-ext -I.. -L.. $(BUILDOPTS) $^ 22 23# Note: Currently we don't attempt to set LD_LIBRARY_PATH or equivalent 24 25test: 26 JIMLIB=. ../jimsh -e 'package require helloworld; hello' 27 28clean: 29 rm -f *.o *.so 30