Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

101 lines
2.0 KiB

#! /usr/bin/env python
# encoding: utf-8
from waflib import Utils
import os
import vpc_parser
top = '.'
PROJECT_NAME = 'client'
def options(opt):
return
games = {
'hl2': ['client_base.vpc', 'client_hl2.vpc'],
'hl2mp': ['client_base.vpc', 'client_hl2mp.vpc'],
'hl1': ['client_base.vpc', 'client_hl1.vpc'],
'portal': ['client_base.vpc', 'client_portal.vpc'],
'hl1mp': ['client_base.vpc', 'client_hl1.vpc'],
'css': ['client_base.vpc', 'client_cstrike.vpc'],
'dod': ['client_base.vpc', 'client_dod.vpc']
}
def configure(conf):
game = conf.options.GAMES
conf.env.GAMES = game
if game not in games.keys():
conf.fatal("Couldn't find game: ", game)
def build(bld):
game = vpc_parser.parse_vpcs( bld.env, games[bld.env.GAMES], '../..' )
includes = [
'.',
'game_controls',
'../../common',
'../../public',
'../../public/tier0',
'../../public/tier1',
'../../vgui2/include',
'../../vgui2/controls',
'../shared'
]
libs = [
'tier0',
'particles',
'dmxloader',
'vgui_controls',
'matsys_controls',
'tier1',
'tier2',
'tier3',
'mathlib',
'vstdlib',
'choreoobjects',
'steam_api',
'bitmap',
'vtf',
'RT',
'ZLIB'
]
install_path = bld.env.PREFIX
if bld.env.DEST_OS != 'android':
install_path += '/hl2/bin'
source = [ 'touch.cpp', 'arch.c' ]
if bld.env.DEST_OS == 'android':
source += [
'third/minizip/mz_zip.c',
'third/minizip/mz_strm.c',
'third/minizip/mz_strm_mem.c',
'third/minizip/mz_strm_buf.c',
'third/minizip/mz_strm_split.c',
'third/minizip/mz_strm_posix.c',
'third/minizip/mz_strm_zlib.c',
'third/minizip/mz_os_posix.c'
]
source += game["sources"]
includes += game["includes"]
defines = game["defines"]
defines.remove('PROTECTED_THINGS_ENABLE')
bld.shlib(
source = source,
target = PROJECT_NAME,
name = PROJECT_NAME,
features = 'c cxx',
includes = includes,
defines = defines,
use = libs,
install_path = install_path,
subsystem = bld.env.MSVC_SUBSYSTEM,
idx = bld.get_taskgen_count()
)