diff options
Diffstat (limited to 'samples/12_c_extensions/03_native_pixel_arrays/pre.sh')
| -rwxr-xr-x | samples/12_c_extensions/03_native_pixel_arrays/pre.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/samples/12_c_extensions/03_native_pixel_arrays/pre.sh b/samples/12_c_extensions/03_native_pixel_arrays/pre.sh new file mode 100755 index 0000000..07965a5 --- /dev/null +++ b/samples/12_c_extensions/03_native_pixel_arrays/pre.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +OSTYPE=`uname -s` +if [ "x$OSTYPE" = "xDarwin" ]; then + PLATFORM=macos + DLLEXT=dylib +else + PLATFORM=linux-amd64 + DLLEXT=so +fi + +DRB_ROOT=../../.. +mkdir -p native/$PLATFORM + +$DRB_ROOT/dragonruby-bind --output=native/ext-bindings.c app/ext.c +clang \ + -isystem $DRB_ROOT/include -I. \ + -fPIC -shared native/ext-bindings.c -o native/$PLATFORM/ext.$DLLEXT + |
