blob: 328be105300135e3250f04c4f145439d39ba635f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# This file contains the default configuration to compile for windows
# platforms. It contains sensitive enviroment configurations that
# shouldn't be modified unless you now what's you are doing.
# PLEASE, DO NOT EDIT THIS FILE
import os
from cerbero.config import Architecture
if target_arch == Architecture.X86:
host = 'i686-w64-mingw32'
_path = 'w32'
_mingw_defines = "-DMINGW32 -D__MINGW32__"
else:
host = 'x86_64-w64-mingw32'
_path = 'w64'
_mingw_defines = "-DMINGW64 -D__MINGW64__"
if not toolchain_prefix:
toolchain_prefix = os.path.join(prefix, '..', 'mingw', _path)
def cmd(command):
return '%s-%s' % (host, command)
# Default compiler flags
os.environ['CFLAGS'] = '-g -O2'
os.environ['CXXFLAGS'] = '-g -O2'
os.environ['OBJCFLAGS'] = '-g -O2'
# Toolchain environment
os.environ['CFLAGS'] += "-DWINVER=0x0501"
os.environ['CPPFLAGS'] = _mingw_defines
os.environ['LDFLAGS'] = "-L%s/lib %s" % (toolchain_prefix, os.environ.get('LDFLAGS', ''))
os.environ['CXXFLAGS']=os.environ['CFLAGS']
os.environ['CC']= cmd('gcc')
os.environ['LD']= cmd('ld')
os.environ['CXX']= cmd('g++')
os.environ['CPP']= cmd('cpp')
os.environ['RANLIB']= cmd('ranlib')
os.environ['AR']= cmd('ar')
os.environ['AS']= cmd('as')
os.environ['NM']= cmd('nm')
os.environ['STRIP']= cmd('strip')
os.environ['WINDRES']= cmd('windres')
os.environ['PATH'] = '%s/bin:%s' % (toolchain_prefix, os.environ['PATH'])
os.environ['ne_cv_libsfor_socket'] = '-lws2_32'
os.environ['ne_cv_libsfor_gethostbyname'] = '-lws2_32'
os.environ['ac_cv_func_malloc_0_nonnull'] ='yes'
os.environ['ac_cv_func_realloc_0_nonnull'] ='yes'
os.environ['lt_cv_deplibs_check_method'] = 'pass_all'
# Python
os.environ['am_cv_python_version'] = '2.7'
os.environ['am_cv_python_platform'] = 'win32'
os.environ['am_cv_python_pyexecdir'] = '%s/Python27/Lib/site-packages' % toolchain_prefix
os.environ['am_cv_python_pythondir'] = '%s/Python27/Lib/site-packages' % toolchain_prefix
os.environ['PYTHON_INCLUDES'] = '-I%s/include/Python2.7' % toolchain_prefix
os.environ['PYTHON_LIBS'] = '-lpython27'
# DirectX and DirectSound
os.environ['DIRECTSOUND_CFLAGS']= '-I%s/include/DirectX' % toolchain_prefix
os.environ['DIRECSOUND_LDFLAGS'] = '-L%s/lib' % toolchain_prefix
os.environ['DIRECTX_CFLAGS']= '-I%s/include/DirectX' % toolchain_prefix
os.environ['DIRECTX_LDFLAGS'] = '-L%s/lib' % toolchain_prefix
|