# -*- mode: python -*- # coding=utf-8 ############################################################################# # # PROJECT: The Dark Mod - Packager # $Revision$ # $Date$ # $Author$ # ############################################################################## # 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' )