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', '-mmacosx-version-min=10.5',
'-arch', 'i386', '-arch', 'i386',
'-lstdc++', '-lstdc++',
'-stdlib=libstdc++',
] ]
cfg.cxxflags += ['-stdlib=libstdc++']
elif builder.target_platform == 'windows': elif builder.target_platform == 'windows':
cfg.defines += ['WIN32', '_WINDOWS'] cfg.defines += ['WIN32', '_WINDOWS']

View File

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

View File

@ -8,7 +8,7 @@ if SM.mysql_root:
os.path.join(SM.mms_root, 'core', 'sourcehook') 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 += [ binary.compiler.postlink += [
os.path.join(SM.mysql_root, 'lib', 'libmysqlclient_r.a'), os.path.join(SM.mysql_root, 'lib', 'libmysqlclient_r.a'),
'-lz', '-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(cxx_task.binary, folder_map['addons/sourcemod/extensions'])
builder.AddCopy(SM.spcomp.binary, folder_map['addons/sourcemod/scripting']) 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 # 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 # verboten, but it's okay if it's in the root since AMBuild will never try
# to rmdir the root. # to rmdir the root.

View File

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