From 3d4754d4ad3cac83aac7469e6a553948bc48efd6 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Tue, 11 May 2010 00:10:36 -0700 Subject: [PATCH] Fixed master amb script for darwin (r=dvander). --- AMBuildScript | 1 + extensions/regex/AMBuilder | 2 ++ loader/AMBuilder | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AMBuildScript b/AMBuildScript index 751ea3ac..6e2f63b2 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -144,6 +144,7 @@ class SM: self.compiler.AddToListVar('CFLAGS', '-mmacosx-version-min=10.5') self.compiler.AddToListVar('POSTLINKFLAGS', ['-isysroot', '/Developer/SDKs/MacOSX10.5.sdk']) + self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386']) elif AMBuild.target['platform'] == 'windows': self.compiler.AddToListVar('CDEFINES', 'WIN32') self.compiler.AddToListVar('CDEFINES', '_WINDOWS') diff --git a/extensions/regex/AMBuilder b/extensions/regex/AMBuilder index 4e4db7ce..76b37573 100644 --- a/extensions/regex/AMBuilder +++ b/extensions/regex/AMBuilder @@ -11,6 +11,8 @@ if AMBuild.target['platform'] == 'linux': path = os.path.join(AMBuild.sourceFolder, 'extensions', 'regex', 'lib_linux', 'libpcre.a') elif AMBuild.target['platform'] == 'windows': path = os.path.join(AMBuild.sourceFolder, 'extensions', 'regex', 'lib_win', 'pcre.lib') +elif AMBuild.target['platform'] == 'darwin': + path = os.path.join(AMBuild.sourceFolder, 'extensions', 'regex', 'lib_darwin', 'libpcre.a') binary.RelinkIfNewer(path) binary['POSTLINKFLAGS'].append(path) diff --git a/loader/AMBuilder b/loader/AMBuilder index ddad32fc..0f0991b0 100644 --- a/loader/AMBuilder +++ b/loader/AMBuilder @@ -5,7 +5,7 @@ compiler = SM.DefaultCompiler() compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core')) compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook')) -if AMBuild.target['platform'] == 'windows': +if AMBuild.target['platform'] == 'windows' or AMBuild.target['platform'] == 'darwin': name = 'sourcemod_mm' elif AMBuild.target['platform'] == 'linux': name = 'sourcemod_mm_i486'