ffi 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +51 -1
- data/Rakefile +47 -28
- data/ext/ffi_c/AbstractMemory.c +149 -65
- data/ext/ffi_c/AbstractMemory.h +34 -4
- data/ext/ffi_c/AutoPointer.c +15 -18
- data/ext/ffi_c/AutoPointer.h +2 -2
- data/ext/ffi_c/Buffer.c +79 -44
- data/ext/ffi_c/Callback.c +133 -62
- data/ext/ffi_c/Callback.h +11 -5
- data/ext/ffi_c/{NativeLibrary.c → DynamicLibrary.c} +88 -24
- data/ext/ffi_c/{NativeLibrary.h → DynamicLibrary.h} +1 -1
- data/ext/ffi_c/Invoker.c +154 -190
- data/ext/ffi_c/LastError.c +135 -0
- data/ext/ffi_c/LastError.h +18 -0
- data/ext/ffi_c/MemoryPointer.c +30 -20
- data/ext/ffi_c/MemoryPointer.h +3 -3
- data/ext/ffi_c/NullPointer.c +67 -28
- data/ext/ffi_c/Platform.c +9 -10
- data/ext/ffi_c/Platform.h +1 -1
- data/ext/ffi_c/Pointer.c +67 -30
- data/ext/ffi_c/Pointer.h +8 -6
- data/ext/ffi_c/Struct.c +202 -267
- data/ext/ffi_c/Struct.h +2 -2
- data/ext/ffi_c/Type.c +230 -0
- data/ext/ffi_c/Type.h +28 -0
- data/ext/ffi_c/Types.c +48 -6
- data/ext/ffi_c/Types.h +8 -2
- data/ext/ffi_c/endian.h +40 -0
- data/ext/ffi_c/extconf.rb +6 -5
- data/ext/ffi_c/ffi.c +21 -44
- data/ext/ffi_c/libffi.bsd.mk +34 -0
- data/ext/ffi_c/libffi.darwin.mk +30 -10
- data/ext/ffi_c/libffi.gnu.mk +29 -0
- data/ext/ffi_c/libffi.mk +4 -2
- data/ext/ffi_c/rbffi.h +6 -8
- data/gen/Rakefile +12 -0
- data/lib/ffi/autopointer.rb +1 -1
- data/lib/ffi/enum.rb +78 -0
- data/lib/ffi/ffi.rb +5 -6
- data/lib/ffi/io.rb +15 -1
- data/lib/ffi/library.rb +79 -18
- data/lib/ffi/pointer.rb +2 -2
- data/lib/ffi/struct.rb +68 -14
- data/lib/ffi/types.rb +6 -3
- data/lib/ffi/variadic.rb +2 -2
- data/lib/ffi.rb +10 -1
- data/spec/ffi/bool_spec.rb +24 -0
- data/spec/ffi/callback_spec.rb +217 -17
- data/spec/ffi/enum_spec.rb +164 -0
- data/spec/ffi/managed_struct_spec.rb +6 -1
- data/spec/ffi/number_spec.rb +30 -0
- data/spec/ffi/pointer_spec.rb +33 -8
- data/spec/ffi/rbx/memory_pointer_spec.rb +0 -6
- data/spec/ffi/spec_helper.rb +5 -1
- data/spec/ffi/string_spec.rb +65 -4
- data/spec/ffi/struct_callback_spec.rb +41 -0
- data/spec/ffi/struct_initialize_spec.rb +30 -0
- data/spec/ffi/struct_spec.rb +44 -21
- metadata +31 -69
- data/ext/ffi_c/ffi.mk +0 -23
- data/nbproject/Makefile-Default.mk +0 -57
- data/nbproject/Makefile-impl.mk +0 -123
- data/nbproject/Package-Default.bash +0 -72
- data/nbproject/configurations.xml +0 -293
- data/nbproject/private/configurations.xml +0 -22
- data/nbproject/private/private.xml +0 -7
- data/nbproject/project.properties +0 -0
- data/nbproject/project.xml +0 -15
- data/samples/getlogin.rb +0 -7
- data/samples/getpid.rb +0 -7
- data/samples/gettimeofday.rb +0 -17
- data/samples/hello.rb +0 -6
- data/samples/inotify.rb +0 -59
- data/samples/pty.rb +0 -75
- data/samples/qsort.rb +0 -20
- data/samples/sample_helper.rb +0 -6
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ffi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Wayne Meissner
|
|
@@ -9,34 +9,28 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-08-05 00:00:00 +02:00
|
|
13
13
|
default_executable:
|
|
14
|
-
dependencies:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- !ruby/object:Gem::Version
|
|
23
|
-
version: 2.4.2
|
|
24
|
-
version:
|
|
25
|
-
description: A Ruby foreign function interface
|
|
14
|
+
dependencies: []
|
|
15
|
+
|
|
16
|
+
description: |-
|
|
17
|
+
Ruby-FFI is a ruby extension for programmatically loading dynamic
|
|
18
|
+
libraries, binding functions within them, and calling those functions
|
|
19
|
+
from Ruby code. Moreover, a Ruby-FFI extension works without changes
|
|
20
|
+
on Ruby and JRuby. Discover why should you write your next extension
|
|
21
|
+
using Ruby-FFI {here}[http://kenai.com/projects/ruby-ffi/pages/WhyUseFFI].
|
|
26
22
|
email: wmeissner@gmail.com
|
|
27
23
|
executables: []
|
|
28
24
|
|
|
29
25
|
extensions:
|
|
30
26
|
- ext/ffi_c/extconf.rb
|
|
27
|
+
- gen/Rakefile
|
|
31
28
|
extra_rdoc_files:
|
|
32
29
|
- README.rdoc
|
|
33
|
-
- lib/ffi
|
|
34
|
-
- lib/ffi/tools
|
|
35
30
|
files:
|
|
36
31
|
- LICENSE
|
|
37
32
|
- README.rdoc
|
|
38
33
|
- Rakefile
|
|
39
|
-
- ext/ffi_c
|
|
40
34
|
- ext/ffi_c/AbstractMemory.c
|
|
41
35
|
- ext/ffi_c/AbstractMemory.h
|
|
42
36
|
- ext/ffi_c/AutoPointer.c
|
|
@@ -44,11 +38,13 @@ files:
|
|
|
44
38
|
- ext/ffi_c/Buffer.c
|
|
45
39
|
- ext/ffi_c/Callback.c
|
|
46
40
|
- ext/ffi_c/Callback.h
|
|
41
|
+
- ext/ffi_c/DynamicLibrary.c
|
|
42
|
+
- ext/ffi_c/DynamicLibrary.h
|
|
47
43
|
- ext/ffi_c/Invoker.c
|
|
44
|
+
- ext/ffi_c/LastError.c
|
|
45
|
+
- ext/ffi_c/LastError.h
|
|
48
46
|
- ext/ffi_c/MemoryPointer.c
|
|
49
47
|
- ext/ffi_c/MemoryPointer.h
|
|
50
|
-
- ext/ffi_c/NativeLibrary.c
|
|
51
|
-
- ext/ffi_c/NativeLibrary.h
|
|
52
48
|
- ext/ffi_c/NullPointer.c
|
|
53
49
|
- ext/ffi_c/Platform.c
|
|
54
50
|
- ext/ffi_c/Platform.h
|
|
@@ -56,14 +52,17 @@ files:
|
|
|
56
52
|
- ext/ffi_c/Pointer.h
|
|
57
53
|
- ext/ffi_c/Struct.c
|
|
58
54
|
- ext/ffi_c/Struct.h
|
|
55
|
+
- ext/ffi_c/Type.c
|
|
56
|
+
- ext/ffi_c/Type.h
|
|
59
57
|
- ext/ffi_c/Types.c
|
|
60
58
|
- ext/ffi_c/Types.h
|
|
61
59
|
- ext/ffi_c/compat.h
|
|
60
|
+
- ext/ffi_c/endian.h
|
|
62
61
|
- ext/ffi_c/extconf.rb
|
|
63
62
|
- ext/ffi_c/ffi.c
|
|
64
|
-
- ext/ffi_c/
|
|
65
|
-
- ext/ffi_c/libffi
|
|
63
|
+
- ext/ffi_c/libffi.bsd.mk
|
|
66
64
|
- ext/ffi_c/libffi.darwin.mk
|
|
65
|
+
- ext/ffi_c/libffi.gnu.mk
|
|
67
66
|
- ext/ffi_c/libffi.mk
|
|
68
67
|
- ext/ffi_c/libffi/ChangeLog
|
|
69
68
|
- ext/ffi_c/libffi/ChangeLog.libffi
|
|
@@ -83,13 +82,11 @@ files:
|
|
|
83
82
|
- ext/ffi_c/libffi/configure.ac
|
|
84
83
|
- ext/ffi_c/libffi/configure.host
|
|
85
84
|
- ext/ffi_c/libffi/depcomp
|
|
86
|
-
- ext/ffi_c/libffi/doc
|
|
87
85
|
- ext/ffi_c/libffi/doc/libffi.info
|
|
88
86
|
- ext/ffi_c/libffi/doc/libffi.texi
|
|
89
87
|
- ext/ffi_c/libffi/doc/stamp-vti
|
|
90
88
|
- ext/ffi_c/libffi/doc/version.texi
|
|
91
89
|
- ext/ffi_c/libffi/fficonfig.h.in
|
|
92
|
-
- ext/ffi_c/libffi/include
|
|
93
90
|
- ext/ffi_c/libffi/include/Makefile.am
|
|
94
91
|
- ext/ffi_c/libffi/include/Makefile.in
|
|
95
92
|
- ext/ffi_c/libffi/include/ffi.h.in
|
|
@@ -102,7 +99,6 @@ files:
|
|
|
102
99
|
- ext/ffi_c/libffi/ltcf-gcj.sh
|
|
103
100
|
- ext/ffi_c/libffi/ltconfig
|
|
104
101
|
- ext/ffi_c/libffi/ltmain.sh
|
|
105
|
-
- ext/ffi_c/libffi/man
|
|
106
102
|
- ext/ffi_c/libffi/man/Makefile.am
|
|
107
103
|
- ext/ffi_c/libffi/man/Makefile.in
|
|
108
104
|
- ext/ffi_c/libffi/man/ffi.3
|
|
@@ -111,51 +107,40 @@ files:
|
|
|
111
107
|
- ext/ffi_c/libffi/mdate-sh
|
|
112
108
|
- ext/ffi_c/libffi/missing
|
|
113
109
|
- ext/ffi_c/libffi/mkinstalldirs
|
|
114
|
-
- ext/ffi_c/libffi/src
|
|
115
|
-
- ext/ffi_c/libffi/src/alpha
|
|
116
110
|
- ext/ffi_c/libffi/src/alpha/ffi.c
|
|
117
111
|
- ext/ffi_c/libffi/src/alpha/ffitarget.h
|
|
118
112
|
- ext/ffi_c/libffi/src/alpha/osf.S
|
|
119
|
-
- ext/ffi_c/libffi/src/arm
|
|
120
113
|
- ext/ffi_c/libffi/src/arm/ffi.c
|
|
121
114
|
- ext/ffi_c/libffi/src/arm/ffitarget.h
|
|
122
115
|
- ext/ffi_c/libffi/src/arm/sysv.S
|
|
123
116
|
- ext/ffi_c/libffi/src/closures.c
|
|
124
|
-
- ext/ffi_c/libffi/src/cris
|
|
125
117
|
- ext/ffi_c/libffi/src/cris/ffi.c
|
|
126
118
|
- ext/ffi_c/libffi/src/cris/ffitarget.h
|
|
127
119
|
- ext/ffi_c/libffi/src/cris/sysv.S
|
|
128
120
|
- ext/ffi_c/libffi/src/debug.c
|
|
129
121
|
- ext/ffi_c/libffi/src/dlmalloc.c
|
|
130
|
-
- ext/ffi_c/libffi/src/frv
|
|
131
122
|
- ext/ffi_c/libffi/src/frv/eabi.S
|
|
132
123
|
- ext/ffi_c/libffi/src/frv/ffi.c
|
|
133
124
|
- ext/ffi_c/libffi/src/frv/ffitarget.h
|
|
134
|
-
- ext/ffi_c/libffi/src/ia64
|
|
135
125
|
- ext/ffi_c/libffi/src/ia64/ffi.c
|
|
136
126
|
- ext/ffi_c/libffi/src/ia64/ffitarget.h
|
|
137
127
|
- ext/ffi_c/libffi/src/ia64/ia64_flags.h
|
|
138
128
|
- ext/ffi_c/libffi/src/ia64/unix.S
|
|
139
129
|
- ext/ffi_c/libffi/src/java_raw_api.c
|
|
140
|
-
- ext/ffi_c/libffi/src/m32r
|
|
141
130
|
- ext/ffi_c/libffi/src/m32r/ffi.c
|
|
142
131
|
- ext/ffi_c/libffi/src/m32r/ffitarget.h
|
|
143
132
|
- ext/ffi_c/libffi/src/m32r/sysv.S
|
|
144
|
-
- ext/ffi_c/libffi/src/m68k
|
|
145
133
|
- ext/ffi_c/libffi/src/m68k/ffi.c
|
|
146
134
|
- ext/ffi_c/libffi/src/m68k/ffitarget.h
|
|
147
135
|
- ext/ffi_c/libffi/src/m68k/sysv.S
|
|
148
|
-
- ext/ffi_c/libffi/src/mips
|
|
149
136
|
- ext/ffi_c/libffi/src/mips/ffi.c
|
|
150
137
|
- ext/ffi_c/libffi/src/mips/ffitarget.h
|
|
151
138
|
- ext/ffi_c/libffi/src/mips/n32.S
|
|
152
139
|
- ext/ffi_c/libffi/src/mips/o32.S
|
|
153
|
-
- ext/ffi_c/libffi/src/pa
|
|
154
140
|
- ext/ffi_c/libffi/src/pa/ffi.c
|
|
155
141
|
- ext/ffi_c/libffi/src/pa/ffitarget.h
|
|
156
142
|
- ext/ffi_c/libffi/src/pa/hpux32.S
|
|
157
143
|
- ext/ffi_c/libffi/src/pa/linux.S
|
|
158
|
-
- ext/ffi_c/libffi/src/powerpc
|
|
159
144
|
- ext/ffi_c/libffi/src/powerpc/aix.S
|
|
160
145
|
- ext/ffi_c/libffi/src/powerpc/aix_closure.S
|
|
161
146
|
- ext/ffi_c/libffi/src/powerpc/asm.h
|
|
@@ -170,25 +155,20 @@ files:
|
|
|
170
155
|
- ext/ffi_c/libffi/src/powerpc/sysv.S
|
|
171
156
|
- ext/ffi_c/libffi/src/prep_cif.c
|
|
172
157
|
- ext/ffi_c/libffi/src/raw_api.c
|
|
173
|
-
- ext/ffi_c/libffi/src/s390
|
|
174
158
|
- ext/ffi_c/libffi/src/s390/ffi.c
|
|
175
159
|
- ext/ffi_c/libffi/src/s390/ffitarget.h
|
|
176
160
|
- ext/ffi_c/libffi/src/s390/sysv.S
|
|
177
|
-
- ext/ffi_c/libffi/src/sh
|
|
178
161
|
- ext/ffi_c/libffi/src/sh/ffi.c
|
|
179
162
|
- ext/ffi_c/libffi/src/sh/ffitarget.h
|
|
180
163
|
- ext/ffi_c/libffi/src/sh/sysv.S
|
|
181
|
-
- ext/ffi_c/libffi/src/sh64
|
|
182
164
|
- ext/ffi_c/libffi/src/sh64/ffi.c
|
|
183
165
|
- ext/ffi_c/libffi/src/sh64/ffitarget.h
|
|
184
166
|
- ext/ffi_c/libffi/src/sh64/sysv.S
|
|
185
|
-
- ext/ffi_c/libffi/src/sparc
|
|
186
167
|
- ext/ffi_c/libffi/src/sparc/ffi.c
|
|
187
168
|
- ext/ffi_c/libffi/src/sparc/ffitarget.h
|
|
188
169
|
- ext/ffi_c/libffi/src/sparc/v8.S
|
|
189
170
|
- ext/ffi_c/libffi/src/sparc/v9.S
|
|
190
171
|
- ext/ffi_c/libffi/src/types.c
|
|
191
|
-
- ext/ffi_c/libffi/src/x86
|
|
192
172
|
- ext/ffi_c/libffi/src/x86/darwin.S
|
|
193
173
|
- ext/ffi_c/libffi/src/x86/darwin64.S
|
|
194
174
|
- ext/ffi_c/libffi/src/x86/ffi.c
|
|
@@ -198,16 +178,12 @@ files:
|
|
|
198
178
|
- ext/ffi_c/libffi/src/x86/sysv.S
|
|
199
179
|
- ext/ffi_c/libffi/src/x86/unix64.S
|
|
200
180
|
- ext/ffi_c/libffi/src/x86/win32.S
|
|
201
|
-
- ext/ffi_c/libffi/testsuite
|
|
202
181
|
- ext/ffi_c/libffi/testsuite/Makefile.am
|
|
203
182
|
- ext/ffi_c/libffi/testsuite/Makefile.in
|
|
204
|
-
- ext/ffi_c/libffi/testsuite/config
|
|
205
183
|
- ext/ffi_c/libffi/testsuite/config/default.exp
|
|
206
|
-
- ext/ffi_c/libffi/testsuite/lib
|
|
207
184
|
- ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp
|
|
208
185
|
- ext/ffi_c/libffi/testsuite/lib/target-libpath.exp
|
|
209
186
|
- ext/ffi_c/libffi/testsuite/lib/wrapper.exp
|
|
210
|
-
- ext/ffi_c/libffi/testsuite/libffi.call
|
|
211
187
|
- ext/ffi_c/libffi/testsuite/libffi.call/call.exp
|
|
212
188
|
- ext/ffi_c/libffi/testsuite/libffi.call/closure_fn0.c
|
|
213
189
|
- ext/ffi_c/libffi/testsuite/libffi.call/closure_fn1.c
|
|
@@ -314,18 +290,18 @@ files:
|
|
|
314
290
|
- ext/ffi_c/libffi/testsuite/libffi.call/struct7.c
|
|
315
291
|
- ext/ffi_c/libffi/testsuite/libffi.call/struct8.c
|
|
316
292
|
- ext/ffi_c/libffi/testsuite/libffi.call/struct9.c
|
|
317
|
-
- ext/ffi_c/libffi/testsuite/libffi.special
|
|
318
293
|
- ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h
|
|
319
294
|
- ext/ffi_c/libffi/testsuite/libffi.special/special.exp
|
|
320
295
|
- ext/ffi_c/libffi/testsuite/libffi.special/unwindtest.cc
|
|
321
296
|
- ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
|
|
322
297
|
- ext/ffi_c/libffi/texinfo.tex
|
|
323
298
|
- ext/ffi_c/rbffi.h
|
|
324
|
-
-
|
|
299
|
+
- gen/Rakefile
|
|
325
300
|
- lib/ffi.rb
|
|
326
301
|
- lib/ffi/autopointer.rb
|
|
327
302
|
- lib/ffi/buffer.rb
|
|
328
303
|
- lib/ffi/callback.rb
|
|
304
|
+
- lib/ffi/enum.rb
|
|
329
305
|
- lib/ffi/errno.rb
|
|
330
306
|
- lib/ffi/ffi.rb
|
|
331
307
|
- lib/ffi/io.rb
|
|
@@ -335,7 +311,6 @@ files:
|
|
|
335
311
|
- lib/ffi/platform.rb
|
|
336
312
|
- lib/ffi/pointer.rb
|
|
337
313
|
- lib/ffi/struct.rb
|
|
338
|
-
- lib/ffi/tools
|
|
339
314
|
- lib/ffi/tools/const_generator.rb
|
|
340
315
|
- lib/ffi/tools/generator.rb
|
|
341
316
|
- lib/ffi/tools/generator_task.rb
|
|
@@ -344,38 +319,23 @@ files:
|
|
|
344
319
|
- lib/ffi/types.rb
|
|
345
320
|
- lib/ffi/union.rb
|
|
346
321
|
- lib/ffi/variadic.rb
|
|
347
|
-
-
|
|
348
|
-
- nbproject/Makefile-impl.mk
|
|
349
|
-
- nbproject/Package-Default.bash
|
|
350
|
-
- nbproject/configurations.xml
|
|
351
|
-
- nbproject/private
|
|
352
|
-
- nbproject/private/configurations.xml
|
|
353
|
-
- nbproject/private/private.xml
|
|
354
|
-
- nbproject/project.properties
|
|
355
|
-
- nbproject/project.xml
|
|
356
|
-
- samples/getlogin.rb
|
|
357
|
-
- samples/getpid.rb
|
|
358
|
-
- samples/gettimeofday.rb
|
|
359
|
-
- samples/hello.rb
|
|
360
|
-
- samples/inotify.rb
|
|
361
|
-
- samples/pty.rb
|
|
362
|
-
- samples/qsort.rb
|
|
363
|
-
- samples/sample_helper.rb
|
|
364
|
-
- spec/ffi
|
|
322
|
+
- spec/ffi/bool_spec.rb
|
|
365
323
|
- spec/ffi/buffer_spec.rb
|
|
366
324
|
- spec/ffi/callback_spec.rb
|
|
325
|
+
- spec/ffi/enum_spec.rb
|
|
367
326
|
- spec/ffi/errno_spec.rb
|
|
368
327
|
- spec/ffi/library_spec.rb
|
|
369
328
|
- spec/ffi/managed_struct_spec.rb
|
|
370
329
|
- spec/ffi/number_spec.rb
|
|
371
330
|
- spec/ffi/pointer_spec.rb
|
|
372
|
-
- spec/ffi/rbx
|
|
373
331
|
- spec/ffi/rbx/attach_function_spec.rb
|
|
374
332
|
- spec/ffi/rbx/memory_pointer_spec.rb
|
|
375
333
|
- spec/ffi/rbx/spec_helper.rb
|
|
376
334
|
- spec/ffi/rbx/struct_spec.rb
|
|
377
335
|
- spec/ffi/spec_helper.rb
|
|
378
336
|
- spec/ffi/string_spec.rb
|
|
337
|
+
- spec/ffi/struct_callback_spec.rb
|
|
338
|
+
- spec/ffi/struct_initialize_spec.rb
|
|
379
339
|
- spec/ffi/struct_spec.rb
|
|
380
340
|
- spec/ffi/typedef_spec.rb
|
|
381
341
|
- spec/ffi/union_spec.rb
|
|
@@ -383,6 +343,8 @@ files:
|
|
|
383
343
|
- spec/spec.opts
|
|
384
344
|
has_rdoc: true
|
|
385
345
|
homepage: http://kenai.com/projects/ruby-ffi
|
|
346
|
+
licenses: []
|
|
347
|
+
|
|
386
348
|
post_install_message:
|
|
387
349
|
rdoc_options:
|
|
388
350
|
- -x
|
|
@@ -407,9 +369,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
407
369
|
requirements: []
|
|
408
370
|
|
|
409
371
|
rubyforge_project: ffi
|
|
410
|
-
rubygems_version: 1.3.
|
|
372
|
+
rubygems_version: 1.3.4
|
|
411
373
|
signing_key:
|
|
412
|
-
specification_version:
|
|
413
|
-
summary:
|
|
374
|
+
specification_version: 3
|
|
375
|
+
summary: Ruby-FFI is a ruby extension for programmatically loading dynamic libraries, binding functions within them, and calling those functions from Ruby code
|
|
414
376
|
test_files: []
|
|
415
377
|
|
data/ext/ffi_c/ffi.mk
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# -*- makefile -*-
|
|
2
|
-
|
|
3
|
-
# CFLAGS += -Werror -Wformat
|
|
4
|
-
INCFLAGS += -I$(BUILD_DIR) -I$(LIBFFI_BUILD_DIR)/include
|
|
5
|
-
CPPFLAGS += -I$(BUILD_DIR) -I$(LIBFFI_BUILD_DIR)/include
|
|
6
|
-
# CPPFLAGS += -mwin32
|
|
7
|
-
LOCAL_LIBS += $(LIBFFI)
|
|
8
|
-
# LOCAL_LIBS += -lpthread
|
|
9
|
-
|
|
10
|
-
FFI_CFLAGS = $(FFI_MMAP_EXEC)
|
|
11
|
-
BUILD_DIR := $(shell pwd)
|
|
12
|
-
ifeq ($(srcdir),.)
|
|
13
|
-
LIBFFI_SRC_DIR := $(shell pwd)/$(srcdir)/libffi
|
|
14
|
-
else
|
|
15
|
-
LIBFFI_SRC_DIR := $(srcdir)/libffi
|
|
16
|
-
endif
|
|
17
|
-
LIBFFI_BUILD_DIR = $(BUILD_DIR)/libffi
|
|
18
|
-
LIBFFI = $(LIBFFI_BUILD_DIR)/.libs/libffi_convenience.a
|
|
19
|
-
FFI_CONFIGURE = $(LIBFFI_SRC_DIR)/configure --disable-static \
|
|
20
|
-
--with-pic=yes --disable-dependency-tracking
|
|
21
|
-
|
|
22
|
-
$(OBJS): $(LIBFFI)
|
|
23
|
-
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Generated Makefile - do not edit!
|
|
3
|
-
#
|
|
4
|
-
# Edit the Makefile in the project folder instead (../Makefile). Each target
|
|
5
|
-
# has a -pre and a -post target defined where you can add customized code.
|
|
6
|
-
#
|
|
7
|
-
# This makefile implements configuration specific macros and targets.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
# Environment
|
|
11
|
-
MKDIR=mkdir
|
|
12
|
-
CP=cp
|
|
13
|
-
CCADMIN=CCadmin
|
|
14
|
-
RANLIB=ranlib
|
|
15
|
-
CC=gcc
|
|
16
|
-
CCC=g++
|
|
17
|
-
CXX=g++
|
|
18
|
-
FC=
|
|
19
|
-
|
|
20
|
-
# Macros
|
|
21
|
-
PLATFORM=GNU-MacOSX
|
|
22
|
-
|
|
23
|
-
# Include project Makefile
|
|
24
|
-
include ruby-ffi-Makefile.mk
|
|
25
|
-
|
|
26
|
-
# Object Directory
|
|
27
|
-
OBJECTDIR=build/Default/${PLATFORM}
|
|
28
|
-
|
|
29
|
-
# Object Files
|
|
30
|
-
OBJECTFILES=
|
|
31
|
-
|
|
32
|
-
# C Compiler Flags
|
|
33
|
-
CFLAGS=
|
|
34
|
-
|
|
35
|
-
# CC Compiler Flags
|
|
36
|
-
CCFLAGS=
|
|
37
|
-
CXXFLAGS=
|
|
38
|
-
|
|
39
|
-
# Fortran Compiler Flags
|
|
40
|
-
FFLAGS=
|
|
41
|
-
|
|
42
|
-
# Link Libraries and Options
|
|
43
|
-
LDLIBSOPTIONS=
|
|
44
|
-
|
|
45
|
-
# Build Targets
|
|
46
|
-
.build-conf: ${BUILD_SUBPROJECTS}
|
|
47
|
-
cd . && rake compile
|
|
48
|
-
|
|
49
|
-
# Subprojects
|
|
50
|
-
.build-subprojects:
|
|
51
|
-
|
|
52
|
-
# Clean Targets
|
|
53
|
-
.clean-conf:
|
|
54
|
-
cd . && rake clean
|
|
55
|
-
|
|
56
|
-
# Subprojects
|
|
57
|
-
.clean-subprojects:
|
data/nbproject/Makefile-impl.mk
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Generated Makefile - do not edit!
|
|
3
|
-
#
|
|
4
|
-
# Edit the Makefile in the project folder instead (../Makefile). Each target
|
|
5
|
-
# has a pre- and a post- target defined where you can add customization code.
|
|
6
|
-
#
|
|
7
|
-
# This makefile implements macros and targets common to all configurations.
|
|
8
|
-
#
|
|
9
|
-
# NOCDDL
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
|
|
13
|
-
# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
|
|
14
|
-
# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
|
|
15
|
-
# and .clean-reqprojects-conf unless SUB has the value 'no'
|
|
16
|
-
SUB_no=NO
|
|
17
|
-
SUBPROJECTS=${SUB_${SUB}}
|
|
18
|
-
BUILD_SUBPROJECTS_=.build-subprojects
|
|
19
|
-
BUILD_SUBPROJECTS_NO=
|
|
20
|
-
BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
|
|
21
|
-
CLEAN_SUBPROJECTS_=.clean-subprojects
|
|
22
|
-
CLEAN_SUBPROJECTS_NO=
|
|
23
|
-
CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# Project Name
|
|
27
|
-
PROJECTNAME=ruby-ffi
|
|
28
|
-
|
|
29
|
-
# Active Configuration
|
|
30
|
-
DEFAULTCONF=Default
|
|
31
|
-
CONF=${DEFAULTCONF}
|
|
32
|
-
|
|
33
|
-
# All Configurations
|
|
34
|
-
ALLCONFS=Default
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
# build
|
|
38
|
-
.build-impl: .build-pre .validate-impl .depcheck-impl
|
|
39
|
-
@#echo "=> Running $@... Configuration=$(CONF)"
|
|
40
|
-
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
# clean
|
|
44
|
-
.clean-impl: .clean-pre .validate-impl .depcheck-impl
|
|
45
|
-
@#echo "=> Running $@... Configuration=$(CONF)"
|
|
46
|
-
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# clobber
|
|
50
|
-
.clobber-impl: .clobber-pre .depcheck-impl
|
|
51
|
-
@#echo "=> Running $@..."
|
|
52
|
-
for CONF in ${ALLCONFS}; \
|
|
53
|
-
do \
|
|
54
|
-
${MAKE} -f nbproject/Makefile-$${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf; \
|
|
55
|
-
done
|
|
56
|
-
|
|
57
|
-
# all
|
|
58
|
-
.all-impl: .all-pre .depcheck-impl
|
|
59
|
-
@#echo "=> Running $@..."
|
|
60
|
-
for CONF in ${ALLCONFS}; \
|
|
61
|
-
do \
|
|
62
|
-
${MAKE} -f nbproject/Makefile-$${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf; \
|
|
63
|
-
done
|
|
64
|
-
|
|
65
|
-
# dependency checking support
|
|
66
|
-
.depcheck-impl:
|
|
67
|
-
@echo "# This code depends on make tool being used" >.dep.inc
|
|
68
|
-
@if [ -n "${MAKE_VERSION}" ]; then \
|
|
69
|
-
echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \
|
|
70
|
-
echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
|
|
71
|
-
echo "include \$${DEPFILES}" >>.dep.inc; \
|
|
72
|
-
echo "endif" >>.dep.inc; \
|
|
73
|
-
else \
|
|
74
|
-
echo ".KEEP_STATE:" >>.dep.inc; \
|
|
75
|
-
echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
# configuration validation
|
|
79
|
-
.validate-impl:
|
|
80
|
-
@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
|
|
81
|
-
then \
|
|
82
|
-
echo ""; \
|
|
83
|
-
echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \
|
|
84
|
-
echo "See 'make help' for details."; \
|
|
85
|
-
echo "Current directory: " `pwd`; \
|
|
86
|
-
echo ""; \
|
|
87
|
-
fi
|
|
88
|
-
@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
|
|
89
|
-
then \
|
|
90
|
-
exit 1; \
|
|
91
|
-
fi
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
# help
|
|
95
|
-
.help-impl: .help-pre
|
|
96
|
-
@echo "This makefile supports the following configurations:"
|
|
97
|
-
@echo " ${ALLCONFS}"
|
|
98
|
-
@echo ""
|
|
99
|
-
@echo "and the following targets:"
|
|
100
|
-
@echo " build (default target)"
|
|
101
|
-
@echo " clean"
|
|
102
|
-
@echo " clobber"
|
|
103
|
-
@echo " all"
|
|
104
|
-
@echo " help"
|
|
105
|
-
@echo ""
|
|
106
|
-
@echo "Makefile Usage:"
|
|
107
|
-
@echo " make [CONF=<CONFIGURATION>] [SUB=no] build"
|
|
108
|
-
@echo " make [CONF=<CONFIGURATION>] [SUB=no] clean"
|
|
109
|
-
@echo " make [SUB=no] clobber"
|
|
110
|
-
@echo " make [SUB=no] all"
|
|
111
|
-
@echo " make help"
|
|
112
|
-
@echo ""
|
|
113
|
-
@echo "Target 'build' will build a specific configuration and, unless 'SUB=no',"
|
|
114
|
-
@echo " also build subprojects."
|
|
115
|
-
@echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no',"
|
|
116
|
-
@echo " also clean subprojects."
|
|
117
|
-
@echo "Target 'clobber' will remove all built files from all configurations and,"
|
|
118
|
-
@echo " unless 'SUB=no', also from subprojects."
|
|
119
|
-
@echo "Target 'all' will will build all configurations and, unless 'SUB=no',"
|
|
120
|
-
@echo " also build subprojects."
|
|
121
|
-
@echo "Target 'help' prints this message."
|
|
122
|
-
@echo ""
|
|
123
|
-
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
#!/bin/bash -x
|
|
2
|
-
|
|
3
|
-
#
|
|
4
|
-
# Generated - do not edit!
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
# Macros
|
|
8
|
-
TOP=`pwd`
|
|
9
|
-
PLATFORM=GNU-MacOSX
|
|
10
|
-
TMPDIR=build/Default/${PLATFORM}/tmp-packaging
|
|
11
|
-
TMPDIRNAME=tmp-packaging
|
|
12
|
-
OUTPUT_PATH=MissingOutputInProject
|
|
13
|
-
OUTPUT_BASENAME=MissingOutputInProject
|
|
14
|
-
PACKAGE_TOP_DIR=ruby-ffi/
|
|
15
|
-
|
|
16
|
-
# Functions
|
|
17
|
-
function checkReturnCode
|
|
18
|
-
{
|
|
19
|
-
rc=$?
|
|
20
|
-
if [ $rc != 0 ]
|
|
21
|
-
then
|
|
22
|
-
exit $rc
|
|
23
|
-
fi
|
|
24
|
-
}
|
|
25
|
-
function makeDirectory
|
|
26
|
-
# $1 directory path
|
|
27
|
-
# $2 permission (optional)
|
|
28
|
-
{
|
|
29
|
-
mkdir -p "$1"
|
|
30
|
-
checkReturnCode
|
|
31
|
-
if [ "$2" != "" ]
|
|
32
|
-
then
|
|
33
|
-
chmod $2 "$1"
|
|
34
|
-
checkReturnCode
|
|
35
|
-
fi
|
|
36
|
-
}
|
|
37
|
-
function copyFileToTmpDir
|
|
38
|
-
# $1 from-file path
|
|
39
|
-
# $2 to-file path
|
|
40
|
-
# $3 permission
|
|
41
|
-
{
|
|
42
|
-
cp "$1" "$2"
|
|
43
|
-
checkReturnCode
|
|
44
|
-
if [ "$3" != "" ]
|
|
45
|
-
then
|
|
46
|
-
chmod $3 "$2"
|
|
47
|
-
checkReturnCode
|
|
48
|
-
fi
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
# Setup
|
|
52
|
-
cd "${TOP}"
|
|
53
|
-
mkdir -p dist/Default/${PLATFORM}/package
|
|
54
|
-
rm -rf ${TMPDIR}
|
|
55
|
-
mkdir -p ${TMPDIR}
|
|
56
|
-
|
|
57
|
-
# Copy files and create directories and links
|
|
58
|
-
cd "${TOP}"
|
|
59
|
-
makeDirectory ${TMPDIR}/ruby-ffi/bin
|
|
60
|
-
copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
# Generate tar file
|
|
64
|
-
cd "${TOP}"
|
|
65
|
-
rm -f dist/Default/${PLATFORM}/package/ruby-ffi.tar
|
|
66
|
-
cd ${TMPDIR}
|
|
67
|
-
tar -vcf ../../../../dist/Default/${PLATFORM}/package/ruby-ffi.tar *
|
|
68
|
-
checkReturnCode
|
|
69
|
-
|
|
70
|
-
# Cleanup
|
|
71
|
-
cd "${TOP}"
|
|
72
|
-
rm -rf ${TMPDIR}
|