2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 12:22:17 +00:00

Build with Cygwin

[SVN r16000]
This commit is contained in:
Dave Abrahams
2002-10-28 04:22:14 +00:00
parent d253b835f8
commit 529eb07620
2 changed files with 21 additions and 8 deletions

11
gcc.jam
View File

@@ -1,7 +1,8 @@
import property ;
import generators ;
import os ;
generators.register-composing gcc.link : LIB OBJ : EXE : <toolset>gcc ;
generators.register-composing gcc.archive : OBJ : STATIC-LIB : <toolset>gcc ;
generators.register-composing gcc.link-dll : OBJ : SHARED-LIB : <toolset>gcc ;
@@ -43,6 +44,7 @@ local rule link-options ( target : sources * : property-set * )
{
local options ;
local libs ;
local findlibs ;
for local p in $(property-set)
{
if $(p) = <debug-symbols>on
@@ -55,7 +57,7 @@ local rule link-options ( target : sources * : property-set * )
}
else if $(p:G) = <find-library>
{
options += -l$(p:G=) ;
findlibs += -l$(p:G=) ;
}
else if $(p:G) = <library>
{
@@ -65,6 +67,7 @@ local rule link-options ( target : sources * : property-set * )
OPTIONS on $(target) = $(options) ;
LIBS on $(target) = $(libs) ;
FINDLIBS on $(target) = $(findlibs) ;
}
rule link ( target : sources * : property-set * )
@@ -74,7 +77,7 @@ rule link ( target : sources * : property-set * )
actions link bind LIBS
{
g++ $(OPTIONS) -o $(<) $(>) $(LIBS)
g++ $(OPTIONS) -o $(<) $(>) $(LIBS) $(FINDLIBS)
}
rule archive ( target : sources * : property-set * )
@@ -93,5 +96,5 @@ rule link-dll ( target : sources * : property-set * )
actions link-dll bind LIBS
{
g++ $(OPTIONS) -o $(<) -Wl,-soname,$(<[1]:D=) -shared $(>) $(LIBS)
g++ $(OPTIONS) -o $(<) -Wl,-soname,$(<[1]:D=) -shared $(>) $(LIBS) $(FINDLIBS)
}

View File

@@ -99,19 +99,29 @@ IMPORT $(__name__) : variant : : variant ;
variant debug : <optimization>off <debug-symbols>on ;
variant release : <optimization>on <debug-symbols>off ;
type.register LIB : : : main ;
if [ os.name ] in NT CYGWIN
{
type.register EXE : exe : : main ;
type.register SHARED-LIB : dll : LIB : main ;
if [ os.name ] = CYGWIN
{
type.register STATIC-LIB : a : LIB : main ;
}
else
{
type.register STATIC-LIB : lib : LIB : main ;
}
}
else
{
type.register EXE : : : main ;
type.register SHARED-LIB : so : LIB : main ;
type.register STATIC-LIB : a : LIB : main ;
}
type.register LIB : : : main ;
type.register STATIC-LIB : a : LIB : main ;
type.register SHARED-LIB : so : LIB : main ;
type.register CPP : cpp cxx ;
rule c-scanner ( includes * )