summaryrefslogtreecommitdiff
path: root/ext/dl/callback/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/callback/extconf.rb')
-rw-r--r--ext/dl/callback/extconf.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/dl/callback/extconf.rb b/ext/dl/callback/extconf.rb
new file mode 100644
index 00000000000..46aba28397d
--- /dev/null
+++ b/ext/dl/callback/extconf.rb
@@ -0,0 +1,15 @@
+require 'mkmf'
+
+if compiled?("dl")
+ CALLBACKS = (0..8).map{|i| "callback-#{i}"}
+ CALLBACK_SRCS = CALLBACKS.map{|basename| "#{basename}.c"}
+ CALLBACK_OBJS = CALLBACKS.map{|basename| "#{basename}.o"}
+
+ $distcleanfiles += [ "callback.h", *CALLBACK_SRCS ]
+
+ $objs = %w[ callback.o ] + CALLBACK_OBJS
+
+ $INCFLAGS << " -I$(srcdir)/.."
+
+ create_makefile("dl/callback")
+end