Skip to content

Commit

Permalink
Build: added definitions for building Rebol as a shared library and o…
Browse files Browse the repository at this point in the history
…r host application linked to this library
  • Loading branch information
Oldes committed Mar 22, 2021
1 parent 5551300 commit 87abe3f
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions make/rebol3.nest
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,27 @@ make-exe: [
make-x86-exe: [:arch-x86 :make-exe #if Windows? [target: x86-win32]]
make-x64-exe: [:arch-x64 :make-exe #if Windows? [target: x64-win32]]

; for making Rebol as a shared library
make-dll: [
:common
;:common-host
defines: [REB_API]
flags: [-O2 shared]
do %make/pre-make.r3 "$NEST_SPEC"
]
make-x86-dll: [:arch-x86 :make-dll #if Windows? [target: x86-win32]]
make-x64-dll: [:arch-x64 :make-dll #if Windows? [target: x64-win32]]

; for testing host app using shared library
make-host: [
:common
files: none ;includes only host files
:common-host
do %make/pre-make.r3 "$NEST_SPEC"
]
make-x86-host: [:arch-x86 :make-host #if Windows? [target: x86-win32]]
make-x64-host: [:arch-x64 :make-host #if Windows? [target: x64-win32]]

eggs: [
#if Windows? [
; "Pre-make (minimum included)" [
Expand Down Expand Up @@ -704,6 +725,39 @@ eggs: [
:include-rebol-bulk
:make-x64-exe
]

"Rebol/Core x86-win32 shared library (gcc)" [
name: %lib-rebol3-core-x86-gcc
product: Core
compiler: gcc
upx: off ; library compiled using MSVC seems to make problems when UPXed
:include-rebol-core
:make-x86-dll
]
"Rebol/Core x86-win32 host application (gcc)" [
name: %host-core-x86-gcc
product: Core
compiler: gcc
:include-rebol-core
:make-x86-host
shared: %lib-rebol3-core-x86-gcc
]

"Rebol/Core x64-win32 shared library (gcc)" [
name: %lib-rebol3-core-x64-gcc
product: Core
compiler: gcc
:include-rebol-core
:make-x64-dll
]
"Rebol/Core x64-win32 host application (gcc)" [
name: %host-core-x64-gcc
product: Core
compiler: gcc
:include-rebol-core
:make-x64-host
shared: %lib-rebol3-core-x64-gcc
]
]
#if Linux? [
"Rebol/Base x64-libc (gcc)" [
Expand Down

0 comments on commit 87abe3f

Please sign in to comment.