PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Lib/ruby/Makefile.swig

#
Unknown | 42 lines | 34 code | 8 blank | 0 comment | 0 complexity | 6ed80f60e41f63b0c0835a45eaac9878 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. # File : Makefile.swig
  2. # Makefile for a SWIG module. Use this file if you are
  3. # producing a Ruby extension for general use or distribution.
  4. #
  5. # 1. Prepare extconf.rb.
  6. # 2. Modify this file as appropriate.
  7. # 3. Type 'make -f Makefile.swig' to generate wrapper code and Makefile.
  8. # 4. Type 'make' to build your extension.
  9. # 5. Type 'make install' to install your extension.
  10. #
  11. MODULE = yourmodule
  12. FEATURE = $(MODULE)
  13. INTERFACE = $(MODULE).i
  14. RUBY = ruby
  15. SWIG = swig
  16. # for C extension
  17. SWIGOPT = -ruby
  18. WRAPPER = $(MODULE)_wrap.c
  19. ## for C++ extension
  20. #SWIGOPT = -ruby -c++
  21. #WRAPPER = $(MODULE)_wrap.cc
  22. swigall: $(WRAPPER) Makefile
  23. $(WRAPPER): $(INTERFACE)
  24. $(SWIG) $(SWIGOPT) -o $@ $(INTERFACE)
  25. Makefile: extconf.rb
  26. $(RUBY) extconf.rb
  27. @if [ -f Makefile ] ; then\
  28. echo "include Makefile.swig" >> Makefile;\
  29. fi
  30. swigclean:
  31. @if [ -f Makefile ] ; then\
  32. make -f Makefile clean;\
  33. fi
  34. rm -f Makefile $(WRAPPER)