mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-08 19:08:35 +00:00
Define POSIX when compiling for any build on linux/mac.
This commit is contained in:
parent
edabd8ec51
commit
a004dc956b
@ -182,11 +182,13 @@ class SM:
|
|||||||
#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':
|
||||||
self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh')
|
self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh')
|
||||||
elif AMBuild.target['platform'] == 'darwin':
|
elif AMBuild.target['platform'] == 'darwin':
|
||||||
|
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++')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user