-EXTRA_DIST = examples
+EXTRA_DIST = demo ext lib
-BUILT_SOURCES = comedi_ruby_wrap.c
+BUILT_SOURCES = ext/comedi_ruby_wrap.c
if HAVE_SWIG
-comedi_ruby_wrap.c: ../comedi.i
- $(SWIG) -ruby -o ./comedi_ruby_wrap.c ../comedi.i
+ext/comedi_ruby_wrap.c: ../comedi.i
+ $(SWIG) -ruby -o ./ext/comedi_ruby_wrap.c ../comedi.i
else
-comedi_ruby_wrap.c:
+ext/comedi_ruby_wrap.c:
echo WARNING: creating bogus comedi_ruby_wrap.c because you don\'t have swig.
- touch comedi_ruby_wrap.c
+ touch ext/comedi_ruby_wrap.c
endif
+
+if HAVE_RUBY
+all-local: ext/comedi.so
+install-data-local:
+ $(RUBY) setup.rb install
+else
+all-local:
+install-data-local:
+endif
+
+ext/Makefile:
+ $(RUBY) setup.rb config
+
+ext/comedi.so: ext/Makefile
+ $(RUBY) setup.rb setup
+
+clean-local:
+ $(RM) ext/comedi.so ext/Makefile
+