From 6ac521106250a609464cfc79c291ec3eb7baec84 Mon Sep 17 00:00:00 2001 From: Arkshine Date: Mon, 2 Feb 2015 19:55:54 +0100 Subject: [PATCH] Zlib: Compile as static library --- AMBuildScript | 5 +++++ public/zlib/AMBuilder | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 public/zlib/AMBuilder diff --git a/AMBuildScript b/AMBuildScript index fb6624fd..b1bfa17c 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -15,6 +15,7 @@ class AMXXConfig(object): self.mysql_path = None self.generated_headers = [] self.versionlib = None + self.zlib = None self.csx_app = None self.stdcxx_path = None @@ -356,6 +357,10 @@ if AMXX.use_auto_versioning(): { 'AMXX': AMXX } ) +AMXX.zlib = builder.RunScript( + 'public/zlib/AMBuilder' +) + builder.RunBuildScripts( [ 'amxmodx/AMBuilder', diff --git a/public/zlib/AMBuilder b/public/zlib/AMBuilder new file mode 100644 index 00000000..90a4762a --- /dev/null +++ b/public/zlib/AMBuilder @@ -0,0 +1,27 @@ +# vim: sts=2 ts=8 sw=2 tw=99 et ft=python: +import os, platform + +builder.SetBuildFolder('zlib') + +lib = builder.compiler.StaticLibrary('zlib') + +lib.compiler.includes += [ + os.path.join(builder.sourcePath, 'public', 'zlib'), +] + +lib.sources += [ + 'adler32.c', + 'compress.c', + 'crc32.c', + 'deflate.c', + 'gzio.c', + 'infback.c', + 'inffast.c', + 'inflate.c', + 'inftrees.c', + 'trees.c', + 'uncompr.c', + 'zutil.c', +] + +rvalue = builder.Add(lib)