mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-23 16:54:14 +01:00
Define POSIX and GNUC when compiling for any build on linux/mac.
This commit is contained in:
parent
8cc79680b0
commit
5e1f469c07
@ -133,6 +133,7 @@ class MMS:
|
|||||||
(self.vendor == 'clang' and cxx.majorVersion >= 3):
|
(self.vendor == 'clang' and cxx.majorVersion >= 3):
|
||||||
self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor')
|
self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor')
|
||||||
self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H')
|
self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H')
|
||||||
|
self.compiler.AddToListVar('CDEFINES', 'GNUC')
|
||||||
if self.vendor == 'gcc':
|
if self.vendor == 'gcc':
|
||||||
self.compiler.AddToListVar('CFLAGS', '-mfpmath=sse')
|
self.compiler.AddToListVar('CFLAGS', '-mfpmath=sse')
|
||||||
elif isinstance(cxx, Cpp.MSVC):
|
elif isinstance(cxx, Cpp.MSVC):
|
||||||
@ -195,6 +196,7 @@ class MMS:
|
|||||||
#Platform-specifics
|
#Platform-specifics
|
||||||
if AMBuild.target['platform'] == 'linux':
|
if AMBuild.target['platform'] == 'linux':
|
||||||
self.compiler.AddToListVar('CDEFINES', '_LINUX')
|
self.compiler.AddToListVar('CDEFINES', '_LINUX')
|
||||||
|
self.compiler.AddToListVar('CDEFINES', 'POSIX')
|
||||||
if self.vendor == 'gcc':
|
if self.vendor == 'gcc':
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-static-libgcc')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-static-libgcc')
|
||||||
if self.vendor == 'clang':
|
if self.vendor == 'clang':
|
||||||
@ -202,6 +204,7 @@ class MMS:
|
|||||||
elif AMBuild.target['platform'] == 'darwin':
|
elif AMBuild.target['platform'] == 'darwin':
|
||||||
self.compiler.AddToListVar('CDEFINES', 'OSX')
|
self.compiler.AddToListVar('CDEFINES', 'OSX')
|
||||||
self.compiler.AddToListVar('CDEFINES', '_OSX')
|
self.compiler.AddToListVar('CDEFINES', '_OSX')
|
||||||
|
self.compiler.AddToListVar('CDEFINES', 'POSIX')
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5')
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386'])
|
self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386'])
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
|
||||||
@ -363,7 +366,7 @@ class MMS:
|
|||||||
if AMBuild.target['platform'] == 'windows':
|
if AMBuild.target['platform'] == 'windows':
|
||||||
compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
|
compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
|
||||||
else:
|
else:
|
||||||
compiler['CDEFINES'].extend(['COMPILER_GCC', 'POSIX'])
|
compiler['CDEFINES'].extend(['COMPILER_GCC'])
|
||||||
|
|
||||||
if sdk == 'ep1':
|
if sdk == 'ep1':
|
||||||
if AMBuild.target['platform'] == 'linux':
|
if AMBuild.target['platform'] == 'linux':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user