2020-08-08 13:49:49 +02:00
|
|
|
# -*- makefile-gmake -*-
|
2015-06-01 09:08:59 +02:00
|
|
|
|
|
|
|
dir := bindings
|
|
|
|
|
|
|
|
# force the shared library to be built
|
2021-10-30 22:48:54 +02:00
|
|
|
ruby-bindings: $(dir)/ruby.stamp
|
|
|
|
|
|
|
|
$(dir)/ruby.stamp: lib/$(LINKER_NAME)
|
2015-06-01 09:08:59 +02:00
|
|
|
ifeq ($(HAVE_RUBY_DEV),1)
|
2015-06-01 09:09:00 +02:00
|
|
|
cd $(dir)/ruby && \
|
|
|
|
EXTRA_LDFLAGS="$(NO_UNDEFINED_LDFLAGS)" \
|
2015-06-01 09:09:01 +02:00
|
|
|
LIBNOTMUCH="../../lib/$(LINKER_NAME)" \
|
2017-03-12 12:59:13 +01:00
|
|
|
NOTMUCH_SRCDIR='$(NOTMUCH_SRCDIR)' \
|
2018-05-09 14:38:48 +02:00
|
|
|
$(RUBY) extconf.rb --vendor
|
2021-10-30 22:48:54 +02:00
|
|
|
$(MAKE) -C $(dir)/ruby CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC" && touch $@
|
2015-06-01 09:08:59 +02:00
|
|
|
endif
|
|
|
|
|
2021-10-30 22:48:55 +02:00
|
|
|
python-cffi-bindings: $(dir)/python-cffi.stamp
|
|
|
|
|
|
|
|
$(dir)/python-cffi.stamp: lib/$(LINKER_NAME)
|
2019-10-20 03:52:56 +02:00
|
|
|
ifeq ($(HAVE_PYTHON3_CFFI),1)
|
|
|
|
cd $(dir)/python-cffi && \
|
|
|
|
${PYTHON} setup.py build --build-lib build/stage && \
|
2021-10-30 22:48:55 +02:00
|
|
|
mkdir -p build/stage/tests && cp tests/*.py build/stage/tests && \
|
|
|
|
touch ../python-cffi.stamp
|
2019-10-20 03:52:56 +02:00
|
|
|
endif
|
|
|
|
|
2015-06-01 09:08:59 +02:00
|
|
|
CLEAN += $(patsubst %,$(dir)/ruby/%, \
|
|
|
|
.RUBYARCHDIR.time \
|
|
|
|
Makefile database.o directory.o filenames.o\
|
|
|
|
init.o message.o messages.o mkmf.log notmuch.so query.o \
|
|
|
|
status.o tags.o thread.o threads.o)
|
2018-05-13 18:17:18 +02:00
|
|
|
|
2021-10-30 22:48:54 +02:00
|
|
|
CLEAN += bindings/ruby/.vendorarchdir.time $(dir)/ruby.stamp
|
2019-10-20 03:52:56 +02:00
|
|
|
|
2021-10-30 22:48:55 +02:00
|
|
|
CLEAN += bindings/python-cffi/build $(dir)/python-cffi.stamp
|