source-engine/dedicated/wscript

85 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2021-04-26 04:36:09 +08:00
#! /usr/bin/env python
# encoding: utf-8
from waflib import Utils
import os
top = '.'
PROJECT_NAME = 'dedicated'
def options(opt):
# stub
return
def configure(conf):
conf.define('LAUNCHERONLY',1)
conf.define('SUPPORT_PACKED_STORE',1)
2021-04-26 04:36:09 +08:00
conf.define('DEDICATED',1)
def build(bld):
source = [
'filesystem.cpp',
'../public/filesystem_init.cpp',
'../common/netapi.cpp',
'../common/SteamAppStartup.cpp',
'sys_common.cpp',
'sys_ded.cpp',
'console/conproc.cpp',
'console/textconsole.cpp',
'../filesystem/filetracker.cpp',
'../filesystem/basefilesystem.cpp',
'../filesystem/packfile.cpp',
'../filesystem/filesystem_async.cpp',
'../filesystem/filesystem_stdio.cpp',
'../filesystem/QueuedLoader.cpp',
'../public/zip_utils.cpp',
'../public/tier0/memoverride.cpp'
2021-04-26 04:36:09 +08:00
]
if bld.env.DEST_OS == 'win32':
2022-03-19 20:40:11 +08:00
source += [
2023-12-03 04:59:49 +08:00
'sys_windows.cpp',
'vgui/CreateMultiplayerGameServerPage.cpp',
'vgui/MainPanel.cpp',
'../public/vgui_controls/vgui_controls.cpp',
'vgui/vguihelpers.cpp',
2023-12-03 04:59:49 +08:00
'console/TextConsoleWin32.cpp'
2022-03-19 20:40:11 +08:00
]
else:
source += [
'sys_linux.cpp', # [$POSIX]
'console/TextConsoleUnix.cpp', # [$POSIX]
'../filesystem/linux_support.cpp' # [$POSIX]
]
2021-04-26 04:36:09 +08:00
includes = [
'.',
'../public',
'../public/tier0',
'../public/tier1',
'../common'
] + bld.env.INCLUDES_SDL2
defines = []
libs = ['tier0','vpklib','tier1','tier2','tier3','vstdlib','steam_api','appframework','mathlib', 'EDIT']
2021-04-26 04:36:09 +08:00
2023-12-13 23:10:34 +08:00
if bld.env.DEST_OS == 'win32':
libs += ['vgui_controls', 'USER32', 'SHELL32']
2023-12-03 04:59:49 +08:00
2021-04-26 04:36:09 +08:00
install_path = bld.env.LIBDIR
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()
)