ruby-dtrace 0.0.6 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/History.txt +21 -0
  2. data/Manifest.txt +86 -19
  3. data/README.txt +48 -6
  4. data/Rakefile +61 -20
  5. data/examples/scsi.rb +1 -1
  6. data/ext/dof/Makefile +154 -0
  7. data/ext/dof/constants.c +57 -0
  8. data/ext/dof/dof.h +56 -0
  9. data/ext/dof/dof_api.c +58 -0
  10. data/ext/dof/dof_helper.c +82 -0
  11. data/ext/dof/extconf.rb +4 -0
  12. data/ext/dof/file.c +90 -0
  13. data/ext/dof/generator.c +9 -0
  14. data/ext/dof/header.c +79 -0
  15. data/ext/dof/mkmf.log +10 -0
  16. data/ext/dof/parser.c +415 -0
  17. data/ext/dof/parser.h +10 -0
  18. data/ext/dof/section.c +312 -0
  19. data/ext/dtrace_aggdata.c +2 -2
  20. data/ext/dtrace_api.c +46 -34
  21. data/ext/dtrace_api.h +31 -7
  22. data/ext/dtrace_bufdata.c +3 -3
  23. data/ext/dtrace_hdl.c +66 -3
  24. data/ext/dtrace_probedata.c +4 -4
  25. data/ext/{dtrace_probe.c → dtrace_probedesc.c} +7 -7
  26. data/ext/extconf.rb +25 -0
  27. data/ext/i386-darwin/dtrace_probe.c +278 -0
  28. data/ext/i386-solaris/dtrace_probe.c +225 -0
  29. data/ext/stubs.txt +78 -0
  30. data/lib/dtrace.rb +34 -13
  31. data/lib/dtrace/aggregate.rb +40 -0
  32. data/lib/dtrace/aggregateset.rb +19 -0
  33. data/lib/dtrace/consumer.rb +174 -0
  34. data/lib/dtrace/data.rb +82 -0
  35. data/lib/dtrace/dof.rb +8 -0
  36. data/lib/dtrace/dof/file.rb +64 -0
  37. data/lib/dtrace/dof/section.rb +75 -0
  38. data/lib/dtrace/dof/section/strtab.rb +28 -0
  39. data/lib/{dtraceprintfrecord.rb → dtrace/printfrecord.rb} +4 -2
  40. data/lib/dtrace/probe.rb +3 -6
  41. data/lib/dtrace/probedata.rb +23 -0
  42. data/lib/dtrace/probedesc.rb +15 -0
  43. data/lib/dtrace/provider.rb +190 -169
  44. data/lib/dtrace/provider/klass.rb +33 -0
  45. data/lib/dtrace/provider/probedef.rb +24 -0
  46. data/lib/{dtracerecord.rb → dtrace/record.rb} +4 -2
  47. data/lib/{dtracestackrecord.rb → dtrace/stackrecord.rb} +10 -8
  48. data/lib/dtrace/version.rb +9 -0
  49. data/lib/dtraceconsumer.rb +3 -167
  50. data/plugin/dtrace/lib/dtracer.rb +4 -4
  51. data/test/apple-dof +0 -0
  52. data/test/disabled_probe_effect.txt +19 -0
  53. data/test/dof +0 -0
  54. data/test/dof2 +0 -0
  55. data/test/test_disabled_probe_effect.rb +56 -0
  56. data/test/test_dof_generator.rb +142 -0
  57. data/test/test_dof_helper.rb +106 -0
  58. data/test/test_dof_parser.rb +27 -0
  59. data/test/test_dof_providers.rb +278 -0
  60. data/test/test_dof_strtabs.rb +98 -0
  61. data/test/test_dtrace.rb +67 -1
  62. data/test/test_dtrace_aggregates.rb +5 -5
  63. data/test/test_dtrace_drops_errors.rb +5 -5
  64. data/test/test_dtrace_probe.rb +385 -0
  65. data/test/test_dtrace_probes.rb +414 -0
  66. data/test/test_dtrace_processes.rb +2 -2
  67. data/test/test_dtrace_profile.rb +12 -12
  68. data/test/test_dtrace_provider.rb +138 -0
  69. data/test/test_dtrace_repeat.rb +1 -1
  70. data/test/test_dtrace_rubyprobe.rb +3 -1
  71. data/test/test_dtrace_typefilter.rb +9 -9
  72. data/test/test_legacy_consumer.rb +56 -0
  73. metadata +112 -71
  74. data/lib/dtrace/provider/osx.rb +0 -25
  75. data/lib/dtrace/provider/solaris.rb +0 -29
  76. data/lib/dtraceaggregate.rb +0 -37
  77. data/lib/dtraceaggregateset.rb +0 -17
  78. data/lib/dtracedata.rb +0 -80
  79. data/lib/dtraceprobe.rb +0 -13
  80. data/lib/dtraceprobedata.rb +0 -21
  81. data/test/test_dynusdt.rb +0 -135
@@ -1,3 +1,24 @@
1
+ == 0.2.8 / 2009-07-23
2
+
3
+ * Replace string-eval provider class creation
4
+ * Fix GC bug with DOF data on Mac OSX (reported by ecin@copypastel.com)
5
+ * Add each_probe_prog method to list probes enabled by a program
6
+ * Fix conversion of 64 bit values in probe data (reported by ecin@copypastel.com)
7
+ * Add support for SPARC/Solaris and PowerPC/OSX architectures
8
+
9
+ == 0.2.7 / 2008-08-01
10
+
11
+ * Fix probes not firing when multiple providers are used.
12
+
13
+ == 0.2.6 / 2008-06-17
14
+
15
+ * Fix aggregate value conversion bug
16
+
17
+ == 0.2.5 / 2008-06-14
18
+
19
+ * Rework Dtrace::Provider to directly create USDT providers by
20
+ generating DOF and stub functions.
21
+
1
22
  == 0.0.6 / 2008-02-17
2
23
 
3
24
  * Add Dtrace::Provider, which allows creation of USDT providers from
@@ -1,8 +1,18 @@
1
- History.txt
2
- Manifest.txt
3
- README.txt
4
- Rakefile
5
1
  examples/scsi.rb
2
+ ext/dof
3
+ ext/dof/constants.c
4
+ ext/dof/dof.h
5
+ ext/dof/dof_api.c
6
+ ext/dof/dof_helper.c
7
+ ext/dof/extconf.rb
8
+ ext/dof/file.c
9
+ ext/dof/generator.c
10
+ ext/dof/header.c
11
+ ext/dof/Makefile
12
+ ext/dof/mkmf.log
13
+ ext/dof/parser.c
14
+ ext/dof/parser.h
15
+ ext/dof/section.c
6
16
  ext/dtrace_aggdata.c
7
17
  ext/dtrace_api.c
8
18
  ext/dtrace_api.h
@@ -10,49 +20,106 @@ ext/dtrace_bufdata.c
10
20
  ext/dtrace_dropdata.c
11
21
  ext/dtrace_errdata.c
12
22
  ext/dtrace_hdl.c
13
- ext/dtrace_probe.c
14
23
  ext/dtrace_probedata.c
24
+ ext/dtrace_probedesc.c
15
25
  ext/dtrace_process.c
16
26
  ext/dtrace_program.c
17
27
  ext/dtrace_programinfo.c
18
28
  ext/dtrace_recdesc.c
19
29
  ext/dtrace_util.c
20
30
  ext/extconf.rb
21
- lib/dtrace.rb
31
+ ext/i386-solaris
32
+ ext/i386-solaris/dtrace_probe.c
33
+ ext/i386-darwin
34
+ ext/i386-darwin/dtrace_probe.c
35
+ ext/stubs.txt
36
+ lib/dtrace
37
+ lib/dtrace/aggregate.rb
38
+ lib/dtrace/aggregateset.rb
39
+ lib/dtrace/consumer.rb
40
+ lib/dtrace/data.rb
41
+ lib/dtrace/dof
42
+ lib/dtrace/dof/file.rb
43
+ lib/dtrace/dof/section
44
+ lib/dtrace/dof/section/strtab.rb
45
+ lib/dtrace/dof/section.rb
46
+ lib/dtrace/dof.rb
47
+ lib/dtrace/printfrecord.rb
22
48
  lib/dtrace/probe.rb
49
+ lib/dtrace/probedata.rb
50
+ lib/dtrace/probedesc.rb
51
+ lib/dtrace/provider
52
+ lib/dtrace/provider/probedef.rb
23
53
  lib/dtrace/provider.rb
24
- lib/dtrace/provider/osx.rb
25
- lib/dtrace/provider/solaris.rb
54
+ lib/dtrace/record.rb
55
+ lib/dtrace/stackrecord.rb
26
56
  lib/dtrace/tracer.rb
27
- lib/dtraceaggregate.rb
28
- lib/dtraceaggregateset.rb
57
+ lib/dtrace/version.rb
58
+ lib/dtrace.rb
29
59
  lib/dtraceconsumer.rb
30
- lib/dtracedata.rb
31
- lib/dtraceprintfrecord.rb
32
- lib/dtraceprobe.rb
33
- lib/dtraceprobedata.rb
34
- lib/dtracerecord.rb
35
- lib/dtracestackrecord.rb
36
- plugin/dtrace/README
37
- plugin/dtrace/Rakefile
60
+ plugin/dtrace
61
+ plugin/dtrace/bin
38
62
  plugin/dtrace/bin/dtracer.rb
39
63
  plugin/dtrace/init.rb
64
+ plugin/dtrace/lib
40
65
  plugin/dtrace/lib/dtrace_helper.rb
41
66
  plugin/dtrace/lib/dtrace_report.rb
42
67
  plugin/dtrace/lib/dtracer.rb
43
68
  plugin/dtrace/lib/dtracer_client.rb
69
+ plugin/dtrace/public
70
+ plugin/dtrace/public/stylesheets
44
71
  plugin/dtrace/public/stylesheets/dtrace.css
72
+ plugin/dtrace/Rakefile
73
+ plugin/dtrace/README
74
+ plugin/dtrace/scripts
45
75
  plugin/dtrace/scripts/default.d
46
76
  plugin/dtrace/scripts/rails_mysql.d
77
+ plugin/dtrace/tasks
47
78
  plugin/dtrace/tasks/dtrace.rake
79
+ plugin/dtrace/test
48
80
  plugin/dtrace/test/dtrace_test.rb
81
+ plugin/dtrace/views
82
+ plugin/dtrace/views/dtrace
49
83
  plugin/dtrace/views/dtrace/_report.rhtml
84
+ plugin/dtrace_probes
85
+ plugin/dtrace_probes/init.rb
86
+ plugin/dtrace_probes/install.rb
87
+ plugin/dtrace_probes/lib
88
+ plugin/dtrace_probes/lib/probes
89
+ plugin/dtrace_probes/lib/probes/action_controller.rb
90
+ plugin/dtrace_probes/lib/probes/active_record.rb
91
+ plugin/dtrace_probes/lib/probes.rb
92
+ plugin/dtrace_probes/MIT-LICENSE
93
+ plugin/dtrace_probes/Rakefile
94
+ plugin/dtrace_probes/README
95
+ plugin/dtrace_probes/tasks
96
+ plugin/dtrace_probes/tasks/dtrace_probes_tasks.rake
97
+ plugin/dtrace_probes/test
98
+ plugin/dtrace_probes/test/dtrace_probes_test.rb
99
+ plugin/dtrace_probes/uninstall.rb
100
+ test/apple-dof
101
+ test/disabled_probe_effect.txt
102
+ test/dof
103
+ test/dof2
104
+ test/test_disabled_probe_effect.rb
105
+ test/test_dof_generator.rb
106
+ test/test_dof_helper.rb
107
+ test/test_dof_parser.rb
108
+ test/test_dof_providers.rb
109
+ test/test_dof_strtabs.rb
50
110
  test/test_dtrace.rb
51
111
  test/test_dtrace_aggregates.rb
52
112
  test/test_dtrace_drops_errors.rb
113
+ test/test_dtrace_probe.rb
114
+ test/test_dtrace_probes.rb
53
115
  test/test_dtrace_processes.rb
54
116
  test/test_dtrace_profile.rb
117
+ test/test_dtrace_provider.rb
55
118
  test/test_dtrace_repeat.rb
56
119
  test/test_dtrace_rubyprobe.rb
57
120
  test/test_dtrace_typefilter.rb
58
- test/test_dynusdt.rb
121
+ test/test_legacy_consumer.rb
122
+ README.txt
123
+ History.txt
124
+ Manifest.txt
125
+ Rakefile
data/README.txt CHANGED
@@ -1,17 +1,34 @@
1
- ruby-dtrace is Ruby bindings for Dtrace, which lets you write D-based
2
- programs in Ruby. It doesn't provide D probes for Ruby, but you can
3
- use it with the probes found in the Joyent and Apple builds of Ruby.
1
+ Ruby-DTrace is Ruby bindings for Dtrace, which allows you to add
2
+ DTrace probes to your Ruby programs, and to write D-based programs
3
+ with Ruby.
4
+
5
+ == FEEDBACK
6
+
7
+ Fork the repository on Github: http://github.com/chrisa/ruby-dtrace
8
+
9
+ Rubyforge mailing list: http://rubyforge.org/mailman/listinfo/ruby-dtrace-users
4
10
 
5
11
  == FEATURES
6
12
 
13
+ Consumer:
14
+
7
15
  * Access to the D API
8
16
  * Probe metadata
9
17
  * Run D programs
10
18
  * Access aggregates
11
19
  * Consume output from D programs
12
20
 
21
+ Probes:
22
+
23
+ * Create USDT providers from Ruby, at runtime.
24
+ * No code-generation or gcc/linker dependency
25
+
13
26
  == SYNOPSIS
14
27
 
28
+ Consumer: see Dtrace
29
+
30
+ require 'Dtrace'
31
+
15
32
  t = Dtrace.new
16
33
  progtext = 'ruby$1:::function-entry{ @a[strjoin(strjoin(copyinstr(arg0),"."),copyinstr(arg1))] = count(); } END { printa(@a); }'
17
34
  prog = t.compile progtext
@@ -26,10 +43,35 @@ use it with the probes found in the Joyent and Apple builds of Ruby.
26
43
  # handle records
27
44
  end
28
45
 
46
+ Probes: see Dtrace::Provider
47
+
48
+ require 'dtrace/provider'
49
+
50
+ Dtrace::Provider.create :rubyprog do |p|
51
+ p.probe :foo, :string, :string
52
+ p.probe :bar, :integer, :integer
53
+ end
54
+
55
+ Dtrace::Probe::Rubyprog.foo do |p|
56
+ p.fire('fired!', 'again')
57
+ end
58
+
59
+ Dtrace::Probe::Rubyprog.bar do |p|
60
+ p.fire(42, 27)
61
+ end
62
+
29
63
  == REQUIREMENTS
30
64
 
31
- * A platform with Dtrace support (OpenSolaris, Mac OS X 10.5 Leopard tested, possibly also FreeBSD).
32
- * root, or some/all of the dtrace privileges on Solaris: dtrace_user, dtrace_proc and dtrace_kernel.
65
+ * For the consumer API, platform with DTrace support (OpenSolaris, Mac
66
+ OS X 10.5 Leopard tested, possibly also FreeBSD).
67
+
68
+ * For the probe API, a platform with DTrace support (as for the
69
+ consumer API), with a 32 bit Ruby build - i386, PowerPC (for OS X)
70
+ and SPARC (for Solaris) are all supported. 64 bit builds are not,
71
+ yet.
72
+
73
+ * root, or some/all of the dtrace privileges on Solaris: dtrace_user,
74
+ dtrace_proc and dtrace_kernel.
33
75
 
34
76
  == INSTALL
35
77
 
@@ -37,7 +79,7 @@ use it with the probes found in the Joyent and Apple builds of Ruby.
37
79
 
38
80
  == LICENSE
39
81
 
40
- Copyright (c) 2007 Chris Andrews <chris@nodnol.org>
82
+ Copyright (c) 2008, 2009 Chris Andrews <chris@nodnol.org>
41
83
 
42
84
  Permission is hereby granted, free of charge, to any person obtaining
43
85
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,32 +1,73 @@
1
1
  # -*- ruby -*-
2
2
 
3
- require 'rubygems'
4
- require 'hoe'
3
+ require 'rake'
4
+ require 'rake/testtask'
5
+ require 'rake/rdoctask'
6
+ require 'rake/packagetask'
7
+ require 'rake/gempackagetask'
8
+ require 'rake/contrib/rubyforgepublisher'
5
9
 
6
10
  $: << './lib'
7
- require 'dtrace'
8
-
9
- Hoe.new('ruby-dtrace', Dtrace::VERSION) do |p|
10
- p.rubyforge_name = 'ruby-dtrace'
11
- p.author = 'Chris Andrews'
12
- p.email = 'chris@nodnol.org'
13
- p.summary = 'Ruby bindings for libdtrace'
14
- p.description = <<EOD
15
- ruby-dtrace is Ruby bindings for Dtrace, which lets you write D-based
16
- programs in Ruby. It doesn't provide D probes for Ruby, but you can
17
- use it with the probes found in the Joyent and Apple builds of Ruby.
18
- EOD
19
- p.spec_extras = {:extensions => ['ext/extconf.rb']}
20
- p.url = "http://ruby-dtrace.rubyforge.org/"
21
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
22
- end
11
+ require 'dtrace/version'
23
12
 
24
13
  desc "Uses extconf.rb and make to build the extension"
25
14
  task :extensions do
26
15
  Dir.chdir('ext')
27
16
  system("ruby extconf.rb")
28
17
  system("make")
29
- Dir.chdir('..')
18
+ Dir.chdir('dof')
19
+ system("ruby extconf.rb")
20
+ system("make")
21
+ Dir.chdir('../..')
30
22
  end
31
23
 
32
- # vim: syntax=Ruby
24
+ desc "Clean all extensions"
25
+ task :clean_extensions do
26
+ Dir.chdir('ext')
27
+ system("make clean")
28
+ Dir.chdir('dof')
29
+ system("make clean")
30
+ Dir.chdir('../..')
31
+ end
32
+
33
+ PKG_NAME = "ruby-dtrace"
34
+ PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
35
+ PKG_VERSION = Dtrace::VERSION + PKG_BUILD
36
+ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
37
+
38
+ desc "Default task"
39
+ task :default => [ :test ]
40
+
41
+ desc "Build documentation"
42
+ task :doc => [ :rdoc ]
43
+
44
+ Rake::TestTask.new do |t|
45
+ t.libs << "ext:lib"
46
+ t.test_files = Dir["test/*.rb"]
47
+ t.verbose = true
48
+ end
49
+
50
+ desc "Run code-coverage analysis using rcov"
51
+ task :coverage do
52
+ rm_rf "coverage"
53
+ files = Dir["test/*.rb"]
54
+ system "rcov --sort coverage -Iext:lib #{files.join(' ')}"
55
+ end
56
+
57
+ GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{PKG_NAME}.gemspec"))
58
+
59
+ Rake::GemPackageTask.new(GEM_SPEC) do |p|
60
+ p.gem_spec = GEM_SPEC
61
+ p.need_tar = true
62
+ p.need_zip = true
63
+ end
64
+
65
+ desc "Build the RDoc API documentation"
66
+ Rake::RDocTask.new do |rdoc|
67
+ rdoc.rdoc_dir = "doc"
68
+ rdoc.title = "Ruby-DTrace"
69
+ rdoc.options += %w(--line-numbers --inline-source --main README.txt)
70
+ rdoc.rdoc_files.include 'README.txt'
71
+ rdoc.rdoc_files.include 'ext/**/*.c'
72
+ rdoc.rdoc_files.include 'lib/**/*.rb'
73
+ end
@@ -381,7 +381,7 @@ prog.execute
381
381
  t.go
382
382
 
383
383
  begin
384
- c = DtraceConsumer.new(t)
384
+ c = Dtrace::Consumer.new(t)
385
385
 
386
386
  c.consume do |d|
387
387
  records = d.data
@@ -0,0 +1,154 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = .
7
+ topdir = /opt/local/lib/ruby/1.8/i686-darwin9.7.0
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir):$(topdir):$(hdrdir)
10
+ prefix = $(DESTDIR)/opt/local
11
+ exec_prefix = $(prefix)
12
+ sitedir = $(prefix)/lib/ruby/site_ruby
13
+ rubylibdir = $(libdir)/ruby/$(ruby_version)
14
+ docdir = $(datarootdir)/doc/$(PACKAGE)
15
+ dvidir = $(docdir)
16
+ datarootdir = $(prefix)/share
17
+ archdir = $(rubylibdir)/$(arch)
18
+ sbindir = $(exec_prefix)/sbin
19
+ psdir = $(docdir)
20
+ vendordir = $(prefix)/lib/ruby/vendor_ruby
21
+ localedir = $(datarootdir)/locale
22
+ htmldir = $(docdir)
23
+ datadir = $(datarootdir)
24
+ includedir = $(prefix)/include
25
+ infodir = $(datarootdir)/info
26
+ sysconfdir = $(prefix)/etc
27
+ libdir = $(exec_prefix)/lib
28
+ mandir = $(DESTDIR)/opt/local/share/man
29
+ sharedstatedir = $(prefix)/com
30
+ oldincludedir = $(DESTDIR)/usr/include
31
+ pdfdir = $(docdir)
32
+ sitearchdir = $(sitelibdir)/$(sitearch)
33
+ vendorarchdir = $(vendorlibdir)/$(vendorarch)
34
+ localstatedir = $(prefix)/var
35
+ bindir = $(exec_prefix)/bin
36
+ vendorlibdir = $(vendordir)/$(ruby_version)
37
+ sitelibdir = $(sitedir)/$(ruby_version)
38
+ libexecdir = $(exec_prefix)/libexec
39
+
40
+ CC = /usr/bin/gcc-4.0
41
+ LIBRUBY = $(LIBRUBY_SO)
42
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
43
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
44
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
45
+
46
+ RUBY_EXTCONF_H =
47
+ CFLAGS = -fno-common -O2 -fno-common -pipe -fno-common -D_LONGLONG_TYPE -g
48
+ INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
49
+ DEFS =
50
+ CPPFLAGS = -DHAVE_SYS_DTRACE_H -I/opt/local/include $(DEFS)
51
+ CXXFLAGS = $(CFLAGS)
52
+ DLDFLAGS = -L. -L/opt/local/lib
53
+ LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace
54
+ AR = ar
55
+ EXEEXT =
56
+
57
+ RUBY_INSTALL_NAME = ruby
58
+ RUBY_SO_NAME = ruby
59
+ arch = i686-darwin9.7.0
60
+ sitearch = i686-darwin9.7.0
61
+ vendorarch = i686-darwin9.7.0
62
+ ruby_version = 1.8
63
+ ruby = /opt/local/bin/ruby
64
+ RUBY = $(ruby)
65
+ RM = rm -f
66
+ MAKEDIRS = mkdir -p
67
+ INSTALL = /usr/bin/install -c
68
+ INSTALL_PROG = $(INSTALL) -m 0755
69
+ INSTALL_DATA = $(INSTALL) -m 644
70
+ COPY = cp
71
+
72
+ #### End of system configuration section. ####
73
+
74
+ preload =
75
+
76
+ libpath = . $(libdir)
77
+ LIBPATH = -L. -L$(libdir)
78
+ DEFFILE =
79
+
80
+ CLEANFILES = mkmf.log
81
+ DISTCLEANFILES =
82
+
83
+ extout =
84
+ extout_prefix =
85
+ target_prefix =
86
+ LOCAL_LIBS =
87
+ LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl -lobjc
88
+ SRCS = constants.c dof_api.c dof_helper.c file.c generator.c header.c parser.c section.c
89
+ OBJS = constants.o dof_api.o dof_helper.o file.o generator.o header.o parser.o section.o
90
+ TARGET = dof_api
91
+ DLLIB = $(TARGET).bundle
92
+ EXTSTATIC =
93
+ STATIC_LIB =
94
+
95
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
96
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
97
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
98
+
99
+ TARGET_SO = $(DLLIB)
100
+ CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map
101
+ CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
102
+
103
+ all: $(DLLIB)
104
+ static: $(STATIC_LIB)
105
+
106
+ clean:
107
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
108
+
109
+ distclean: clean
110
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
111
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
112
+
113
+ realclean: distclean
114
+ install: install-so install-rb
115
+
116
+ install-so: $(RUBYARCHDIR)
117
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
118
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
119
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
120
+ install-rb: pre-install-rb install-rb-default
121
+ install-rb-default: pre-install-rb-default
122
+ pre-install-rb: Makefile
123
+ pre-install-rb-default: Makefile
124
+ $(RUBYARCHDIR):
125
+ $(MAKEDIRS) $@
126
+
127
+ site-install: site-install-so site-install-rb
128
+ site-install-so: install-so
129
+ site-install-rb: install-rb
130
+
131
+ .SUFFIXES: .c .m .cc .cxx .cpp .C .o
132
+
133
+ .cc.o:
134
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
135
+
136
+ .cxx.o:
137
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
138
+
139
+ .cpp.o:
140
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
141
+
142
+ .C.o:
143
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
144
+
145
+ .c.o:
146
+ $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
147
+
148
+ $(DLLIB): $(OBJS) Makefile
149
+ @-$(RM) $@
150
+ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
151
+
152
+
153
+
154
+ $(OBJS): ruby.h defines.h