2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-22 09:57:21 +01:00
hlsdk-xash3d/cl_dll/wscript

73 lines
2.2 KiB
Plaintext
Raw Normal View History

2019-05-03 18:19:39 +02:00
#! /usr/bin/env python
# encoding: utf-8
# a1batross, mittorn, 2018
from waflib import Utils
import os
2019-05-03 18:19:39 +02:00
def options(opt):
# stub
return
def configure(conf):
if conf.env.GOLDSRC and conf.env.DEST_OS != 'win32':
conf.check_cc(lib='dl')
if conf.env.DEST_OS == 'win32':
conf.check_cxx( lib='user32' )
2019-05-03 18:19:39 +02:00
def build(bld):
source = bld.path.parent.ant_glob([
'pm_shared/*.c',
'dlls/crossbow.cpp', 'dlls/crowbar.cpp', 'dlls/egon.cpp', 'dlls/gauss.cpp', 'dlls/handgrenade.cpp',
'dlls/hornetgun.cpp', 'dlls/mp5.cpp', 'dlls/python.cpp', 'dlls/rpg.cpp', 'dlls/satchel.cpp',
'dlls/shotgun.cpp', 'dlls/squeakgrenade.cpp', 'dlls/tripmine.cpp', 'dlls/glock.cpp'
])
2019-05-03 18:19:39 +02:00
source += bld.path.ant_glob(['hl/*.cpp'])
source += [
'ev_hldm.cpp', 'ammo.cpp', 'ammo_secondary.cpp', 'ammohistory.cpp',
'battery.cpp', 'cdll_int.cpp', 'com_weapons.cpp', 'death.cpp',
'demo.cpp', 'entity.cpp', 'ev_common.cpp', 'events.cpp',
'flashlight.cpp', 'GameStudioModelRenderer.cpp', 'geiger.cpp',
'health.cpp', 'hud.cpp', 'hud_msg.cpp', 'hud_redraw.cpp',
'hud_spectator.cpp', 'hud_update.cpp', 'in_camera.cpp',
'input.cpp', 'input_goldsource.cpp', 'input_mouse.cpp',
'input_xash3d.cpp', 'menu.cpp', 'message.cpp',
'overview.cpp', 'parsemsg.cpp', 'saytext.cpp',
'status_icons.cpp', 'statusbar.cpp', 'studio_util.cpp',
'StudioModelRenderer.cpp', 'text_message.cpp', 'train.cpp',
'tri.cpp', 'util.cpp', 'view.cpp', 'scoreboard.cpp', 'MOTD.cpp'
]
2019-05-06 03:13:09 +02:00
2019-05-03 18:19:39 +02:00
includes = Utils.to_list('. hl/ ../dlls ../dlls/wpn_shared ../common ../engine ../pm_shared ../game_shared ../public ../utils/false_vgui/include')
2019-05-06 03:13:09 +02:00
2019-05-03 18:19:39 +02:00
defines = ['CLIENT_DLL']
if bld.env.GOLDSRC:
defines += ['GOLDSOURCE_SUPPORT']
2019-05-06 03:13:09 +02:00
2019-05-03 18:19:39 +02:00
libs = []
if bld.env.GOLDSRC and bld.env.DEST_OS != 'win32':
2019-05-03 18:19:39 +02:00
libs += ['DL']
2019-05-06 03:13:09 +02:00
if bld.env.DEST_OS == 'win32':
libs += ["USER32"]
if bld.env.DEST_OS not in ['android', 'dos']:
2019-05-06 03:13:09 +02:00
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR)
else:
install_path = bld.env.PREFIX
2019-05-03 18:19:39 +02:00
bld.shlib(
source = source,
2019-11-11 02:07:51 +01:00
target = 'client' + bld.env.POSTFIX,
name = 'client',
2019-05-03 18:19:39 +02:00
features = 'c cxx',
includes = includes,
defines = defines,
use = libs,
2019-05-06 03:13:09 +02:00
install_path = install_path,
2019-05-03 18:19:39 +02:00
subsystem = bld.env.MSVC_SUBSYSTEM,
idx = bld.get_taskgen_count()
2019-05-03 18:19:39 +02:00
)