Various EM code improvements by Charles Vaske and Andy Nguyen
[libdai.git] / Makefile.WINDOWS64
1 # This file is part of libDAI - http://www.libdai.org/
2 #
3 # Copyright (c) 2006-2011, The libDAI authors. All rights reserved.
4 #
5 # Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
6
7
8 # This template contains configurations for compiling libDAI with Visual C++
9 # under Windows (and GNU Make)
10 #
11 # To use it, simply copy this file to 'Makefile.conf' and adapt 'Makefile.conf'
12 # to your local setup
13
14
15 # OPERATING SYSTEM
16 # Choose OS from {LINUX, WINDOWS, CYGWIN, MACOSX}
17 OS=WINDOWS
18
19 # FILE EXTENSIONS
20 # Static library
21 LE=.lib
22 # Object file
23 OE=.obj
24 # Binary executable
25 EE=.exe
26 # MatLab compiled MEX file
27 ME=.mexw64
28
29 # DIRECTORIES
30 # Directories where third party libraries are located
31 BOOSTDIR=E:\windows\boost_1_51_0
32 MPIRDIR=E:\windows\mpir_251
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 /MD
46 # Flags to add in non-debugging mode (if DEBUG=false)
47 CCNODEBUGFLAGS=/Ox
48 # Standard include directories
49 CCINC=-Iinclude -I$(BOOSTDIR) -I$(MPIRDIR)
50
51 # LINKER
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
60
61 # MATLAB
62 # MatLab version 7.3 (R2006b) or newer?
63 NEW_MATLAB=true
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
68 # Flags for MEX
69 MEXFLAGS:=-DWINDOWS -DNOMINMAX
70 # Standard include directories for MEX
71 MEXINC:=$(CCINC)
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)"
76
77 # SWIG PYTHON INTERFACE
78 # The following should resolve to the SWIG command
79 SWIG=swig
80 # Location of Python header files
81 INCLUDE_PYTHON=C:\python2.5
82 # Location of Boost C++ library header files
83 INCLUDE_BOOST=$(BOOSTDIR)
84
85 # CIMG
86 # CImg version 1.3.0 or newer?
87 NEW_CIMG=true
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