PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Lib/ruby/Makefile.swig

#
Unknown | 42 lines | 34 code | 8 blank | 0 comment | 0 complexity | 6ed80f60e41f63b0c0835a45eaac9878 MD5 | raw file
 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
12MODULE    = yourmodule
13FEATURE   = $(MODULE)
14INTERFACE = $(MODULE).i
15RUBY      = ruby
16SWIG      = swig
17
18# for C extension
19SWIGOPT   = -ruby
20WRAPPER   = $(MODULE)_wrap.c
21
22## for C++ extension
23#SWIGOPT   = -ruby -c++
24#WRAPPER   = $(MODULE)_wrap.cc
25
26
27swigall: $(WRAPPER) Makefile
28
29$(WRAPPER): $(INTERFACE)
30	$(SWIG) $(SWIGOPT) -o $@ $(INTERFACE)
31
32Makefile: extconf.rb
33	$(RUBY) extconf.rb
34	@if [ -f Makefile ] ; then\
35		echo "include Makefile.swig" >> Makefile;\
36	fi
37
38swigclean:
39	@if [ -f Makefile ] ; then\
40		make -f Makefile clean;\
41	fi
42	rm -f Makefile $(WRAPPER)