# -*- mode: python -*- # coding=utf-8 #***************************************************************************** # The Dark Mod GPL Source Code # # This file is part of the The Dark Mod Source Code, originally based # on the Doom 3 GPL Source Code as published in 2011. # # The Dark Mod Source Code is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the License, # or (at your option) any later version. For details, see LICENSE.TXT. # # Project: The Dark Mod Packager (http://www.thedarkmod.com/) # #***************************************************************************** # The Dark Mod Packager build script # Adapted from id's game sconscript # Author: greebo import sys, os, string import scons_utils Import( 'GLOBALS' ) Import( GLOBALS ) # Master list of source files to compile tdm_package_list = scons_utils.BuildList('tdm_package', 'tdm_package.cpp') local_env = g_env.Clone() local_env.Append(CPPFLAGS = [ '-Wno-unused', '-Wno-deprecated', '-Wno-non-virtual-dtor' ]) if g_os == 'FreeBSD': # use distro installed libs - easier and safer to use # shared libs for SSL local_env.Append(LIBS = [ 'ssl', 'crypto', File('/usr/local/lib/libcurl.a'), File('/usr/local/lib/libminizip.a'), ]) elif g_os == 'Linux': # Linux path_template = '#/../ThirdParty/artefacts/{0}/lib/lnx%d_s_gcc_rel_stdcpp/{1}' % (64 if TARGET_ARCH == 'x64' else 32) local_env.Append(LIBS = [ File(path_template.format('libcurl', 'libcurl.a')), File(path_template.format('mbedtls', 'libmbedtls.a')), File(path_template.format('mbedtls', 'libmbedx509.a')), File(path_template.format('mbedtls', 'libmbedcrypto.a')), File(path_template.format('zlib', 'libminizip.a')), File(path_template.format('zlib', 'libz.a')), 'stdc++fs', ]) ret = local_env.Program(target = 'package', source = tdm_package_list + libtdm_update_list) Return( 'ret' )