-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjamroot
166 lines (133 loc) · 3.84 KB
/
jamroot
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#
# Copyright (c) 2025 Fas Xmut (fasxmut at protonmail dot com)
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# b2 build
echo "Build cpp-programs ..." ;
######################################################################
path-constant config-file : ./project-config.jam ;
import path ;
import option ;
######################################################################
rule show-help ( )
{
echo "--------------------------------------------------------------------------------" ;
echo "Help Menu:" ;
echo ;
echo "b2 help - show this help menu" ;
echo "b2 cleanall - Remove all temporary generated files" ;
echo "b2 config [config options] - Write config to project-config.jam" ;
echo "b2 [build options] - Start Build" ;
echo ;
echo "config options:" ;
echo "===============" ;
echo ;
echo " --botan-include=/inc/dir - Change user-defined botan include dir" ;
echo " (botan-3 will be searched at /inc/dir/botan-3)" ;
echo " (/inc/dir will be added as \"-I/inc/dir\")" ;
echo " (default: /usr/include)" ;
echo "--------------------------------------------------------------------------------" ;
}
if [ MATCH ^(help)$ : [ modules.peek : ARGV ] ]
{
show-help ;
exit ;
}
if [ MATCH ^(cleanall)$ : [ modules.peek : ARGV ] ]
{
echo "cleanall ..." ;
cmd = "rm -rf `find . -name bin`" ;
echo "$(cmd)" ;
SHELL $(cmd) ;
cmd = "rm -rf $(config-file)" ;
echo "$(cmd)" ;
SHELL $(cmd) ;
exit ;
}
if [ MATCH ^(config)$ : [ modules.peek : ARGV ] ]
{
SHELL ": > $(config-file)" ;
botan-include = [ option.get botan-include ] ;
if ! $(botan-include)
{
botan-include = /usr/include ;
}
SHELL "echo \"constant botan-include : $(botan-include) ;\" >> $(config-file)" ;
echo "Your config:" ;
echo "============" ;
echo "botan-include\t\t$(botan-include)" ;
echo "============" ;
exit ;
}
if ! [ path.exists $(config-file) ]
{
show-help ;
exit ;
}
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
######################################################################
alias boost-headers ;
project
:
default-build
<cxxstd>23
<cxxflags>"-I$(botan-include)"
:
requirements
<library>boost-headers
;
######################################################################
# botan-3
#|
check botan-3: it must exist at $(botan-include)
|#
echo ;
if ! [ path.exists $(botan-include)/botan-3 ]
{
echo "ERROR:" ;
echo "\t$(botan-include)/botan-3 does not exist," ;
echo "Fix:" ;
echo "\tchange b2 config --botan-include=your/path/to/include to contain botan-3" ;
exit ;
}
else if ! [ path.exists $(botan-include)/botan-3/botan/asio_stream.h ]
{
echo "ERROR:" ;
echo "\t$(botan-include)/botan-3 does exist," ;
echo "\tbut $(botan-include)/botan-3/botan/asio_stream.h does not exist," ;
echo "\thave you built botan-3 with boost support?" ;
echo "Fix:" ;
echo "\tRebuild botan-3 with boost support." ;
exit ;
}
echo "Found: $(botan-include)/botan-3/botan/asio_stream.h" ;
lib
botan-3
:
:
<name>botan-3
:
:
<include>$(botan-include)/botan-3
;
######################################################################
# 3D engine
lib
jimcpp
:
:
<name>jimcpp-core
;
######################################################################
alias
lyra
;
######################################################################
build-project src ;
######################################################################