-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathJamfile
56 lines (44 loc) · 1.11 KB
/
Jamfile
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
# Copyright (C) 2009, Joacim Jacobsson (j.jacobsson at gmail.com)
# All rights reserved.
#
# See LICENSE file for details.
#
include config/Jamrules ;
InvokeLibs 3rd ;
InvokeLibs libs ;
InvokeApps apps ;
InvokeTags ;
Depends apps : libs ;
SUFBTC = .btc ;
CTC_EXE = $(BUILD_BIN_DIR)ctc$(SUFEXE) ;
BUILD_TREES_DIR = build$(SLASH)trees$(SLASH) ;
actions ctc
{
$(CTC_EXE) -i $(>) -o $(<) -a $(<:S=.asm) -x $(<:S=.xgml)
}
rule CompileBehaviourTrees
{
NotFile $(1) ;
local _sources = [ GLOB $(1) : *.bts ] ;
local _headers = [ GLOB $(1) : *.h ] ;
local _source ;
local _bth = [ GLOB $(1) : *.bth ] ;
for _source in $(_sources)
{
Includes $(_source) : $(_headers) ;
local _btc = $(BUILD_TREES_DIR)$(_source:S=$(SUFBTC)) ;
local _path = $(_btc:P) ;
ctc $(_btc) : $(_source) ;
Includes $(_source) : $(_bth) ;
Depends $(_btc) : $(CTC_EXE) ;
Depends $(_btc) : $(_path) ;
Depends $(_btc) : $(_source) ;
Depends $(1) : $(_btc) ;
MkDir $(_path) ;
Clean clean : $(_btc) ;
Clean clean : $(_btc:S=.asm) ;
Clean clean : $(_btc:S=.xgml) ;
}
}
CompileBehaviourTrees trees ;
Depends all : trees ;