version 1.58, 2008/12/26 17:29:52
|
version 1.59, 2009/10/03 21:33:48
|
Line 219 end-struct list%
|
Line 219 end-struct list%
|
node list-next @ |
node list-next @ |
repeat ; |
repeat ; |
|
|
\ linked libraries |
2variable c-libs \ library names in a string (without "lib") |
|
|
list% |
|
cell% 2* field c-lib-string |
|
end-struct c-lib% |
|
|
|
variable c-libs \ linked list of library names (without "lib") |
|
|
|
: add-lib ( c-addr u -- ) \ gforth |
: add-lib ( c-addr u -- ) \ gforth |
\G Add library lib@i{string} to the list of libraries, where |
\G Add library lib@i{string} to the list of libraries, where |
\G @i{string} is represented by @i{c-addr u}. |
\G @i{string} is represented by @i{c-addr u}. |
c-lib% %size allocate throw dup >r |
c-libs 2@ d0= IF 0 allocate throw 0 c-libs 2! THEN |
c-lib-string 2! |
c-libs 2@ s" -l" append 2swap append c-libs 2! ; |
r> c-libs list-insert ; |
|
|
: add-libpath ( c-addr u -- ) \ gforth |
: append-l ( c-addr1 u1 node -- c-addr2 u2 ) |
\G Add path @i{string} to the list of library search pathes, where |
\ append " -l<nodelib>" to string1 |
\G @i{string} is represented by @i{c-addr u}. |
>r s" -l" append r> c-lib-string 2@ append ; |
c-libs 2@ d0= IF 0 allocate throw 0 c-libs 2! THEN |
|
c-libs 2@ s" -L" append 2swap append c-libs 2! ; |
|
|
\ C prefix lines |
\ C prefix lines |
|
|
Line 568 DEFER compile-wrapper-function ( -- )
|
Line 563 DEFER compile-wrapper-function ( -- )
|
lib-filename 2@ dirname replace-rpath s+ s" " append |
lib-filename 2@ dirname replace-rpath s+ s" " append |
lib-filename 2@ append s" .lo -o " append |
lib-filename 2@ append s" .lo -o " append |
lib-filename 2@ append s" .la" append ( c-addr u ) |
lib-filename 2@ append s" .la" append ( c-addr u ) |
c-libs @ ['] append-l list-map |
c-libs 2@ append |
\ 2dup type cr |
\ 2dup type cr |
2dup system drop free throw $? abort" libtool link failed" |
2dup system drop free throw $? abort" libtool link failed" |
open-wrappers dup 0= if |
open-wrappers dup 0= if |
Line 622 DEFER compile-wrapper-function ( -- )
|
Line 617 DEFER compile-wrapper-function ( -- )
|
c-source-file-id @ if |
c-source-file-id @ if |
compile-wrapper-function |
compile-wrapper-function |
endif |
endif |
0 c-libs ! ; |
0. c-libs 2! ; |
clear-libs |
clear-libs |
|
|
: c-library-incomplete ( -- ) |
: c-library-incomplete ( -- ) |