2019-03-19 23:17:46 +01:00
|
|
|
#! /usr/bin/env python
|
|
|
|
# encoding: utf-8
|
|
|
|
# mittorn, 2018
|
|
|
|
|
|
|
|
from waflib import Logs
|
|
|
|
import os
|
|
|
|
|
|
|
|
top = '.'
|
|
|
|
|
|
|
|
def options(opt):
|
|
|
|
# stub
|
|
|
|
return
|
|
|
|
|
|
|
|
def configure(conf):
|
2023-10-31 02:28:52 +01:00
|
|
|
conf.define('XASH_BUILD_COMMIT', conf.env.GIT_VERSION if conf.env.GIT_VERSION else 'notset')
|
2019-03-19 23:17:46 +01:00
|
|
|
|
|
|
|
def build(bld):
|
2022-09-10 18:55:37 +02:00
|
|
|
bld(name = 'sdk_includes', export_includes = '. ../common ../pm_shared ../engine')
|
|
|
|
bld.stlib(source = bld.path.ant_glob('*.c'),
|
2019-03-24 23:25:44 +01:00
|
|
|
target = 'public',
|
2019-03-19 23:17:46 +01:00
|
|
|
features = 'c',
|
2022-09-10 18:55:37 +02:00
|
|
|
use = 'sdk_includes',
|
|
|
|
subsystem = bld.env.MSVC_SUBSYSTEM)
|
2023-04-13 18:56:31 +02:00
|
|
|
|
|
|
|
if bld.env.TESTS:
|
|
|
|
tests = {
|
|
|
|
'strings': 'tests/test_strings.c',
|
2023-04-17 18:11:16 +02:00
|
|
|
'build': 'tests/test_build.c',
|
2023-04-26 03:04:20 +02:00
|
|
|
'filebase': 'tests/test_filebase.c',
|
2023-10-28 18:31:17 +02:00
|
|
|
'efp': 'tests/test_efp.c',
|
2023-04-13 18:56:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
for i in tests:
|
|
|
|
bld.program(features = 'test',
|
|
|
|
source = tests[i],
|
|
|
|
target = 'test_%s' % i,
|
|
|
|
use = 'public',
|
|
|
|
subsystem = bld.env.CONSOLE_SUBSYSTEM,
|
|
|
|
install_path = None)
|