]> git.notmuchmail.org Git - notmuch/blob - bindings/ruby/extconf.rb
fix out of tree build
[notmuch] / bindings / ruby / extconf.rb
1 #!/usr/bin/env ruby
2 # coding: utf-8
3 # Copyright 2010, 2011, 2012 Ali Polatel <alip@exherbo.org>
4 # Distributed under the terms of the GNU General Public License v3
5
6 require 'mkmf'
7
8 dir = File.join(ENV['NOTMUCH_SRCDIR'], 'lib')
9
10 # includes
11 $INCFLAGS = "-I#{dir} #{$INCFLAGS}"
12
13 if ENV['EXTRA_LDFLAGS']
14   $LDFLAGS += " " + ENV['EXTRA_LDFLAGS']
15 end
16
17 if not ENV['LIBNOTMUCH']
18   exit 1
19 end
20
21 $LOCAL_LIBS += ENV['LIBNOTMUCH']
22
23 # Create Makefile
24 dir_config('notmuch')
25 create_makefile('notmuch')