-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnsound_config_linux.py
54 lines (32 loc) · 1.18 KB
/
nsound_config_linux.py
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
"""
$Id: nsound_config_linux.py 875 2014-09-27 22:25:13Z weegreenblobbie $
"""
import os
# Nsound imports
from nsound_config import NsoundConfig
class NsoundConfigLinux(NsoundConfig):
def _customize_environment(self):
self.env['NS_ON_LINUX'] = True
self.env['NSOUND_PLATFORM_OS'] = "NSOUND_PLATFORM_OS_LINUX"
if self.env['NS_DEBUG_BUILD']:
self.env.AppendUnique(CXXFLAGS = ["-g"])
else:
self.env.AppendUnique(
CXXFLAGS = ["-fno-strict-aliasing", "-fwrapv", "-O2", '-Wall'])
def add_custom_compiler_flags(self):
if not self.env['NS_COMPILER']: return
CXXFLAGS = []
d = self.env['NS_COMPILER']
if 'gcc' in d['compiler']:
longver = d['longver']
if longver >= 40600 and longver < 40700:
CXXFLAGS = ["-std=c++0x"]
elif longver >= 40700:
CXXFLAGS = ["-std=c++11"]
elif 'clang' in d['compiler']:
longver = d['longver']
if longver >= 40200:
CXXFLAGS = ["-std=c++11"]
self.env.AppendUnique(CXXFLAGS = CXXFLAGS)
def on_linux(self):
return True