Skip to content

Commit aa70ed9

Browse files
committed
FEAT: added FreeBSD support
1 parent 734edab commit aa70ed9

File tree

1 file changed

+64
-22
lines changed

1 file changed

+64
-22
lines changed

make/rebol3.nest

+64-22
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ target-linux: [
4242
target-openbsd: [
4343
os: openbsd
4444
sys: openbsd
45-
vendor: unknown
45+
platform: OpenBSD
46+
vendor: pc
47+
compiler: clang
48+
]
49+
50+
target-freebsd: [
51+
os: freebsd
52+
sys: freebsd
53+
platform: FreeBSD
54+
vendor: pc
4655
compiler: clang
4756
]
4857

@@ -377,16 +386,10 @@ include-image-codecs: [
377386
#if Windows? [
378387
:include-image-os-codec
379388
]
380-
#if Linux? [
381-
:include-native-bmp-codec
382-
:include-native-png-codec
383-
:include-native-jpg-codec
384-
:include-native-gif-codec
385-
]
386389
#if MacOS? [
387390
:include-image-os-codec
388391
]
389-
#if OpenBSD? [
392+
#if (any [Linux? OpenBSD? FreeBSD?]) [
390393
:include-native-bmp-codec
391394
:include-native-png-codec
392395
:include-native-jpg-codec
@@ -442,10 +445,10 @@ include-iconv: [
442445
#if macOS? [
443446
library: %iconv
444447
]
445-
#if OpenBSD? [
448+
#if (any [OpenBSD? FreeBSD?]) [
449+
include: %/usr/local/include
450+
library: %/usr/local/lib/
446451
library: %iconv
447-
cflags: "-I/usr/local/include"
448-
lflag: "-L/usr/local/lib"
449452
]
450453
]
451454

@@ -683,11 +686,7 @@ common: [
683686
cflags: -Wno-pointer-sign
684687
flag: -mmacosx-version-min=10.9
685688
]
686-
#if Linux? [
687-
library: %m
688-
defines: ENDIAN_LITTLE
689-
]
690-
#if OpenBSD? [
689+
#if (any [Linux? OpenBSD? FreeBSD?]) [
691690
library: %m
692691
defines: ENDIAN_LITTLE
693692
]
@@ -702,12 +701,8 @@ common-host: [
702701
resource: %make/r3.rc
703702
]
704703
;#if Posix []
705-
#if Linux? [
706-
; flag: -fvisibility=hidden
707-
flag: -fPIC ; position independent (used for libs)
708-
]
709-
#if OpenBSD? [
710-
flag: -fPIC ; position independent (used for libs)
704+
#if (any [Linux? OpenBSD? FreeBSD?]) [
705+
flag: -fPIC ; position independent (used for libs)
711706
]
712707
]
713708

@@ -731,6 +726,9 @@ arch-x64: [
731726
#if OpenBSD? [
732727
defines: TO_OPENBSD
733728
]
729+
#if FreeBSD? [
730+
defines: TO_FREEBSD
731+
]
734732
]
735733
arch-x86: [
736734
arch: x86
@@ -745,6 +743,9 @@ arch-x86: [
745743
#if OpenBSD? [
746744
defines: TO_OPENBSD
747745
]
746+
#if FreeBSD? [
747+
defines: TO_FREEBSD
748+
]
748749
]
749750
arch-arm64: [
750751
:arch-x64
@@ -1003,6 +1004,39 @@ eggs: [
10031004
:make-x64-host
10041005
]
10051006
]
1007+
#if FreeBSD? [
1008+
"Rebol/Base freebsd-x64" [
1009+
name: %rebol3-base-freebsd-x64
1010+
:target-freebsd
1011+
:make-x64-exe
1012+
]
1013+
"Rebol/Core freebsd-x64" [
1014+
name: %rebol3-core-freebsd-x64
1015+
:target-freebsd
1016+
:include-rebol-core
1017+
:make-x64-exe
1018+
]
1019+
"Rebol/Bulk freebsd-x64" [
1020+
name: %rebol3-bulk-freebsd-x64
1021+
:target-freebsd
1022+
:include-rebol-bulk
1023+
:make-x64-exe
1024+
]
1025+
1026+
"Rebol/Core freebsd-x64 shared library" [
1027+
name: %lib-rebol3-core-freebsd-x64
1028+
:target-freebsd
1029+
:include-rebol-core
1030+
:make-x64-dll
1031+
]
1032+
"Rebol/Core freebsd-x64 host application" [
1033+
name: %host-core-freebsd-x64
1034+
shared: %lib-rebol3-core-freebsd-x64
1035+
:target-freebsd
1036+
:include-rebol-core
1037+
:make-x64-host
1038+
]
1039+
]
10061040
"Test extension 32bit" [
10071041
name: %test-x86.rebx
10081042
files: only %tests/extension/test.c
@@ -1020,6 +1054,10 @@ eggs: [
10201054
flag: -fPIC
10211055
:target-openbsd
10221056
]
1057+
#if FreeBSD? [
1058+
flag: -fPIC
1059+
:target-freebsd
1060+
]
10231061
]
10241062
"Test extension 64bit" [
10251063
name: %test-x64.rebx
@@ -1037,5 +1075,9 @@ eggs: [
10371075
flag: -fPIC
10381076
:target-openbsd
10391077
]
1078+
#if FreeBSD? [
1079+
flag: -fPIC
1080+
:target-freebsd
1081+
]
10401082
]
10411083
]

0 commit comments

Comments
 (0)