1 # This file is part of libDAI - http://www.libdai.org/
3 # Copyright (c) 2006-2011, The libDAI authors. All rights reserved.
5 # Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
8 # This template contains configurations for compiling libDAI with Visual C++
9 # under Windows (and GNU Make)
11 # To use it, simply copy this file to 'Makefile.conf' and adapt 'Makefile.conf'
16 # Choose OS from {LINUX, WINDOWS, CYGWIN, MACOSX}
26 # MatLab compiled MEX file
30 # Directories where third party libraries are located
31 BOOSTDIR=E:\windows\boost_1_51_0
32 MPIRDIR=E:\windows\mpir_251
35 # Compile using Visual C++ Compiler
37 # Output filename option of the compiler
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 /MD
46 # Flags to add in non-debugging mode (if DEBUG=false)
48 # Standard include directories
49 CCINC=-Iinclude -I$(BOOSTDIR) -I$(MPIRDIR)
52 # Standard libraries to include
53 LIBS=/link $(LIB)/libdai$(LE)
54 # For linking with BOOST libraries
55 BOOSTLIBS_PO=/LIBPATH:$(BOOSTDIR)\stage\lib
56 BOOSTLIBS_UTF=/LIBPATH:$(BOOSTDIR)\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 (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64" /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64" /LIBPATH:"$(MPIRDIR)" mpirxx.lib mpir.lib /FORCE
62 # MatLab version 7.3 (R2006b) or newer?
64 # Replace the following by the directory where MatLab has been installed
65 MATLABDIR="F:\Program Files\MATLAB\R2010a"
66 # The following should resolve to the MatLab mex compile command
67 MEX=$(MATLABDIR)\bin\mex.bat
69 MEXFLAGS:=-DWINDOWS -DNOMINMAX
70 # Standard include directories for MEX
72 # Standard libraries to include
73 MEXLIBS:=-lmpirxx -lmpir LINKFLAGS="$$LINKFLAGS /FORCE"
74 # Additional library search paths for MEX
75 MEXLIB:=-L"$(BOOSTDIR)\stage\lib" -L"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64" -L"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64" -L"$(MPIRDIR)"
77 # SWIG PYTHON INTERFACE
78 # The following should resolve to the SWIG command
80 # Location of Python header files
81 INCLUDE_PYTHON=C:\python2.5
82 # Location of Boost C++ library header files
83 INCLUDE_BOOST=$(BOOSTDIR)
86 # CImg version 1.3.0 or newer?
88 # Include directory for image segmentation example
89 CIMGINC=-IE:\windows\CImg-1.3.9
90 # Libraries for image segmentation example
91 CIMGLIBS=gdi32.lib user32.lib shell32.lib