summaryrefslogtreecommitdiffstats
path: root/ext/dl/callback/extconf.rb
blob: 46aba28397d0c985114804304c9442e7aa94ca7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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