Compile Hashing lib as static and link to AMXX

This commit is contained in:
Arkshine 2015-03-10 12:15:46 +01:00
parent c03bb3693e
commit aaafe0f3f2
3 changed files with 30 additions and 10 deletions

View File

@ -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(

View File

@ -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':

20
third_party/hashing/AMBuilder vendored Normal file
View File

@ -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)