Fixed SWIG octave wrappers and added octave port of example_sprinkler
[libdai.git] / swig / Makefile
1 # This file is part of libDAI - http://www.libdai.org/
2 #
3 # libDAI is licensed under the terms of the GNU General Public License version
4 # 2, or (at your option) any later version. libDAI is distributed without any
5 # warranty. See the file COPYING for more details.
6 #
7 # Copyright (C) 2009 Patrick Pletscher [pletscher at inf dot ethz dot ch]
8
9
10 include ../Makefile.conf
11
12 .PHONY: all
13
14 all: _dai.so dai.oct
15
16 _dai.so: ../lib/libdai.a dai.i
17 $(SWIG) -python -classic -c++ dai.i
18 g++ -Wall -c -O3 -g -fPIC dai_wrap.cxx -I$(INCLUDE_PYTHON) -I$(INCLUDE_BOOST) -I../include
19 g++ -shared dai_wrap.o -o _dai.so ../lib/libdai.a
20
21 dai.oct: ../lib/libdai.a dai.i
22 $(SWIG) -octave -c++ -o dai_wrap.cpp dai.i
23 mkoctfile -I$(INCLUDE_PYTHON) -I$(INCLUDE_BOOST) -I../include -o dai.oct dai_wrap.cpp ../lib/libdai.a
24
25 .PHONY: clean
26
27 clean:
28 rm -f dai_wrap.cxx dai_wrap.cpp dai_wrap.o _dai.so dai.oct dai.py dai.pyc sprinkler.fg