2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-20 14:42:14 +00:00
Files
build/test/generators-test/gcc.jam
2002-08-16 14:25:22 +00:00

53 lines
855 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 $(<) $(>)
}
rule archive ( target : sources * : property-set * )
{
}
actions archive
{
ar ur $(<) $(>)
}