* Patch #4909 by Joseph Eagar (joeedh)
[blender.git] / config / win32-vc-config.py
1 LCGDIR = '#../lib/windows'
2 LIBDIR = '${LCGDIR}'
3
4 BF_VERSE = "#extern/verse/dist"
5 BF_VERSE_LIBPATH = "${BF_BUILDDIR}/extern/verse/dist"
6 BF_VERSE_INCLUDE = BF_VERSE
7 BF_VERSE_LIBS = "libverse"
8
9 BF_PYTHON = LIBDIR + '/python'
10 BF_PYTHON_VERSION = '2.4'
11 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
12 BF_PYTHON_BINARY = 'python'
13 BF_PYTHON_LIB = 'python24'
14 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
15
16 WITH_BF_OPENAL = 'true'
17 BF_OPENAL = LIBDIR + '/openal'
18 BF_OPENAL_INC = '${BF_OPENAL}/include ${BF_OPENAL}/include/AL '
19 BF_OPENAL_LIB = 'openal_static'
20 BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
21
22 WITH_BF_ICONV = 'true'
23 BF_ICONV = LIBDIR + '/iconv'
24 BF_ICONV_INC = '${BF_ICONV}/include'
25 BF_ICONV_LIB = 'iconv'
26 BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
27
28 WITH_BF_SDL = 'true'
29 BF_SDL = LIBDIR + '/sdl'
30 BF_SDL_INC = '${BF_SDL}/include'
31 BF_SDL_LIB = 'SDL.lib'
32 BF_SDL_LIBPATH = '${BF_SDL}/lib'
33
34 BF_PTHREADS = LIBDIR + '/pthreads'
35 BF_PTHREADS_INC = '${BF_PTHREADS}/include'
36 BF_PTHREADS_LIB = 'pthreadVC2'
37 BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
38
39 WITH_BF_FMOD = 'false'
40 BF_FMOD = LIBDIR + '/fmod'
41
42 WITH_BF_OPENEXR = 'true'
43 BF_OPENEXR = LIBDIR + '/openexr'
44 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath '
45 BF_OPENEXR_LIB = ' Iex Half IlmImf Imath '
46 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib_msvc'
47
48 WITH_BF_JPEG = 'true'
49 BF_JPEG = LIBDIR + '/jpeg'
50 BF_JPEG_INC = '${BF_JPEG}/include'
51 BF_JPEG_LIB = 'libjpeg'
52 BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
53
54 WITH_BF_PNG = 'true'
55 BF_PNG = LIBDIR + '/png'
56 BF_PNG_INC = '${BF_PNG}/include'
57 BF_PNG_LIB = 'libpng_st'
58 BF_PNG_LIBPATH = '${BF_PNG}/lib'
59
60 BF_TIFF = LIBDIR + '/tiff'
61 BF_TIFF_INC = '${BF_TIFF}/include'
62
63 WITH_BF_ZLIB = 'true'
64 BF_ZLIB = LIBDIR + '/zlib'
65 BF_ZLIB_INC = '${BF_ZLIB}/include'
66 BF_ZLIB_LIB = 'libz'
67 BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
68
69 WITH_BF_INTERNATIONAL = 'true'
70
71 BF_GETTEXT = LIBDIR + '/gettext'
72 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
73 BF_GETTEXT_LIB = 'gnu_gettext'
74 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
75
76 WITH_BF_FTGL = 'true'
77 BF_FTGL = LIBDIR + '/ftgl'
78 BF_FTGL_INC = '${BF_FTGL}/include'
79 BF_FTGL_LIB = 'extern_ftgl'
80
81 WITH_BF_GAMEENGINE = 'true'
82
83 WITH_BF_ODE = 'true'
84 BF_ODE = LIBDIR + '/ode'
85 BF_ODE_INC = BF_ODE + '/include'
86 BF_ODE_LIB = BF_ODE + '/lib/libode.a'
87
88 WITH_BF_BULLET = 'true'
89 BF_BULLET = '#extern/bullet'
90 BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
91 BF_BULLET_LIB = 'extern_bullet'
92
93 BF_SOLID = '#extern/solid'
94 BF_SOLID_INC = '${BF_SOLID}'
95 BF_SOLID_LIB = 'extern_solid'
96
97 #WITH_BF_NSPR = 'true'
98 #BF_NSPR = $(LIBDIR)/nspr
99 #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
100 #BF_NSPR_LIB = 
101
102 # Uncomment the following line to use Mozilla inplace of netscape
103 #CPPFLAGS += -DMOZ_NOT_NET
104 # Location of MOZILLA/Netscape header files...
105 #BF_MOZILLA = $(LIBDIR)/mozilla
106 #BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
107 #BF_MOZILLA_LIB =
108 # Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
109 # if this is not set.
110 #
111 # Be paranoid regarding library creation (do not update archives)
112 #BF_PARANOID = 'true'
113
114 # enable freetype2 support for text objects
115 BF_FREETYPE = LIBDIR + '/freetype'
116 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
117 BF_FREETYPE_LIB = 'freetype2ST'
118 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
119
120 WITH_BF_QUICKTIME = 'true' # -DWITH_QUICKTIME
121 BF_QUICKTIME = LIBDIR + '/QTDevWin'
122 BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
123 BF_QUICKTIME_LIB = 'qtmlClient'
124 BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
125
126 WITH_BF_STATICOPENGL = 'false'
127 BF_OPENGL_INC = '${BF_OPENGL}/include'
128 BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
129 BF_OPENGL_LIB = 'opengl32 glu32'
130 BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
131                          '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
132                          '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
133 CC = 'cl.exe'
134 CXX = 'cl.exe'
135
136 CCFLAGS = ['/nologo', '/Og', '/Ot', '/Ob1', '/Op', '/G6','/EHsc', '/J', '/W3', '/Gd', '/MT']
137
138 CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DUSE_OPENAL', '-DFTGL_LIBRARY_STATIC']
139 REL_CFLAGS = ['-O2', '-DNDEBUG']
140 REL_CCFLAGS = ['-O2', '-DNDEBUG']
141 C_WARN = []
142 CC_WARN = []
143
144 LLIBS = 'ws2_32 dxguid vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid'
145
146 PLATFORM_LINKFLAGS = '''
147                         /SUBSYSTEM:CONSOLE 
148                         /MACHINE:IX86 
149                         /ENTRY:mainCRTStartup 
150                         /INCREMENTAL:NO 
151                         /NODEFAULTLIB:"msvcprt.lib" 
152                         /NODEFAULTLIB:"glut32.lib" 
153                         /NODEFAULTLIB:"libc.lib"
154                         /NODEFAULTLIB:"libcd.lib"
155                         /NODEFAULTLIB:"libcpd.lib" 
156                         /NODEFAULTLIB:"libcp.lib" 
157                         /NODEFAULTLIB:"libcmtd.lib"
158                     '''
159                         
160 BF_BUILDDIR = '..\\build\\win32-vc'
161 BF_INSTALLDIR='..\\install\\win32-vc'