6dfe772d2cb8cdf36759bdba9293aafba2829c6d
[libdai.git] / Makefile.WINDOWS
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-2010 Joris Mooij [joris dot mooij at libdai dot org]
8
9
10 # This template contains configurations for compiling libDAI with Visual C++
11 # under Windows (and GNU Make)
12 #
13 # It has been tested with Windows XP, Visual Studio 2008, MatLab R2008b and
14 # Boost 1.42.0
15 #
16 # To use it, simply copy this file to 'Makefile.conf' and adapt 'Makefile.conf'
17 # to your local setup
18
19
20 # OPERATING SYSTEM
21 # Choose OS from {LINUX, WINDOWS, CYGWIN, MACOSX}
22 OS=WINDOWS
23
24 # FILE EXTENSIONS
25 # Static library
26 LE=.lib
27 # Object file
28 OE=.obj
29 # Binary executable
30 EE=.exe
31 # MatLab compiled MEX file
32 ME=.mexw32
33
34 # COMPILER
35 # Compile using Visual C++ Compiler
36 CC=cl
37 # Output filename option of the compiler
38 CCO=/Fe
39 # Flags for the C++ compiler
40 CCFLAGS=/EHac /GR /W3 /DWINDOWS /DNOMINMAX /MD
41 # For MatLab R2008b, the following flag seems to be necessary: /D_SECURE_SCL=0
42 # but it generates exceptions in normal executables... therefore, the MatLab
43 # interface is now built from source completely using mex
44 # Flags to add in debugging mode (if DEBUG=true)
45 CCDEBUGFLAGS=/Ox /Zi /DDAI_DEBUG
46 # Flags to add in non-debugging mode (if DEBUG=false)
47 CCNODEBUGFLAGS=/Ox
48 # Standard include directories
49 CCINC=-Iinclude -IE:\windows\boost_1_42_0
50
51 # LINKER
52 # Standard libraries to include
53 LIBS=/link $(LIB)/libdai$(LE)
54 # For linking with BOOST libraries
55 BOOSTLIBS_PO=/LIBPATH:E:\windows\boost_1_42_0\stage\lib
56 BOOSTLIBS_UTF=/LIBPATH:E:\windows\boost_1_42_0\stage\lib
57 # Additional library search paths for linker
58 # (For some reason, we have to add the VC library path, although it is in the environment)
59 CCLIB=/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"
60
61 # MATLAB
62 # Replace the following by the directory where MatLab has been installed
63 MATLABDIR=c:\matlab\R2008b
64 # The following should resolve to the MatLab mex compile command
65 MEX=$(MATLABDIR)\bin\mex
66 # Flags for MEX
67 MEXFLAGS:=-DWINDOWS -DNOMINMAX
68 # Standard include directories for MEX
69 MEXINC:=$(CCINC)
70 # Additional library search paths for MEX
71 MEXLIB=
72
73 # SWIG PYTHON INTERFACE
74 # The following should resolve to the SWIG command
75 SWIG=swig
76 # Location of Python header files
77 INCLUDE_PYTHON=C:\python2.5
78 # Location of Boost C++ library header files
79 INCLUDE_BOOST=E:\windows\boost_1_42_0