# This file contains the default configuration to compile for Windows # platforms. It contains sensitive enviroment configuration that # shouldn't be modified unless you now what you are doing. # PLEASE, DO NOT EDIT THIS FILE import os from cerbero.config import Architecture, Platform # We don't want anything from mingw or msys detected in configure and # used later. allow_system_libs=False if platform == Platform.WINDOWS: separator = ';' if target_arch == Architecture.X86: build = 'i686-w64-mingw32' if target_arch == Architecture.X86_64: build = 'x86_64-w64-mingw32' else: separator = ':' if target_arch == Architecture.X86: buildname='windows_x86' host = 'i686-w64-mingw32' _path = 'w32' else: buildname='windows_x86_64' host = 'x86_64-w64-mingw32' _path = 'w64' target = host py_prefix='lib/python2.7' if not toolchain_prefix: toolchain_prefix = os.path.join(home_dir, 'mingw', _path) def cmd(command): return '%s-%s' % (host, command) # Default compiler flags os.environ['CFLAGS'] = '-Wall -g -O2 ' os.environ['CXXFLAGS'] = '-Wall -g -O2 ' os.environ['OBJCFLAGS'] = '-Wall -g -O2 ' ccache = use_ccache and 'ccache ' or '' # Toolchain environment os.environ['CFLAGS'] += "-DWINVER=0x0501 -D_WIN32_WINNT=0x0501" os.environ['LIBRARY_PATH'] = "%s/lib" % prefix os.environ['CXXFLAGS']=os.environ['CFLAGS'] os.environ['CC']= '%s%s' % (ccache, cmd('gcc')) os.environ['CXX']= '%s%s' % (ccache, cmd('g++')) os.environ['LD']= cmd('ld') 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['RC']= cmd('windres') os.environ['DLLTOOL']= cmd('dlltool') os.environ['PATH'] = '%s/bin%s%s' % (toolchain_prefix, separator, 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' os.environ['ac_cv_lib_bz2_BZ2_bzlibVersion'] = 'yes' os.environ['ac_cv_c_attribute_aligned'] = '64' # Python os.environ['am_cv_python_version'] = '2.7' os.environ['am_cv_python_platform'] = 'win32' os.environ['am_cv_python_pyexecdir'] = '%s/%s/site-packages' % (prefix, py_prefix) os.environ['am_cv_python_pythondir'] = '%s/%s/site-packages' % (prefix, py_prefix) os.environ['PYTHON_INCLUDES'] = '-I%s/include/Python2.7 -I%s/include/Python2.7' % (toolchain_prefix, toolchain_prefix) os.environ['PYTHON_LIBS'] = '-lpython27 -shrext .pyd' # DirectX and DirectSound os.environ['DIRECTSOUND_CFLAGS'] = '-I%s/%s/include/directx' % (toolchain_prefix, host) os.environ['DIRECSOUND_LDFLAGS'] = '-L%s/lib' % toolchain_prefix os.environ['DIRECTX_CFLAGS']= '-I%s/include/DirectX' % toolchain_prefix os.environ['DIRECTX_CFLAGS'] = '-I%s/%s/include/directx' % (toolchain_prefix, host) os.environ['DIRECTX_LDFLAGS'] = '-L%s/lib' % toolchain_prefix if platform == Platform.WINDOWS: os.environ['ACLOCAL'] = 'aclocal-1.11'