2
0
mirror of https://github.com/boostorg/build.git synced 2026-01-25 06:02:12 +00:00
Files
build/example/make/gcc.jam
Vladimir Prus 1484ad7ec4 Added an V2 example.
[SVN r14833]
2002-08-14 11:45:35 +00:00

45 lines
759 B
Plaintext

import property ;
rule compile ( target : sources * : property-set * )
{
local options ;
for local p in $(property-set)
{
if $(p) = <optimization>on
{
options += -O2 ;
}
else if $(p) = <debug-symbols>on
{
options += -g ;
}
else if $(p:G) = <define>
{
options += -D$(p:G=) ;
}
}
OPTIONS on $(target) = $(options) ;
}
actions compile
{
g++ $(OPTIONS) -c -o $(<) $(>)
}
rule link ( target : sources * : property-set * )
{
local options ;
if <debug-symbols>on in $(property-set)
{
options += -g ;
}
OPTIONS on $(target) = $(options) ;
}
actions link
{
g++ $(OPTIONS) -o $(<) $(>)
}