-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRebol-MathPresso.nest
155 lines (136 loc) · 4.45 KB
/
Rebol-MathPresso.nest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
;- .-.
;- /'v'\ SISKIN-Builder 3.9.0 project file
;- (/uOu\) https://github.com/Siskin-framework/Builder/
;-===="="=======================================================================
github: @asmjit
github: @mathpresso
compiler: gcc
needs: cmake
version: 0.1.0
;define: USE_TRACES
#if Windows? [ define: TO_WINDOWS define: _CRT_SECURE_NO_WARNINGS upx: on needs: msbuild]
#if macOS? [ define: TO_OSX define: HAS_BOOL]
#if Linux? [ define: TO_LINUX ]
#if macOS? [
sign: on
entitlements: %Entitlements.plist
define: DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING
]
;#if Posix? [
; cppflag: "-std=c++11"
; lflag: "-lstdc++"
;]
target-x86: [
arch: x86
#if Windows? [ defines: [ TO_WIN32 _WIN32 ] ]
#if Linux? [ defines: [ TO_LINUX_X86 ] ]
]
target-x64: [
arch: x64
defines: [
_FILE_OFFSET_BITS=64
__LP64__ ; has long (integer) 64 bits
]
#if Windows? [ defines: [ TO_WIN32_X64 _WIN32 ] ]
#if Linux? [ defines: [ TO_LINUX_X64 ] ]
#if macOS? [ defines: [ TO_OSX_X64 ] flags: ["-arch x86_64"] ]
]
target-arm64: [
arch: arm64
;flags: ["-arch arm64"]
flags: "-target arm64-apple-darwin"
define: _FILE_OFFSET_BITS=64
define: __LP64__ ; has long (integer) 64 bits
define: __arm64__
define: TO_OSX_X64
]
;----------------------------------------------------------------
r3-extension: [
optimize: 3
source: %src/
include: %mathpresso/src/mathpresso/
files: only [
%mathpresso-rebol-extension.c
%mathpresso-commands-table.c
%mathpresso-command.cpp
]
defines: ENDIAN_LITTLE
defines: MATHPRESSO_STATIC
;cppflags: [fpermissive]
flags: shared
#if Posix? [
cflags: [-fPIC -pthread ]
libraries: [%pthread]
]
#if Windows? [
upx: on
]
;- generate main extension header --------------------------------
do %src/mathpresso-rebol-extension.r3
]
eggs: [
#if Windows? [
"Make MathPresso static library (cmake) - x86" [
name: %static-lib-x86
arch: x86
cmd %build/_static_x86/ "cmake ../../mathpresso/ -A Win32 -DMATHPRESSO_STATIC=1 -DMATHPRESSO_TEST=0 -DCMAKE_BUILD_TYPE=Release"
cmd %build/_static_x86/ {msbuild mathpresso.sln /p:Configuration=Release /p:Platform=Win32}
]
"Make MathPresso static library (cmake) - x64" [
name: %static-lib-x64
arch: x64
cmd %build/_static_x64/ "cmake ../../mathpresso/ -DMATHPRESSO_STATIC=1 -DMATHPRESSO_TEST=0 -DCMAKE_BUILD_TYPE=Release"
cmd %build/_static_x64/ {msbuild mathpresso.sln /p:Configuration=Release /p:Platform=x64}
]
"Rebol/MathPresso extension - x86" [
name: %mathpresso-windows-x86
:r3-extension
:target-x86
libraries: [%build/_static_x86/Release/mathpresso]
]
"Rebol/MathPresso extension - x64" [
name: %mathpresso-windows-x64
:r3-extension
:target-x64
libraries: [%build/_static_x64/Release/mathpresso]
]
]
#if macOS? [
"Make MathPresso static library (cmake) - x64" [
name: %static-lib-x64
arch: x64
cmd %build/_static_x64/ "cmake ../../mathpresso/ -DMATHPRESSO_STATIC=1 -DMATHPRESSO_TEST=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_OSX_SYSROOT=macosx -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"
cmd %build/_static_x64/ {cmake --build .}
]
;@@ Note: AsmJit now works only on X86 and X64 architectures
;"Make Mathpresso static library (cmake) - arm64" [
; arch: arm64
; cmd %_static_arm64/ {cmake ../mathpresso/ -DMATHPRESSO_STATIC=1 -DMATHPRESSO_TEST=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_OSX_SYSROOT=macosx -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF }
; cmd %_static_arm64/ {cmake --build .}
;]
"Rebol/MathPresso extension - x64" [
name: %mathpresso-macos-x64
:r3-extension
:target-x64
compiler: clang
lflags: [-dynamiclib]
flag: -mmacosx-version-min=10.9
libraries: [%stdc++ %build/_static_x64/ %mathpresso]
]
]
#if Linux? [
"Make 64bit MathPresso static library" [
name: %static-lib-x64
arch: x64
cmd %build/_static_linux/ "cmake ../../mathpresso/ -DMATHPRESSO_STATIC=1 -DMATHPRESSO_TEST=0 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release"
cmd %build/_static_linux/ {cmake --build .}
]
"Rebol/MathPresso 64bit extension" [
name: %mathpresso-linux-x64
:r3-extension
:target-x64
compiler: clang
libraries: [%stdc++ %build/_static_linux/ %mathpresso]
]
]
]