Various build fixes (bug 5997 part 14, r=ds).

This commit is contained in:
David Anderson 2013-12-30 17:51:01 -05:00
parent 6d320163a1
commit b69b0de234
5 changed files with 10 additions and 4 deletions

View File

@ -233,7 +233,9 @@ class SMConfig(object):
'-mmacosx-version-min=10.5',
'-arch', 'i386',
'-lstdc++',
'-stdlib=libstdc++',
]
cfg.cxxflags += ['-stdlib=libstdc++']
elif builder.target_platform == 'windows':
cfg.defines += ['WIN32', '_WINDOWS']

View File

@ -58,6 +58,7 @@ binary.sources += [
'llist.c',
'md5.c',
'memdebug.c',
'mprintf.c',
'multi.c',
'netrc.c',
'nss.c',
@ -87,7 +88,5 @@ binary.sources += [
'url.c',
'version.c'
]
if builder.target_platform != 'windows':
builder.sources += ['mprintf.c']
rvalue = builder.Add(binary)

View File

@ -8,7 +8,7 @@ if SM.mysql_root:
os.path.join(SM.mms_root, 'core', 'sourcehook')
]
if builder.target_platform is 'linux' or builder.target_platform is 'darwin':
if builder.target_platform is 'linux' or builder.target_platform is 'mac':
binary.compiler.postlink += [
os.path.join(SM.mysql_root, 'lib', 'libmysqlclient_r.a'),
'-lz',

View File

@ -51,6 +51,11 @@ for cxx_task in SM.extensions:
builder.AddCopy(cxx_task.binary, folder_map['addons/sourcemod/extensions'])
builder.AddCopy(SM.spcomp.binary, folder_map['addons/sourcemod/scripting'])
# Copy version_auto.inc.
for header in SM.generated_headers:
if 'version_auto.inc' in header.path:
builder.AddCopy(header, folder_map['addons/sourcemod/scripting/include'])
# Export PDB files. We write to a file in the build folder which is pretty
# verboten, but it's okay if it's in the root since AMBuild will never try
# to rmdir the root.

View File

@ -33,7 +33,7 @@ def get_hg_version():
return m.groups()
def output_version_headers():
cset, rev = get_hg_version()
rev, cset = get_hg_version()
with open(os.path.join(SourceFolder, 'product.version')) as fp:
contents = fp.read()