-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jamroot
121 lines (104 loc) · 2.87 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
#==============================================================================
# Brief : OPMIP Project Build
# Authors : Bruno Santos <[email protected]>
# -----------------------------------------------------------------------------
# OPMIP - Open Proxy Mobile IP
#
# Copyright (C) 2010-2011 Universidade de Aveiro
# Copyright (C) 2010-2011 Instituto de Telecomunicações - Pólo de Aveiro
#
# This software is distributed under a license. The full license
# agreement can be found in the file LICENSE in this distribution.
# This software may not be copied, modified, sold or distributed
# other than expressed in the named license agreement.
#
# This software is distributed without any warranty.
#==============================================================================
import os ;
import option ;
import path ;
project opmip
: requirements
<include>inc
<link>static
<linkflags>-rdynamic
<define>BOOST_ASIO_SEPARATE_COMPILATION
: usage-requirements
<include>inc
: build-dir bin.v2
;
#
# Import the boost project
#
path-constant TOP : . ;
local boost-major = 1 ;
local boost-minor = 49 ;
local boost-patch = 0 ;
local boost-root ;
boost-root ?= [ option.get boost-root ] ;
boost-root ?= [ os.environ BOOST_ROOT ] ;
if ! $(boost-root) {
boost-root = [ path.join $(TOP) ../boost_$(boost-major)_$(boost-minor)_$(boost-patch) ] ;
local version = $(boost-major).$(boost-minor).$(boost-patch) ;
ECHO "Warning: Assuming that Boost $(version) root is located at $(boost-root)" ;
ECHO "Warning: You can set the location of the Boost $(version) libraries root in the command line"
"(--boost-root=/path/to/boost) or in the environment variable BOOST_ROOT" ;
}
use-project boost : $(boost-root) ;
#
# Import the ODTONE Project
#
odtone-root ?= [ option.get odtone-root ] ;
odtone-root ?= [ os.environ ODTONE_ROOT ] ;
if $(odtone-root) {
use-project odtone : $(odtone-root) ;
}
#
# General utilities
#
rule explicit-alias ( main-target-name :
sources * :
requirements * :
default-build * :
usage-requirements * )
{
alias $(main-target-name)
: $(sources)
: $(requirements)
: $(default-build)
: $(usage-requirements)
;
explicit $(main-target-name) ;
}
IMPORT $(__name__) : explicit-alias : : opmip.explicit-alias ;
rule runtime-lib ( name : basename ? )
{
basename ?= $(name) ;
lib $(name)
:
: <name>$(basename)
<runtime-link>shared:<link>shared
<runtime-link>static:<link>static
;
}
IMPORT $(__name__) : runtime-lib : : opmip.runtime-lib ;
#
# Check if the ODTONE project has been included
#
rule has-odtone ( )
{
return $(odtone-root) ;
}
IMPORT $(__name__) : has-odtone : : opmip.has-odtone ;
#
# Add alias for external usage
#
explicit-alias base : lib/opmip//opmip ;
#
# Build
#
install opmip-dist
: app/opmip-lma//opmip-lma
app/opmip-mag//opmip-mag
: <location>dist
;