# -*- 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/) # # $Revision$ (Revision of last commit) # $Date$ (Date of last commit) # $Author$ (Author of last commit) # #***************************************************************************** # The Dark Mod Packager build script # Adapted from id's game sconscript # Author: greebo import sys, os, string Import( 'GLOBALS' ) Import( GLOBALS ) def BuildList( s_prefix, s_string ): s_list = string.split( s_string ) for i in range( len( s_list ) ): s_list[ i ] = s_prefix + '/' + s_list[ i ] return s_list # Master list of source files to compile tdm_package_list = BuildList('./', 'tdm_package.cpp') local_env = g_env.Clone() local_env.Append(CPPFLAGS = [ '-Wno-unused', '-Wno-deprecated', '-Wno-non-virtual-dtor' ]) local_env.Append(CPPPATH = '#/../../include') local_env.Append(CPPPATH = '#/../libtdm_update') # Use local Boost if g_os == 'MacOSX': local_env.Append(LIBS = [ File('#/../../macosx/boost/lib/libboost_filesystem.a'), File('#/../../macosx/boost/lib/libboost_program_options.a'), File('#/../../macosx/boost/lib/libboost_thread.a'), File('#/../../macosx/boost/lib/libboost_regex.a'), File('#/../../macosx/boost/lib/libboost_system.a'), File('#/../../macosx/libcurl/libcurl.a'), File('/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsvn_fs-1.dylib'), File('/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libapr-1.dylib'), ]) else: # Linux if LINUX_TARGET_ARCH == 'i386': local_env.Append(LIBS = [ File('#/../../linux/boost/lib/libboost_filesystem.a'), File('#/../../linux/boost/lib/libboost_program_options.a'), File('#/../../linux/boost/lib/libboost_thread.a'), File('#/../../linux/boost/lib/libboost_regex.a'), File('#/../../linux/boost/lib/libboost_system.a'), File('#/../../linux/libcurl/libcurl.a') ]) elif LINUX_TARGET_ARCH == 'debian50-amd64': local_env.Append(LIBS = [ File('#/../../linux/boost/lib.debian50-amd64/libboost_filesystem.a'), File('#/../../linux/boost/lib.debian50-amd64/libboost_program_options.a'), File('#/../../linux/boost/lib.debian50-amd64/libboost_thread.a'), File('#/../../linux/boost/lib.debian50-amd64/libboost_regex.a'), File('#/../../linux/boost/lib.debian50-amd64/libboost_system.a'), File('#/../../linux/libcurl/libcurl.debian50-amd64.a') ]) # Build the dependencies minizip_list = SConscript( '../SConscript.minizip' ) libtdm_update_list = SConscript( '../SConscript.libtdm_update' ) executable_name = 'tdm_package' if g_os == 'MacOSX': executable_name = executable_name + '.macosx' else: if LINUX_TARGET_ARCH == 'i386': executable_name = executable_name + '.linux' elif LINUX_TARGET_ARCH == 'debian50-amd64': executable_name = executable_name + '.linux.debian50-amd64' ret = local_env.Program(executable_name, tdm_package_list + minizip_list + libtdm_update_list) Return( 'ret' )