source: nscp/Jamroot @ dcd5462

0.4.00.4.10.4.2stable
Last change on this file since dcd5462 was dcd5462, checked in by Michael Medin <michael@…>, 4 years ago

post 0.3.6 build (fixes the CheckDisk errors)

  • Property mode set to 100644
File size: 7.5 KB
Line 
1import feature : feature ;
2import modules ;
3import os ;
4import errors ;
5import stage ;
6import common ;
7import option ;
8
9include user-config.jam ;
10
11feature character-set : unicode ansi multibyte : composite ;
12feature.compose <character-set>unicode : <define>_UNICODE <define>UNICODE ;
13feature.compose <character-set>multibyte : <define>_MBCS ;
14
15
16local toolset = [ MATCH "^--toolset=(.*)" : [ modules.peek : ARGV ] ] ;
17toolset ?= msvc ;
18if $(toolset) = "msvc" {
19        import bjam/lua ;
20        import bjam/openssl ;
21        import bjam/boost ;
22        import bjam/cryptopp ;
23}
24import toolset : flags ;
25import notfile ;
26import bjam/zip ;
27
28local target = NSClient++ ;
29local target-config = nsc.ini ;
30local target-readme = readme.txt ;
31local target-changelog = changelog.txt ;
32local target-license = license.txt ;
33local target-counters = counters.defs ;
34
35ECHO "OS =" [ os.name ] ;
36ECHO "name =" $(__name__) ;
37
38# what kind of layout are we doing?
39layout = [ MATCH "^--layout=(.*)" : [ modules.peek : ARGV ] ] ;
40layout ?= versioned ;
41layout-$(layout) = true ;
42
43path-constant TOP : . ;
44
45# possible stage only location
46local stage-locate = [ MATCH "^--stagedir=(.*)" : [ modules.peek : ARGV ] ] ;
47stage-locate ?= stage ;
48path-constant BOOST_STAGE_LOCATE : $(stage-locate) ;
49
50if $(toolset) = "msvc" {
51        using bjam/openssl : : $(TOP)/lib-source/openssl-0.9.8g/include $(TOP)/lib ;
52        using bjam/boost : : $(TOP)/lib-source/boost_1_35_0 $(TOP)/lib ;
53        using bjam/lua : : $(TOP)/lib-source/LUA/src/lua-5.1.2 ;
54        using bjam/cryptopp : : $(TOP)/lib-source/"Crypto++"/src ;
55
56        if [ bjam/lua.isEnabled ] = true {
57                echo "LUA support enabled (disable with --without-lua)" ;
58                bjam/lua.printEnv ;
59        } else {
60                echo "LUA support DISABLED (enable with --with-lua)" ;
61        }
62
63        if [ bjam/openssl.isEnabled ] = true {
64                echo "SSL support enabled (disable with --without-openssl)" ;
65                bjam/openssl.printEnv ;
66        } else {
67                echo "SSL support DISABLED (enable with --with-openssl)" ;
68        }
69
70        if [ bjam/boost.isEnabled ] = true {
71                echo "boost found (disable with --without-boost)" ;
72                bjam/boost.printEnv ;
73        } else {
74                echo "boost not avaliable! some features DISABLED (for instance regular expressions) (enable with --with-boost)" ;
75        }
76
77        if [ bjam/cryptopp.isEnabled ] = true {
78                echo "Crypto++ found (disable with --without-cryptopp)" ;
79                bjam/cryptopp.printEnv ;
80        } else {
81                echo "cryptopp not avaliable! encryption (NSCA) DISABLED (enable with --with-cryptopp)" ;
82        }
83       
84        notfile update_version : @update_version ;
85        actions update_version
86        {
87                D:\source\tools\XAutobuild.exe -f $(TOP)
88        }
89       
90}
91
92
93
94project master
95        : requirements
96        <include>include
97        <find-static-library>advapi32
98        <find-static-library>user32
99        <find-static-library>shell32
100        <threading>multi
101        <link>shared
102        $(result)
103
104        : default-build debug
105
106        : build-dir bjam-tmp-build
107        ;
108
109make $(target).exe.manifest : NSClient++.manifest : common.copy ;
110explicit $(target).exe.manifest ;
111
112
113exe $(target)
114
115        : # sources
116        NSClient++.cpp
117        NSCPlugin.cpp
118        include/NSCHelper.cpp
119        include/arrayBuffer.cpp
120        include/ServiceCmd.cpp
121        include/Socket.cpp
122        include/b64/b64.c
123
124        : # requirements
125        <dependency>$(target).exe.manifest
126        #<runtime-link>static
127        <find-static-library>ws2_32
128        <find-static-library>Userenv
129        <find-static-library>ole32
130        <variant>release:<dependency>update_version
131        : # default build
132
133        : # usage requirements
134# depends $(target).manifest
135        ;
136explicit $(target) ;
137
138#
139# Copy various files
140#
141make $(target-config) : nsc.dist : common.copy ;
142explicit $(target-config) ;
143
144make $(target-readme) : files/readme.txt : common.copy ;
145explicit $(target-readme) ;
146
147make $(target-license) : files/license.txt : common.copy ;
148explicit $(target-license) ;
149
150make $(target-changelog) : changelog : common.copy ;
151explicit $(target-changelog) ;
152
153make $(target-counters) : files/counters.defs : common.copy ;
154explicit $(target-counters) ;
155
156all-modules =
157    [ MATCH .*modules/(.*)/.* : [ glob modules/*/Jamfile ] ]
158    ;
159
160# all-modules = NSCAAgent ;
161
162all-scripts =
163    [ MATCH .*scripts/(.+\\..*) : [ glob scripts/* ] ]
164    ;
165local all-scripts-lst ;
166if $(toolset) = "msvc" {
167        if ! ( [ bjam/lua.isEnabled ] = true ) {
168                echo "LUA support disabled skipping build of modules..." ;
169                local result ;
170                for local l in $(all-modules)
171                {
172                        if [ MATCH (.*LUA.*) : $(l) ]
173                        {
174                                echo "Not building module: $(l)" ;
175                        } else {
176                                result += $(l) ;
177                        }
178                }
179                all-modules = $(result) ;
180        }
181        for local l in $(all-modules)
182        {
183                alias $(l)
184                        : # sources
185                        modules/$(l)
186                        : # requirements
187                        : # default build
188                        : # usage requirements
189                        <dependency>$(target)
190                        ;
191                echo "Adding module: $(l)" ;
192                explicit $(l) ;
193        }
194        for local l in $(all-scripts)
195        {
196                #make scripts-$(l) : scripts/$(l) : common.copy ;
197                #explicit scripts/$(l) ;
198
199                #alias scripts-$(l) : scripts/$(l) ;
200                #explicit scripts-$(l) ;
201
202                all-scripts-lst = $(all-scripts-lst) scripts/$(l) ;
203
204                echo "Adding script: $(l)" ;
205        }
206        echo ">>>Done with: $(all-scripts-lst)" ;
207        echo $(all-scripts-lst) ;
208        echo "<<<Done with: $(all-scripts-lst)" ;
209}
210
211all-installers =
212    [ MATCH .*helpers/(.*)/.* : [ glob helpers/*installer/Jamfile ] ]
213    ;
214for local l in $(all-installers)
215{
216        alias $(l) : helpers/$(l) ;
217        echo "Adding installer target for: $(l)" ;
218        explicit $(l) ;
219}
220
221all-archive =
222    [ MATCH .*helpers/(.*)/.* : [ glob helpers/*archive/Jamfile ] ]
223    ;
224for local l in $(all-archive)
225{
226        alias $(l) : helpers/$(l) ;
227        echo "Adding archive target for: $(l)" ;
228        explicit $(l) ;
229}
230
231alias installer_dll : helpers/installer_dll ;
232explicit installer_dll ;
233
234all-helpers = installer_dll ;
235alias all-helpers-targets : $(all-helpers) ;
236explicit all-helpers-targets ;
237
238alias all-scripts-targets : $(all-scripts-lst) ;
239explicit all-scripts-targets ;
240
241alias all-root-targets : $(target) $(target-config) $(target-readme) $(target-license) $(target-changelog) $(target-counters) helpers/systray_helper ;
242explicit all-root-targets ;
243
244alias all-modules-targets : $(all-modules) ;
245explicit all-modules-targets ;
246alias all-installer-targets : $(all-installers) ;
247explicit all-installer-targets ;
248alias all-archive-targets : $(all-archive) ;
249explicit all-archive-targets ;
250
251rule get-root-prefix ( properties * )
252{
253    if <architecture>ia64 in $(properties) {
254                return IA64 ;
255        } else {
256                if <address-model>64 in $(properties) { return x64 ; }
257                else { return Win32 ; }
258        }
259}
260rule generate-binary-location ( properties * )
261{
262        local tag = [ get-root-prefix $(properties) ] ;
263        return <location>$(BOOST_STAGE_LOCATE)/$(tag)/binaries ;
264}
265rule generate-helper-location ( properties * )
266{
267        local tag = [ get-root-prefix $(properties) ] ;
268        return <location>$(BOOST_STAGE_LOCATE)/$(tag)/helpers ;
269}
270rule generate-scripts-location ( properties * )
271{
272        local tag = [ get-root-prefix $(properties) ] ;
273        return <location>$(BOOST_STAGE_LOCATE)/$(tag)/binaries/scripts ;
274}
275rule generate-module-location ( properties * )
276{
277        local tag = [ get-root-prefix $(properties) ] ;
278        return <location>$(BOOST_STAGE_LOCATE)/$(tag)/binaries/modules ;
279}
280
281install dist : all-root-targets : <conditional>@generate-binary-location ;
282explicit dist ;
283
284install dist-modules : all-modules-targets : <conditional>@generate-module-location ;
285explicit dist-modules ;
286
287install dist-helpers : all-helpers-targets : <conditional>@generate-helper-location ;
288explicit dist-helpers ;
289
290install dist-scripts : all-scripts-targets : <conditional>@generate-scripts-location ;
291explicit dist-scripts ;
292
293
294
295alias build-binaries : dist dist-modules dist-helpers dist-scripts ;
296explicit build-binaries ;
297
298
299alias build-archives : all-archive-targets : <location>$(BOOST_STAGE_LOCATE)/archive ;
300explicit build-archives ;
301
302
303alias build-installer : all-installer-targets : <location>$(BOOST_STAGE_LOCATE)/installer ;
304explicit build-installer ;
305
306
307
Note: See TracBrowser for help on using the repository browser.