Jamroot 5.79 KB
Newer Older
1
2
3
4
5
6
7
8
9
# -*- coding: iso-8859-1-unix -*-

import os ;
import modules ;

path-constant here : . ;
path-constant root : $(here)/.. ;
path-constant deps : $(root)/.. ;

10
11
local lua = [ os.environ LUA ] ;
if ! $(lua)
12
{
13
  lua = "$(deps)/lua" ;
14
}
15
use-project lua : $(lua)/bbuild ; 
16

17
18
local luuid = [ os.environ LUUID ] ;
if ! $(luuid)
19
{
20
  luuid = "$(deps)/luuid" ;
21
}
22
use-project luuid : $(luuid)/bbuild ;
23

24
local openssl-jam = [ os.environ OPENSSL_JAM ] ;
25
if ! $(openssl-jam)
26
{
27
  openssl-jam = "$(deps)/openssl.jam" ;
28
}
29
use-project openssl : $(openssl-jam) ; 
30

31
32
local lce = [ os.environ LCE ] ;
if ! $(lce)
33
{
34
  lce = "$(deps)/lce" ;
35
}
36
use-project lce : $(lce)/bbuild ;
37

38
39
local lfs = [ os.environ LUAFILESYSTEM ] ;
if ! $(lfs)
40
{
41
  lfs = "$(deps)/luafilesystem" ;
42
}
43
use-project lfs : $(lfs)/bbuild ;
44

45
46
local luavararg = [ os.environ LUAVARARG ] ;
if ! $(luavararg)
47
{
48
  luavararg = "$(deps)/luavararg" ;
49
}
50
use-project luavararg : $(luavararg)/bbuild ;
51

52
53
local luastruct = [ os.environ LUASTRUCT ] ;
if ! $(luastruct)
54
{
55
  luastruct = "$(deps)/luastruct" ;
56
}
57
use-project luastruct : $(luastruct)/bbuild ;
58

59
60
local luasocket = [ os.environ LUASOCKET ] ;
if ! $(luasocket)
61
{
62
  luasocket = "$(deps)/luasocket" ;
63
}
64
use-project luasocket : $(luasocket)/bbuild ;
65

66
67
local loop = [ os.environ LOOP ] ;
if ! $(loop)
68
{
69
  loop = "$(deps)/loop" ;
70
}
71
use-project loop : $(loop)/bbuild ;
72

73
74
local oil = [ os.environ OIL ] ;
if ! $(oil)
75
{
76
  oil = "$(deps)/oil" ;
77
}
78
use-project oil : $(oil)/bbuild ;
79

80
81
local luascs = [ os.environ LUASCS ] ;
if ! $(luascs)
82
{
83
  luascs = "$(deps)/luascs" ;
84
}
85
use-project luascs : $(luascs)/bbuild ;
86

87
88
scs-idl = [ os.environ SCS_IDL ] ;
if ! $(scs-idl)
89
{
90
  scs-idl = "$(deps)/scs-idl" ;
91
92
}

93
94
openbus-idl = [ os.environ OPENBUS_IDL ] ;
if ! $(openbus-idl)
95
{
96
  openbus-idl = "$(deps)/openbus-idl" ;
97
98
}

99
100
openbus-legacy-idl = [ os.environ OPENBUS_LEGACY_IDL ] ;
if ! $(openbus-legacy-idl)
101
{
102
  openbus-legacy-idl = "$(deps)/openbus-legacy-idl" ;
103
104
}

105
106
openbus-lib-idl = [ os.environ OPENBUS_LIB_IDL ] ;
if ! $(openbus-lib-idl)
107
{
108
  openbus-lib-idl = "$(deps)/openbus-lib-idl" ;
109
110
}

111
modules.load preloader : : $(loop)/bbuild ;
112
import preloader ; 
113
114

using preloader : $(lua) ;
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

project luaopenbus
  : requirements
    <target-os>windows:<pch>off
    <target-os>windows,<link>shared:<runtime-link>shared
    <target-os>windows,<link>static:<runtime-link>static
    <target-os>windows:<debug-store>database
    <target-os>windows:<define>_CRT_SECURE_NO_WARNINGS
    <toolset>msvc-12.0:<cxxflags>/FS
    <debug-symbols>on
  : default-build
    <variant>release
    <link>static
  ;

make luaopenbus.c
  : $(root)/lua/openbus/assistant.lua
    $(root)/lua/openbus/assistant2.lua
    $(root)/lua/openbus/core/Access.lua
    $(root)/lua/openbus/core/idl/makeaux.lua
    $(root)/lua/openbus/core/idl/parsed.lua
    $(root)/lua/openbus/core/idl.lua
    $(root)/lua/openbus/core/legacy/idl.lua
    $(root)/lua/openbus/core/legacy/parsed.lua
    $(root)/lua/openbus/core/messages.lua
    $(root)/lua/openbus/idl/parsed.lua
    $(root)/lua/openbus/idl.lua
    $(root)/lua/openbus/util/argcheck.lua
    $(root)/lua/openbus/util/autotable.lua
    $(root)/lua/openbus/util/database.lua
    $(root)/lua/openbus/util/except.lua
    $(root)/lua/openbus/util/logger.lua
    $(root)/lua/openbus/util/messages.lua
    $(root)/lua/openbus/util/oo.lua
    $(root)/lua/openbus/util/sandbox.lua
    $(root)/lua/openbus/util/server.lua
    $(root)/lua/openbus/util/sysex.lua
    $(root)/lua/openbus/util/tickets.lua
    $(root)/lua/openbus.lua
  : preloader.pre-compile
155
156
  : <dependency>/lua//stage
    <search>$(root)
157
158
159
    <location>$(here)
  ;

160
modules.load idl2lua : : $(oil)/bbuild ;
161
import idl2lua ; 
162
using idl2lua : $(lua) ;
163
164

make $(root)/lua/openbus/idl/parsed.lua 
165
  : $(openbus-lib-idl)/src/openbus.idl
166
  : idl2lua.compile
167
168
169
170
  : <dependency>/lua//stage
    <include>$(openbus-lib-idl)/src
    <include>$(openbus-idl)/src
    <include>$(scs-idl)/src
171
172
173
  ;

make $(root)/lua/openbus/core/idl/parsed.lua 
174
175
176
177
178
179
  : $(openbus-idl)/src/access_control.idl
    $(openbus-idl)/src/offer_registry.idl
    $(openbus-idl)/src/data_export.idl
    $(openbus-idl)/src/core.idl
    $(openbus-idl)/src/credential.idl
    $(scs-idl)/src/scs.idl
180
  : idl2lua.compile
181
182
183
  : <dependency>/lua//stage
    <include>$(openbus-idl)/src
    <include>$(scs-idl)/src
184
185
186
187
    <location>$(here)
  ;

make $(root)/lua/openbus/core/legacy/parsed.lua 
188
189
190
191
192
  : $(openbus-legacy-idl)/src/access_control_service.idl
    $(openbus-legacy-idl)/src/registry_service.idl
    $(openbus-legacy-idl)/src/fault_tolerance.idl
    $(openbus-legacy-idl)/src/core.idl
    $(scs-idl)/src/scs.idl
193
  : idl2lua.compile
194
195
196
  : <dependency>/lua//stage
    <include>$(openbus-legacy-idl)/src
    <include>$(scs-idl)/src
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
    <location>$(here)
  ;

local common-requirements =
  <library>/lua//lua
  <library>/luuid//luuid
  <library>/lce//lce
  <library>/luafilesystem//lfs
  <library>/luavararg//luavararg
  <library>/luastruct//luastruct
  <library>/luasocket//luasocket
  <library>/loop//loop
  <library>/loop//luatuple
  <library>/loop//luacothread
  <library>/oil//oil
  <library>/oil//luaidl
  <library>/luascs//luascs
  <dependency>/lce//lce
  <dependency>/loop//loop
  <dependency>/loop//luacothread
  <dependency>/loop//luatuple
  <dependency>/oil//oil
  <dependency>/oil//luaidl
  <dependency>/luascs//luascs
  <dependency>/luasocket//luasocket
  <dependency>/luastruct//luastruct
  <dependency>/luavararg//luavararg    
;

lib luaopenbus
  : luaopenbus.c
  : $(common-requirements)
    <dependency>luaopenbus.c
    <include>$(root)/src
    <include>$(here)
    <target-os>windows,<link>shared:<linkflags>"/def:$(here)/luaopenbus.def"
  :
  : <include>$(here)
    <include>$(root)/src
  ;
explicit luaopenbus ;

exe busconsole
  : $(root)/src/console.c
  : $(common-requirements)
    <library>/luaopenbus//luaopenbus    
    <dependency>/luaopenbus//luaopenbus
;
explicit busconsole ;

install stage
  : luaopenbus
    busconsole
  : <location>install
  ;