-
Notifications
You must be signed in to change notification settings - Fork 1
/
wscript
63 lines (49 loc) · 1.65 KB
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2012-2020 Association Prologin <[email protected]>
import glob
import os.path
from wafgenerator import generator_player_install
def options(opt):
pass
def configure(cfg):
pass
def build(bld):
bld.shlib(
source='''
src/action_deplacer.cc
src/action_glisser.cc
src/action_pousser.cc
src/action_debug_afficher_drapeau.cc
src/api.cc
src/entry.cc
src/game_state.cc
src/interface.cc
src/map.cc
src/player_info.cc
src/rules.cc
src/dumper.cc
''',
defines=['MODULE_COLOR=ANSI_COL_BROWN', 'MODULE_NAME="rules"'],
target='prologin2018',
use=['stechec2'],
)
abs_pattern = os.path.join(bld.path.abspath(), 'src/tests/test-*.cc')
for test_src in glob.glob(abs_pattern):
test_name = os.path.split(test_src)[-1]
test_name = test_name[len("test-"):-(len(".cc"))]
# Waf requires a relative path for the source
src_relpath = os.path.relpath(test_src, bld.path.abspath())
bld.program(
features='gtest',
source=src_relpath,
target='prologin2018-test-{}'.format(test_name),
use=['prologin2018', 'stechec2-utils'],
includes=['.'],
defines=['MODULE_COLOR=ANSI_COL_PURPLE',
'MODULE_NAME="prologin2018"'],
)
bld.install_files('${PREFIX}/share/stechec2/prologin2018', [
'prologin2018.yml',
])
generator_player_install(bld, 'prologin2018')