Paranoia2/cl_dll/wscript

67 lines
1.1 KiB
Python

#! /usr/bin/env python
# encoding: utf-8
# a1batross, mittorn, 2018
from waflib import Utils
import os
def options(opt):
# stub
return
def configure(conf):
if conf.env.DEST_OS != 'win32':
conf.check_cc(lib='dl')
else:
conf.check_cxx(lib='user32')
def build(bld):
source = bld.path.ant_glob([
'render/*.cpp',
'*.cpp'
])
source += bld.path.parent.ant_glob([
'game_shared/*.cpp',
'pm_shared/*.cpp'
])
includes = [
'.',
'hl/',
'render/',
'../dlls',
'../common',
'../engine',
'../pm_shared',
'../game_shared',
'../public',
'../utils/vgui/include'
]
defines = ['CLIENT_DLL']
libs = []
if bld.env.DEST_OS != 'win32':
libs += ['DL']
else:
libs += ["USER32"]
if bld.env.DEST_OS not in ['android', 'dos']:
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR)
else:
install_path = bld.env.PREFIX
bld.shlib(
source = source,
target = 'client' + bld.env.POSTFIX,
name = 'client',
features = 'c cxx',
includes = includes,
defines = defines,
use = libs,
install_path = install_path,
subsystem = bld.env.MSVC_SUBSYSTEM,
idx = bld.get_taskgen_count()
)