Mac build fixes (bug 4392, r=me).

This commit is contained in:
David Anderson
2010-05-11 01:46:55 -07:00
parent 26c404adee
commit 271b52158e
7 changed files with 21 additions and 9 deletions
+4 -1
View File
@@ -9,13 +9,16 @@ compiler['CINCLUDES'].append(os.path.join(AMBuild.outputFolder, 'includes'))
if compiler.cc.name == 'gcc':
compiler['CFLAGS'].extend(['-Wno-parentheses', '-Wno-format'])
compiler['POSTLINKFLAGS'].extend(['-lgcc', '-lm'])
if AMBuild.target['platform'] == 'linux':
compiler['POSTLINKFLAGS'].extend(['-lgcc', '-lm'])
elif compiler.cc.name == 'msvc':
compiler['POSTLINKFLAGS'].remove('/SUBSYSTEM:WINDOWS')
compiler['POSTLINKFLAGS'].append('/SUBSYSTEM:CONSOLE')
if AMBuild.target['platform'] == 'linux':
compiler['CDEFINES'].extend(['LINUX', 'HAVE_STDINT_H', 'AMX_ANSIONLY', 'ENABLE_BINRELOC'])
elif AMBuild.target['platform'] == 'darwin':
compiler['CDEFINES'].extend(['DARWIN', 'HAVE_STDINT_H', 'AMX_ANSIONLY', 'ENABLE_BINRELOC'])
extension = AMBuild.AddJob('spcomp')
binary = Cpp.ExecutableBuilder('spcomp', AMBuild, extension, compiler)
+1 -1
View File
@@ -8,7 +8,7 @@
#include "amxdbg.h"
#include "osdefs.h"
#include "zlib/zlib.h"
#if defined LINUX
#if defined LINUX || defined DARWIN
#include <unistd.h>
#elif defined WIN32
#include <io.h>
+1 -1
View File
@@ -35,7 +35,7 @@
#include <io.h>
#endif
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__
#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined DARWIN
#include <sclinux.h>
#include <binreloc.h> /* from BinReloc, see www.autopackage.org */
#include <unistd.h>