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

import os ;
import modules ;

path-constant here : . ;

8 9
local lua-jam-path = [ os.environ LUA_JAM_PATH ] ;
if ! $(lua-jam-path)
10
{
11
  lua-jam-path = "$(here)/../lua.jam" ;
12
}
13
use-project lua : $(lua-jam-path) ; 
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
local luuid-root-path = [ os.environ LUUID_ROOT_PATH ] ;
if ! $(luuid-root-path)
{
  luuid-root-path = "$(here)/../luuid" ;
}
use-project luuid : $(luuid-root-path) ;

local openssl-jam-path = [ os.environ OPENSSL_JAM_PATH ] ;
if ! $(openssl-jam-path)
{
  openssl-jam-path = "$(here)/../openssl.jam" ;
}
use-project openssl : $(openssl-jam-path) ; 

local lce-root-path = [ os.environ LCE_ROOT_PATH ] ;
if ! $(lce-root-path)
{
  lce-root-path = "$(here)/../lce" ;
}
use-project lce : $(lce-root-path) ;

local lfs-root-path = [ os.environ LFS_ROOT_PATH ] ;
if ! $(lfs-root-path)
{
  lfs-root-path = "$(here)/../luafilesystem" ;
}
use-project lfs : $(lfs-root-path) ;

local luavararg-root-path = [ os.environ LUAVARARG_ROOT_PATH ] ;
if ! $(luavararg-root-path)
{
  luavararg-root-path = "$(here)/../luavararg" ;
}
use-project luavararg : $(luavararg-root-path) ;

local luastruct-root-path = [ os.environ LUASTRUCT_ROOT_PATH ] ;
if ! $(luastruct-root-path)
{
  luastruct-root-path = "$(here)/../luastruct" ;
}
use-project luastruct : $(luastruct-root-path) ;

local luasocket-root-path = [ os.environ LUASOCKET_ROOT_PATH ] ;
if ! $(luasocket-root-path)
{
  luasocket-root-path = "$(here)/../luasocket" ;
}
use-project luasocket : $(luasocket-root-path) ;

local loop-root-path = [ os.environ LOOP_ROOT_PATH ] ;
65 66 67 68
if ! $(loop-root-path)
{
  loop-root-path = "$(here)/../loop" ;
}
69
use-project loop : $(loop-root-path) ;
70

71
local oil-root-path = [ os.environ OIL_ROOT_PATH ] ;
72 73 74 75
if ! $(oil-root-path)
{
  oil-root-path = "$(here)/../oil" ;
}
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
use-project oil : $(oil-root-path) ;

local luascs-root-path = [ os.environ LUASCS_ROOT_PATH ] ;
if ! $(luascs-root-path)
{
  luascs-root-path = "$(here)/../scs-lua" ;
}
use-project luascs : $(luascs-root-path) ;

local luasec-root-path = [ os.environ LUASEC_ROOT_PATH ] ;
if ! $(luasec-root-path)
{
  luasec-root-path = "$(here)/../luasec" ;
}
use-project luasec : $(luasec-root-path) ;
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

scs-idl-path = [ os.environ SCS_IDL_PATH ] ;
if ! $(scs-idl-path)
{
  scs-idl-path = "$(here)/../scs-idl" ;
}

openbus-idl-path = [ os.environ OPENBUS_IDL_PATH ] ;
if ! $(openbus-idl-path)
{
  openbus-idl-path = "$(here)/../openbus-idl" ;
}

openbus-legacy-idl-path = [ os.environ OPENBUS_LEGACY_IDL_PATH ] ;
if ! $(openbus-legacy-idl-path)
{
  openbus-legacy-idl-path = "$(here)/../openbus-legacy-idl" ;
}

openbus-lib-idl-path = [ os.environ OPENBUS_LIB_IDL_PATH ] ;
if ! $(openbus-lib-idl-path)
{
  openbus-lib-idl-path = "$(here)/../openbus-lib-idl" ;
}

modules.load preloader : : $(loop-root-path) ;
import preloader ; 
using preloader ;

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
127
    <toolset>msvc-12.0:<cxxflags>/FS
128
    <debug-symbols>on
129 130 131
  : default-build
    <variant>release
    <link>static
132 133 134 135 136 137 138 139 140 141 142 143
  ;

make luaopenbus.c
  : lua/openbus/assistant.lua
    lua/openbus/assistant2.lua
    lua/openbus/core/Access.lua
    lua/openbus/core/idl/makeaux.lua
    lua/openbus/core/idl/parsed.lua
    lua/openbus/core/idl.lua
    lua/openbus/core/legacy/idl.lua
    lua/openbus/core/legacy/parsed.lua
    lua/openbus/core/messages.lua
144 145
    lua/openbus/console/costdin.lua
    lua/openbus/console/utils.lua    
146 147 148 149 150 151 152 153 154 155 156 157 158 159
    lua/openbus/idl/parsed.lua
    lua/openbus/idl.lua
    lua/openbus/util/argcheck.lua
    lua/openbus/util/autotable.lua
    lua/openbus/util/database.lua
    lua/openbus/util/except.lua
    lua/openbus/util/logger.lua
    lua/openbus/util/messages.lua
    lua/openbus/util/oo.lua
    lua/openbus/util/sandbox.lua
    lua/openbus/util/server.lua
    lua/openbus/util/sysex.lua
    lua/openbus/util/tickets.lua
    lua/openbus.lua
160 161
    src/lthreadlib.c
    src/lecholib.c
162 163 164 165
  : preloader.pre-compile
  : <search>$(here)
  ;

166 167 168 169 170 171
make luaconsole.c
  : lua/openbus/console.lua
  : preloader.pre-compile
  : <search>$(here)
  ;

172 173 174 175 176 177
modules.load idl2lua : : $(oil-root-path) ;
import idl2lua ; 
using idl2lua ;

make lua/openbus/idl/parsed.lua 
  : $(openbus-lib-idl-path)/src/openbus.idl
178
    $(openbus-lib-idl-path)/src/corba.idl
179 180 181 182 183
    $(openbus-idl-path)/src/openbus_access-2.1.idl
    $(openbus-idl-path)/src/openbus_offers-2.1.idl
    $(openbus-idl-path)/src/openbus_export-2.1.idl
    $(openbus-idl-path)/src/openbus_core-2.1.idl
    $(openbus-idl-path)/src/openbus_creden-2.1.idl
184
    $(scs-idl-path)/src/scs.idl
185 186 187 188 189 190 191
  : idl2lua.compile
  : <include>$(openbus-lib-idl-path)/src
    <include>$(openbus-idl-path)/src
    <include>$(scs-idl-path)/src
  ;

make lua/openbus/core/idl/parsed.lua 
192 193 194 195 196
  : $(openbus-idl-path)/src/openbus_access-2.1.idl
    $(openbus-idl-path)/src/openbus_offers-2.1.idl
    $(openbus-idl-path)/src/openbus_export-2.1.idl
    $(openbus-idl-path)/src/openbus_core-2.1.idl
    $(openbus-idl-path)/src/openbus_creden-2.1.idl
197 198 199
    $(scs-idl-path)/src/scs.idl
  : idl2lua.compile
  : <include>$(openbus-idl-path)/src
200
    <include>$(openbus-legacy-idl-path)/src
201 202 203 204
    <include>$(scs-idl-path)/src
  ;

make lua/openbus/core/legacy/parsed.lua 
205 206 207
  : $(openbus-legacy-idl-path)/src/access_control.idl
    $(openbus-legacy-idl-path)/src/offer_registry.idl
    $(openbus-legacy-idl-path)/src/data_export.idl
208
    $(openbus-legacy-idl-path)/src/core.idl
209
    $(openbus-legacy-idl-path)/src/credential.idl
210
    $(scs-idl-path)/src/scs.idl
211 212 213 214
    $(openbus-idl-path)/src/openbus_legacy-2.1.idl
    $(openbus-idl-path)/src/openbus_access-2.1.idl
    $(openbus-idl-path)/src/openbus_core-2.1.idl
    $(openbus-idl-path)/src/openbus_creden-2.1.idl
215 216
  : idl2lua.compile
  : <include>$(openbus-legacy-idl-path)/src
217
    <include>$(openbus-idl-path)/src
218 219 220 221 222
    <include>$(scs-idl-path)/src
  ;

lib luaopenbus
  : luaopenbus.c
223 224 225
    src/openbuslua.c
    src/lthreadlib.c
    src/lecholib.c
226
    /lua//lua
227 228 229 230 231 232 233 234 235 236 237 238 239
    /luuid//luuid
    /lce//lce
    /luafilesystem//lfs
    /luavararg//luavararg
    /luastruct//luastruct
    /luasocket//luasocket
    /loop//loop
    /loop//luatuple
    /loop//luacothread
    /oil//oil
    /oil//luaidl
    /luascs//luascs
    /luasec//luasec
240 241 242 243 244 245 246 247 248 249 250
  : <dependency>/lce//lce
    <dependency>/luasec//luasec
    <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    
251
    <dependency>luaopenbus.c
252
    <include>src
253
    <include>.
254 255 256
    <target-os>windows,<link>shared:<linkflags>"/def:$(here)/luaopenbus.def"
  :
  : <include>.
257
    <include>src
258 259 260
  ;
explicit luaopenbus ;

261
exe busconsole
262 263 264
  : src/launcher.c
    src/consolelibs.c
    luaconsole.c
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
    /lua//lua
    /luuid//luuid
    /lce//lce
    /luafilesystem//lfs
    /luavararg//luavararg
    /luastruct//luastruct
    /luasocket//luasocket
    /loop//loop
    /loop//luatuple
    /loop//luacothread
    /oil//oil
    /oil//luaidl
    /luascs//luascs
    /luaopenbus//luaopenbus    
  : <dependency>/loop//loop
    <dependency>/loop//luatuple
    <dependency>/loop//luacothread
    <dependency>/oil//oil
    <dependency>/oil//luaidl
    <dependency>/lce//lce
    <dependency>/luascs//luascs
    <dependency>/luaopenbus//luaopenbus
287
    <define>OPENBUS_PROGNAME=\\\""busconsole\\\""
288 289 290
;
explicit busconsole ;

291 292
install stage
  : luaopenbus
293
    busconsole
294 295
  : <location>install
  ;