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.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/dl/callback/extconf.rb b/ext/dl/callback/extconf.rb
new file mode 100644
index 00000000000..6c3387670d6
--- /dev/null
+++ b/ext/dl/callback/extconf.rb
@@ -0,0 +1,14 @@
+require 'mkmf'
+
+if compiled?("dl")
+ callbacks = (0..8).map{|i| "callback-#{i}"}.unshift("callback")
+ callback_srcs = callbacks.map{|basename| "#{basename}.c"}
+ callback_objs = callbacks.map{|basename| "#{basename}.o"}
+
+ $distcleanfiles << '$(SRCS)'
+ $srcs = callback_srcs
+ $objs = callback_objs
+ $INCFLAGS << " -I$(srcdir)/.."
+
+ create_makefile("dl/callback")
+end