diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-07-08 14:57:05 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-11-24 23:37:04 +1000 |
commit | 1f9fa4a5329c6ac9bb09bffee53d071d17179c34 (patch) | |
tree | fd630aa25a0e36a56cfe10c770637c3d71c7300d /examples.ext/Makefile | |
parent | 7a8c0428cc8ec8098c2bb4a9ba2d6a2d597405e3 (diff) | |
download | jimtcl-1f9fa4a5329c6ac9bb09bffee53d071d17179c34.zip jimtcl-1f9fa4a5329c6ac9bb09bffee53d071d17179c34.tar.gz jimtcl-1f9fa4a5329c6ac9bb09bffee53d071d17179c34.tar.bz2 |
Create build-jim-ext for building extensions
Simplifies the process of building loadable extensions
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'examples.ext/Makefile')
-rw-r--r-- | examples.ext/Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/examples.ext/Makefile b/examples.ext/Makefile new file mode 100644 index 0000000..fa5cfc6 --- /dev/null +++ b/examples.ext/Makefile @@ -0,0 +1,29 @@ +# Note that if cross compiling, build with: +# +# make NOTEST=1 +# +# to avoid trying to load the resulting module. +# Also note that you will need a build-host version of jimsh in the +# PATH in order to build the extension. + +# Prefer jimsh in the PATH because it is more likely to be built +# for the build-host rather than the target. + +ifdef NOTEST +BUILDOPTS := --notest +endif + +export PATH := $(PATH):.. + +all: helloworld.so + +helloworld.so: helloworld.c + ../build-jim-ext -I.. -L.. $(BUILDOPTS) $^ + +# Note: Currently we don't attempt to set LD_LIBRARY_PATH or equivalent + +test: + JIMLIB=. ../jimsh -e 'package require helloworld; hello' + +clean: + rm -f *.o *.so |