summaryrefslogtreecommitdiff
path: root/config/linux.config
blob: 5dac1ae990c8d6117c1c35a862047c159d65fc3f (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
# This file contains the default configuration to compile for Linux
# platforms. It contains sensitive enviroment configuration that
# shouldn't be modified unless you know what you are doing.
# PLEASE, DO NOT EDIT THIS FILE

import os
from cerbero.config import Architecture

for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'LDFLAGS', 'OBJCFLAGS']:
    os.environ[f] = os.environ.get(f, '')

if target_arch == Architecture.X86:
    arch_flags = ' -m32 '
    _host = 'i686-pc-linux'
else:
    arch_flags = ' -m64 '
    _host = 'x86_64-pc-linux'

if host is None and target_arch != arch:
    host = _host

os.environ['CFLAGS'] += ' -Wall -g -O2' + arch_flags
os.environ['CXXFLAGS'] += ' -Wall -g -O2' + arch_flags
os.environ['OBJCFLAGS'] += ' -Wall -g -O2' + arch_flags
os.environ['CCASFLAGS'] += ' -Wall -g -O2' + arch_flags
os.environ['LDFLAGS'] += arch_flags
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)

if use_ccache:
    os.environ['CC'] += 'ccache gcc'
    os.environ['CXX'] += 'ccache g++'