diff --git a/AMBuildScript b/AMBuildScript index b1bfa17c..7156024a 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -16,6 +16,7 @@ class AMXXConfig(object): self.generated_headers = [] self.versionlib = None self.zlib = None + self.hashing = None self.csx_app = None self.stdcxx_path = None @@ -269,7 +270,9 @@ class AMXXConfig(object): cfg.includes += [os.path.join(builder.sourcePath, 'public', 'sdk')] cfg.includes += [os.path.join(builder.sourcePath, 'public', 'amtl', 'include')] cfg.includes += [os.path.join(builder.sourcePath, 'public', 'memtools')] - cfg.includes += [os.path.join(builder.sourcePath, 'public', 'hashing')] + cfg.includes += [os.path.join(builder.sourcePath, 'third_party')] + cfg.includes += [os.path.join(builder.sourcePath, 'third_party', 'hashing')] + cfg.includes += [os.path.join(builder.sourcePath, 'third_party', 'zlib')] return # @@ -358,7 +361,11 @@ if AMXX.use_auto_versioning(): ) AMXX.zlib = builder.RunScript( - 'public/zlib/AMBuilder' + 'third_party/zlib/AMBuilder' +) + +AMXX.hashing = builder.RunScript( + 'third_party/hashing/AMBuilder' ) builder.RunBuildScripts( diff --git a/amxmodx/AMBuilder b/amxmodx/AMBuilder index df938308..aa5f4127 100644 --- a/amxmodx/AMBuilder +++ b/amxmodx/AMBuilder @@ -32,7 +32,7 @@ elif builder.target_platform == 'windows': ] binary.compiler.linkflags += jit_objects -binary.compiler.linkflags += [AMXX.zlib.binary] +binary.compiler.linkflags += [AMXX.zlib.binary, AMXX.hashing.binary] if builder.target_platform == 'mac': binary.compiler.postlink += [ @@ -93,13 +93,6 @@ binary.sources = [ 'cvars.cpp', '../public/memtools/CDetour/detours.cpp', '../public/memtools/CDetour/asm/asm.c', - '../public/hashing/hashing.cpp', - '../public/hashing/hashers/crc32.cpp', - '../public/hashing/hashers/md5.cpp', - '../public/hashing/hashers/sha1.cpp', - '../public/hashing/hashers/sha256.cpp', - '../public/hashing/hashers/sha3.cpp', - '../public/hashing/hashers/keccak.cpp' ] if builder.target_platform == 'windows': diff --git a/third_party/hashing/AMBuilder b/third_party/hashing/AMBuilder new file mode 100644 index 00000000..508cae53 --- /dev/null +++ b/third_party/hashing/AMBuilder @@ -0,0 +1,20 @@ +# vim: sts=2 ts=8 sw=2 tw=99 et ft=python: +import os, platform + +lib = builder.compiler.StaticLibrary('hashinglib') + +lib.compiler.includes += [ + os.path.join(builder.sourcePath, 'third_party', 'hashing'), +] + +lib.sources += [ + 'hashing.cpp', + 'hashers/crc32.cpp', + 'hashers/keccak.cpp', + 'hashers/md5.cpp', + 'hashers/sha1.cpp', + 'hashers/sha3.cpp', + 'hashers/sha256.cpp', +] + +rvalue = builder.Add(lib)