Made state a member variable of Gibbs, and added a cache for factor entries.
[libdai.git] / Makefile.win
1 # Copyright (C) 2006-2008 Joris Mooij [joris dot mooij at tuebingen dot mpg dot de]
2 # Radboud University Nijmegen, The Netherlands /
3 # Max Planck Institute for Biological Cybernetics, Germany
4 #
5 # This file is part of libDAI.
6 #
7 # libDAI is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # libDAI is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with libDAI; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
21
22 # Enable/disable various approximate inference methods
23 WITH_BP=true
24 WITH_MF=true
25 WITH_HAK=true
26 WITH_LC=true
27 WITH_TREEEP=true
28 WITH_JTREE=true
29 WITH_MR=true
30 WITH_GIBBS=true
31 # Build with debug info?
32 DEBUG=true
33 # Build matlab interface?
34 WITH_MATLAB=
35 # New/old matlab version?
36 NEW_MATLAB=true
37 # Windows or linux (default)?
38 WINDOWS=true
39
40 # Directories
41 INC=include/dai
42 SRC=src
43 LIB=lib
44
45 # Extensions (library, object, executable, matlab compiled MEX file)
46 LE=.lib
47 OE=.obj
48 EE=.exe
49 ME=.mexglx
50
51 # Libraries (for some reason, we have to add the VC library path, although it is in the environment)
52 LIBS=/link $(LIB)/libdai$(LE) /LIBPATH:"C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib"
53
54 # We use the BOOST Program Options library
55 BOOSTLIBS=/LIBPATH:C:\boost_1_36_0\stage\lib
56
57 # Compile using Visual C++ Compiler
58 CC=cl
59 # Output filename option
60 CCO=/Fe
61
62 # Flags for the C++ compiler
63 CCFLAGS=/Iinclude /IC:\boost_1_36_0 /EHsc /Ox
64 CCDEBUGFLAGS=/Zi -DDAI_DEBUG
65
66 # Build targets
67 TARGETS=tests utils $(LIB)/libdai$(LE) examples testregression # doc
68
69 ifdef WITH_MATLAB
70 # Replace the following by the directory where Matlab has been installed
71 MATLABDIR=c:\matlab
72 MEX=$(MATLABDIR)\bin\mex
73 MEXFLAGS=-Iinclude CXX\#$(CC) CXXFLAGS\#"/EHsc /Ox"
74 endif
75
76
77 include Makefile.shared
78
79
80 $(LIB)/libdai$(LE) : bipgraph$(OE) daialg$(OE) alldai$(OE) clustergraph$(OE) factorgraph$(OE) properties$(OE) regiongraph$(OE) util$(OE) weightedgraph$(OE) exceptions$(OE) $(OBJECTS)
81 -mkdir lib
82 lib /out:$(LIB)/libdai$(LE) bipgraph$(OE) daialg$(OE) alldai$(OE) clustergraph$(OE) factorgraph$(OE) properties$(OE) regiongraph$(OE) util$(OE) weightedgraph$(OE) exceptions$(OE) $(OBJECTS)
83
84 testregression : tests/testdai$(EE)
85 @echo Starting regression test...this can take a minute or so!
86 cd tests && testregression.bat && cd ..
87
88 doc : $(INC)/*.h $(SRC)/*.cpp examples/*.cpp doxygen.conf
89 doxygen doxygen.conf
90
91 .PHONY : clean
92 clean :
93 -del *$(OE) *.ilk *.pdb *$(EE) matlab\*$(ME) examples\*$(EE) examples\*.ilk examples\*.pdb tests\testdai$(EE) tests\*.pdb tests\*.ilk utils\*$(EE) utils\*.pdb utils\*.ilk $(LIB)\libdai$(LE)