summaryrefslogtreecommitdiff
path: root/config/linux.config
blob: 174a512ba548734736908996547bd1f230309ac4 (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-linux-gnu'
else:
    arch_flags = ' -m64 '
    _host = 'x86_64-linux-gnu'

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++'