event 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@
22
22
 
23
23
  #include <ruby.h>
24
24
 
25
- #define EVENT_BACKEND_URING
25
+ #define EVENT_SELECTOR_URING
26
26
 
27
- void Init_Event_Backend_URing(VALUE Event_Backend);
28
- VALUE Event_Backend_URing_select(VALUE self, VALUE duration);
27
+ void Init_Event_Selector_URing(VALUE Event_Selector);
28
+ VALUE Event_Selector_URing_select(VALUE self, VALUE duration);
data/lib/event.rb CHANGED
@@ -19,7 +19,7 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  require_relative 'event/version'
22
- require_relative 'event/backend'
22
+ require_relative 'event/selector'
23
23
 
24
24
  module Event
25
25
  # These constants are the same as those defined in IO.
@@ -0,0 +1,126 @@
1
+ # Copyright, 2021, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require "event/version"
22
+
23
+ module Event
24
+ class Debug
25
+ def initialize(selector)
26
+ @selector = selector
27
+
28
+ @readable = {}
29
+ @writable = {}
30
+ @priority = {}
31
+ end
32
+
33
+ def close
34
+ if @selector.nil?
35
+ raise "Selector already closed!"
36
+ end
37
+
38
+ @selector.close
39
+ @selector = nil
40
+ end
41
+
42
+ def transfer(fiber, *arguments)
43
+ @selector.transfer(fiber, *arguments)
44
+ end
45
+
46
+ def yield
47
+ @selector.yield
48
+ end
49
+
50
+ def push(fiber)
51
+ @selector.push(fiber)
52
+ end
53
+
54
+ def raise(fiber, *arguments)
55
+ @selector.raise(fiber, *arguments)
56
+ end
57
+
58
+ def ready?
59
+ @selector.ready?
60
+ end
61
+
62
+ def io_wait(fiber, io, events)
63
+ register_readable(fiber, io, events)
64
+ end
65
+
66
+ def select(duration = nil)
67
+ @selector.select(duration)
68
+ end
69
+
70
+ private
71
+
72
+ def register_readable(fiber, io, events)
73
+ if (events & READABLE) > 0
74
+ if @readable.key?(io)
75
+ raise "Cannot wait for #{io} to become readable from multiple fibers."
76
+ end
77
+
78
+ begin
79
+ @readable[io] = fiber
80
+
81
+ register_writable(fiber, io, events)
82
+ ensure
83
+ @readable.delete(io)
84
+ end
85
+ else
86
+ register_writable(fiber, io, events)
87
+ end
88
+ end
89
+
90
+ def register_writable(fiber, io, events)
91
+ if (events & WRITABLE) > 0
92
+ if @writable.key?(io)
93
+ raise "Cannot wait for #{io} to become writable from multiple fibers."
94
+ end
95
+
96
+ begin
97
+ @writable[io] = fiber
98
+
99
+ register_priority(fiber, io, events)
100
+ ensure
101
+ @writable.delete(io)
102
+ end
103
+ else
104
+ register_priority(fiber, io, events)
105
+ end
106
+ end
107
+
108
+ def register_priority(fiber, io, events)
109
+ if (events & PRIORITY) > 0
110
+ if @priority.key?(io)
111
+ raise "Cannot wait for #{io} to become priority from multiple fibers."
112
+ end
113
+
114
+ begin
115
+ @priority[io] = fiber
116
+
117
+ @selector.io_wait(fiber, io, events)
118
+ ensure
119
+ @priority.delete(io)
120
+ end
121
+ else
122
+ @selector.io_wait(fiber, io, events)
123
+ end
124
+ end
125
+ end
126
+ end
@@ -18,9 +18,32 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require "event/version"
21
+ require_relative 'selector/select'
22
22
 
23
23
  module Event
24
- class Selector
24
+ module Selector
25
+ def self.default(env = ENV)
26
+ if name = env['EVENT_SELECTOR']&.to_sym
27
+ if Event::Selector.const_defined?(name)
28
+ return Event::Selector.const_get(name)
29
+ else
30
+ warn "Could not find EVENT_SELECTOR=#{name}!"
31
+ end
32
+ end
33
+
34
+ if self.const_defined?(:URing)
35
+ return Event::Selector::URing
36
+ elsif self.const_defined?(:KQueue)
37
+ return Event::Selector::KQueue
38
+ elsif self.const_defined?(:EPoll)
39
+ return Event::Selector::EPoll
40
+ else
41
+ return Event::Selector::Select
42
+ end
43
+ end
44
+
45
+ def self.new(...)
46
+ default.new(...)
47
+ end
25
48
  end
26
49
  end
@@ -19,7 +19,7 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Event
22
- module Backend
22
+ module Selector
23
23
  class Select
24
24
  def initialize(loop)
25
25
  @loop = loop
@@ -36,18 +36,53 @@ module Event
36
36
  @writable = nil
37
37
  end
38
38
 
39
- def defer
40
- fiber = Fiber.current
41
- @ready.push(fiber)
39
+ Queue = Struct.new(:fiber) do
40
+ def transfer(*arguments)
41
+ fiber&.transfer(*arguments)
42
+ end
43
+
44
+ def alive?
45
+ fiber&.alive?
46
+ end
47
+
48
+ def nullify
49
+ self.fiber = nil
50
+ end
51
+ end
52
+
53
+ # Transfer from the current fiber to the specified fiber. Put the current fiber into the ready list.
54
+ def resume(fiber, *arguments)
55
+ queue = Queue.new(Fiber.current)
56
+ @ready.push(queue)
57
+
58
+ fiber.transfer(*arguments)
59
+ ensure
60
+ queue.nullify
61
+ end
62
+
63
+ # Yield from the current fiber back to the event loop. Put the current fiber into the ready list.
64
+ def yield
65
+ queue = Queue.new(Fiber.current)
66
+ @ready.push(queue)
67
+
42
68
  @loop.transfer
43
69
  ensure
44
- # Linear scan :(
45
- @ready.delete(fiber)
70
+ queue.nullify
71
+ end
72
+
73
+ # Append the given fiber into the ready list.
74
+ def push(fiber)
75
+ @ready.push(fiber)
46
76
  end
47
77
 
48
- def transfer(fiber)
49
- @ready.push(Fiber.current)
50
- fiber.transfer
78
+ # Transfer to the given fiber and raise an exception. Put the current fiber into the ready list.
79
+ def raise(fiber, *arguments)
80
+ queue = Queue.new(Fiber.current)
81
+ @ready.push(queue)
82
+
83
+ fiber.raise(*arguments)
84
+ ensure
85
+ queue.nullify
51
86
  end
52
87
 
53
88
  def ready?
@@ -138,9 +173,22 @@ module Event
138
173
  thread&.kill
139
174
  end
140
175
 
176
+ private def pop_ready
177
+ if @ready.any?
178
+ ready = @ready
179
+ @ready = Array.new
180
+
181
+ ready.each do |fiber|
182
+ fiber.transfer if fiber.alive?
183
+ end
184
+
185
+ return true
186
+ end
187
+ end
188
+
141
189
  def select(duration = nil)
142
- while @ready.any?
143
- @ready.pop.transfer
190
+ if pop_ready
191
+ duration = 0
144
192
  end
145
193
 
146
194
  readable, writable, _ = ::IO.select(@readable.keys, @writable.keys, nil, duration)
data/lib/event/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Event
2
- VERSION = "0.7.0"
2
+ VERSION = "0.9.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-13 00:00:00.000000000 Z
11
+ date: 2021-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bake
@@ -73,30 +73,22 @@ extensions:
73
73
  - ext/event/extconf.rb
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - ext/event/Makefile
77
- - ext/event/backend.o
78
- - ext/event/backend/backend.c
79
- - ext/event/backend/backend.h
80
- - ext/event/backend/epoll.c
81
- - ext/event/backend/epoll.h
82
- - ext/event/backend/kqueue.c
83
- - ext/event/backend/kqueue.h
84
- - ext/event/backend/pidfd.c
85
- - ext/event/backend/uring.c
86
- - ext/event/backend/uring.h
87
- - ext/event/event.bundle
88
76
  - ext/event/event.c
89
77
  - ext/event/event.h
90
- - ext/event/event.o
91
- - ext/event/extconf.h
92
78
  - ext/event/extconf.rb
93
- - ext/event/kqueue.o
94
- - ext/event/mkmf.log
79
+ - ext/event/selector/epoll.c
80
+ - ext/event/selector/epoll.h
81
+ - ext/event/selector/kqueue.c
82
+ - ext/event/selector/kqueue.h
83
+ - ext/event/selector/pidfd.c
84
+ - ext/event/selector/selector.c
85
+ - ext/event/selector/selector.h
86
+ - ext/event/selector/uring.c
87
+ - ext/event/selector/uring.h
95
88
  - lib/event.rb
96
- - lib/event/backend.rb
97
- - lib/event/backend/select.rb
98
- - lib/event/debug/selector.rb
89
+ - lib/event/debug.rb
99
90
  - lib/event/selector.rb
91
+ - lib/event/selector/select.rb
100
92
  - lib/event/version.rb
101
93
  homepage: https://github.com/socketry/event
102
94
  licenses:
@@ -117,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
109
  - !ruby/object:Gem::Version
118
110
  version: '0'
119
111
  requirements: []
120
- rubygems_version: 3.2.15
112
+ rubygems_version: 3.2.22
121
113
  signing_key:
122
114
  specification_version: 4
123
115
  summary: An event loop.
data/ext/event/Makefile DELETED
@@ -1,267 +0,0 @@
1
-
2
- SHELL = /bin/sh
3
-
4
- # V=0 quiet, V=1 verbose. other values don't work.
5
- V = 0
6
- Q1 = $(V:1=)
7
- Q = $(Q1:0=@)
8
- ECHO1 = $(V:1=@ :)
9
- ECHO = $(ECHO1:0=@ echo)
10
- NULLCMD = :
11
-
12
- #### Start of system configuration section. ####
13
-
14
- srcdir = .
15
- topdir = /Users/samuel/.rubies/ruby-3.0.1/include/ruby-3.0.0
16
- hdrdir = $(topdir)
17
- arch_hdrdir = /Users/samuel/.rubies/ruby-3.0.1/include/ruby-3.0.0/x86_64-darwin20
18
- PATH_SEPARATOR = :
19
- VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir)/backend
20
- prefix = $(DESTDIR)/Users/samuel/.rubies/ruby-3.0.1
21
- rubysitearchprefix = $(rubylibprefix)/$(sitearch)
22
- rubyarchprefix = $(rubylibprefix)/$(arch)
23
- rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
24
- exec_prefix = $(prefix)
25
- vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
26
- sitearchhdrdir = $(sitehdrdir)/$(sitearch)
27
- rubyarchhdrdir = $(rubyhdrdir)/$(arch)
28
- vendorhdrdir = $(rubyhdrdir)/vendor_ruby
29
- sitehdrdir = $(rubyhdrdir)/site_ruby
30
- rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
31
- vendorarchdir = $(vendorlibdir)/$(sitearch)
32
- vendorlibdir = $(vendordir)/$(ruby_version)
33
- vendordir = $(rubylibprefix)/vendor_ruby
34
- sitearchdir = $(sitelibdir)/$(sitearch)
35
- sitelibdir = $(sitedir)/$(ruby_version)
36
- sitedir = $(rubylibprefix)/site_ruby
37
- rubyarchdir = $(rubylibdir)/$(arch)
38
- rubylibdir = $(rubylibprefix)/$(ruby_version)
39
- sitearchincludedir = $(includedir)/$(sitearch)
40
- archincludedir = $(includedir)/$(arch)
41
- sitearchlibdir = $(libdir)/$(sitearch)
42
- archlibdir = $(libdir)/$(arch)
43
- ridir = $(datarootdir)/$(RI_BASE_NAME)
44
- mandir = $(datarootdir)/man
45
- localedir = $(datarootdir)/locale
46
- libdir = $(exec_prefix)/lib
47
- psdir = $(docdir)
48
- pdfdir = $(docdir)
49
- dvidir = $(docdir)
50
- htmldir = $(docdir)
51
- infodir = $(datarootdir)/info
52
- docdir = $(datarootdir)/doc/$(PACKAGE)
53
- oldincludedir = $(SDKROOT)/usr/include
54
- includedir = $(prefix)/include
55
- runstatedir = $(localstatedir)/run
56
- localstatedir = $(prefix)/var
57
- sharedstatedir = $(prefix)/com
58
- sysconfdir = $(prefix)/etc
59
- datadir = $(datarootdir)
60
- datarootdir = $(prefix)/share
61
- libexecdir = $(exec_prefix)/libexec
62
- sbindir = $(exec_prefix)/sbin
63
- bindir = $(exec_prefix)/bin
64
- archdir = $(rubyarchdir)
65
-
66
-
67
- CC_WRAPPER =
68
- CC = clang -fdeclspec
69
- CXX = clang++ -fdeclspec
70
- LIBRUBY = $(LIBRUBY_A)
71
- LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
72
- LIBRUBYARG_SHARED =
73
- LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static -framework Security -framework Foundation $(MAINLIBS)
74
- empty =
75
- OUTFLAG = -o $(empty)
76
- COUTFLAG = -o $(empty)
77
- CSRCFLAG = $(empty)
78
-
79
- RUBY_EXTCONF_H = extconf.h
80
- cflags = $(optflags) $(debugflags) $(warnflags)
81
- cxxflags =
82
- optflags = -O3
83
- debugflags = -ggdb3
84
- warnflags = -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens
85
- cppflags =
86
- CCDLFLAGS = -fno-common
87
- CFLAGS = $(CCDLFLAGS) $(cflags) -pipe -Wall $(ARCH_FLAG)
88
- INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
89
- DEFS =
90
- CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
91
- CXXFLAGS = $(CCDLFLAGS) $(ARCH_FLAG)
92
- ldflags = -L. -fstack-protector-strong -L/opt/local/lib
93
- dldflags = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/opt/local/lib
94
- ARCH_FLAG =
95
- DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
96
- LDSHARED = $(CC) -dynamic -bundle
97
- LDSHAREDXX = $(CXX) -dynamic -bundle
98
- AR = ar
99
- EXEEXT =
100
-
101
- RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
102
- RUBY_SO_NAME = ruby.3.0
103
- RUBYW_INSTALL_NAME =
104
- RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
105
- RUBYW_BASE_NAME = rubyw
106
- RUBY_BASE_NAME = ruby
107
-
108
- arch = x86_64-darwin20
109
- sitearch = $(arch)
110
- ruby_version = 3.0.0
111
- ruby = $(bindir)/$(RUBY_BASE_NAME)
112
- RUBY = $(ruby)
113
- ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h $(RUBY_EXTCONF_H)
114
-
115
- RM = rm -f
116
- RM_RF = $(RUBY) -run -e rm -- -rf
117
- RMDIRS = rmdir -p
118
- MAKEDIRS = /opt/local/bin/gmkdir -p
119
- INSTALL = /usr/bin/install -c
120
- INSTALL_PROG = $(INSTALL) -m 0755
121
- INSTALL_DATA = $(INSTALL) -m 644
122
- COPY = cp
123
- TOUCH = exit >
124
-
125
- #### End of system configuration section. ####
126
-
127
- preload =
128
- libpath = . $(libdir) /opt/local/lib
129
- LIBPATH = -L. -L$(libdir) -L/opt/local/lib
130
- DEFFILE =
131
-
132
- CLEANFILES = mkmf.log
133
- DISTCLEANFILES =
134
- DISTCLEANDIRS =
135
-
136
- extout =
137
- extout_prefix =
138
- target_prefix = /event
139
- LOCAL_LIBS =
140
- LIBS =
141
- ORIG_SRCS = event.c
142
- SRCS = $(ORIG_SRCS) event.c backend.c kqueue.c
143
- OBJS = event.o backend.o kqueue.o
144
- HDRS = $(srcdir)/event.h $(srcdir)/extconf.h
145
- LOCAL_HDRS =
146
- TARGET = event
147
- TARGET_NAME = event
148
- TARGET_ENTRY = Init_$(TARGET_NAME)
149
- DLLIB = $(TARGET).bundle
150
- EXTSTATIC =
151
- STATIC_LIB =
152
-
153
- TIMESTAMP_DIR = .
154
- BINDIR = $(bindir)
155
- RUBYCOMMONDIR = $(sitedir)$(target_prefix)
156
- RUBYLIBDIR = $(sitelibdir)$(target_prefix)
157
- RUBYARCHDIR = $(sitearchdir)$(target_prefix)
158
- HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
159
- ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
160
- TARGET_SO_DIR =
161
- TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
162
- CLEANLIBS = $(TARGET_SO)
163
- CLEANOBJS = *.o *.bak
164
-
165
- all: $(DLLIB)
166
- static: $(STATIC_LIB)
167
- .PHONY: all install static install-so install-rb
168
- .PHONY: clean clean-so clean-static clean-rb
169
-
170
- clean-static::
171
- clean-rb-default::
172
- clean-rb::
173
- clean-so::
174
- clean: clean-so clean-static clean-rb-default clean-rb
175
- -$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
176
-
177
- distclean-rb-default::
178
- distclean-rb::
179
- distclean-so::
180
- distclean-static::
181
- distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
182
- -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
183
- -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
184
- -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
185
-
186
- realclean: distclean
187
- install: install-so install-rb
188
-
189
- install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.-.event.time
190
- $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
191
- clean-static::
192
- -$(Q)$(RM) $(STATIC_LIB)
193
- install-rb: pre-install-rb do-install-rb install-rb-default
194
- install-rb-default: pre-install-rb-default do-install-rb-default
195
- pre-install-rb: Makefile
196
- pre-install-rb-default: Makefile
197
- do-install-rb:
198
- do-install-rb-default:
199
- pre-install-rb-default:
200
- @$(NULLCMD)
201
- $(TIMESTAMP_DIR)/.sitearchdir.-.event.time:
202
- $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
203
- $(Q) $(TOUCH) $@
204
-
205
- site-install: site-install-so site-install-rb
206
- site-install-so: install-so
207
- site-install-rb: install-rb
208
-
209
- .SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
210
-
211
- .cc.o:
212
- $(ECHO) compiling $(<)
213
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
214
-
215
- .cc.S:
216
- $(ECHO) translating $(<)
217
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
218
-
219
- .mm.o:
220
- $(ECHO) compiling $(<)
221
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
222
-
223
- .mm.S:
224
- $(ECHO) translating $(<)
225
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
226
-
227
- .cxx.o:
228
- $(ECHO) compiling $(<)
229
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
230
-
231
- .cxx.S:
232
- $(ECHO) translating $(<)
233
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
234
-
235
- .cpp.o:
236
- $(ECHO) compiling $(<)
237
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
238
-
239
- .cpp.S:
240
- $(ECHO) translating $(<)
241
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
242
-
243
- .c.o:
244
- $(ECHO) compiling $(<)
245
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
246
-
247
- .c.S:
248
- $(ECHO) translating $(<)
249
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
250
-
251
- .m.o:
252
- $(ECHO) compiling $(<)
253
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
254
-
255
- .m.S:
256
- $(ECHO) translating $(<)
257
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
258
-
259
- $(TARGET_SO): $(OBJS) Makefile
260
- $(ECHO) linking shared-object event/$(DLLIB)
261
- -$(Q)$(RM) $(@)
262
- $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
263
- $(Q) $(POSTLINK)
264
-
265
-
266
-
267
- $(OBJS): $(HDRS) $(ruby_headers)