advantage 0.1.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ /*====================================================
2
+ *
3
+ * Copyright 2008-2011 iAnywhere Solutions, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ *
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ *
20
+ *====================================================*/
data/README ADDED
@@ -0,0 +1,123 @@
1
+ =Advantage Database Ruby Driver
2
+
3
+ This is a native Advantage Database driver for Ruby. This driver
4
+ is intended to be a base-level library to be used by interface libraries
5
+ such as ActiveRecord.
6
+
7
+ This driver can be used with Advantage Database 11 and later versions.
8
+
9
+ This driver is licensed under the Apache License, Version 2.
10
+
11
+ ==Build Instructions
12
+
13
+ ===Requirements
14
+ * C Compiler
15
+ * Ruby
16
+ * RubyGem Package manager
17
+
18
+
19
+ ===All Platforms
20
+
21
+ To build the library (.so), use:
22
+
23
+ rake
24
+
25
+ To build and install the gem, use:
26
+
27
+ rake gem
28
+ rake install
29
+
30
+ The other rake tasks are
31
+
32
+ rake clean -> Cleans up all temp files (ex *.~)
33
+ rake clobber -> Cleans up all built files (ex *.gem, *.o, *.so)
34
+
35
+ ===Additional Install Notes for Windows
36
+
37
+ The popular One-Click Ruby Installer for Windows (RubyInstaller) is built using
38
+ Microsoft Visual C++ 6.0. Since problems can arise by combining binaries from
39
+ different compilers, we advise you use this compiler.
40
+
41
+ If you want to use a more recent version of the MS C++ compiler, you will need to make a few changes:
42
+
43
+ 1. Open the file: <RUBY DIR>\lib\ruby\1.8\i386-mswin32\config.h, and comment out the first three lines so they look like:
44
+
45
+ //#if _MSC_VER != 1200
46
+ //#error MSC version unmatch
47
+ //#endif
48
+
49
+ This removes the check for C++ Version 6.0
50
+
51
+ 2. Open <tt>rakefile</tt> and set:
52
+
53
+ APPLY_MANIFEST = true
54
+
55
+ This will add the manifest to the compiled binaries.
56
+
57
+ By default, rake will attempt to use Microsoft <tt>nmake</tt> when building under Windows. To use another make program, set:
58
+
59
+ USE_NMAKE_ON_WIN = FALSE
60
+
61
+ ==Running Unit Tests
62
+
63
+ 1. Change to the the <tt>test</tt> directory
64
+
65
+ cd test
66
+
67
+ 2. Create a testing database:
68
+
69
+ Use ARC to create a new database either via the "CTRL-W" in ARC shortcut or using the
70
+ CREATE DATABASE SQLstatement. For example:
71
+ CREATE DATABASE [c:\test\ruby.add];
72
+
73
+ 3. Create the test schema:
74
+
75
+ Open the test.sql within ARC while connected to the test database and execute the script.
76
+
77
+ 5. Run the unit tests:
78
+
79
+ ruby advantage_test.rb
80
+
81
+ ==Sample
82
+
83
+ This script makes a connection, prints <tt>Successful Ruby Connection</tt> to Advantage, then disconnects.
84
+
85
+ # load the Advantage gem
86
+ begin
87
+ require 'rubygems'
88
+ gem 'advantage'
89
+ unless defined? Advantage
90
+ require 'advantage'
91
+ end
92
+ end
93
+
94
+ # create an interface
95
+ api = Advantage::AdvantageInterface.new()
96
+
97
+ # initialize the interface (loads the DLL/SO)
98
+ Advantage::API.ads_initialize_interface( api )
99
+
100
+ # initialize our api object
101
+ api.ads_init()
102
+
103
+ # create a connection
104
+ conn = api.ads_new_connection()
105
+
106
+ # establish a connection
107
+ api.ads_connect(conn, "data source=c:\\test\\ruby.add;user id=adssys;")
108
+
109
+ # execute a query without a result set
110
+ api.ads_execute_immediate(conn, "select 'Successful Ruby Connection' from system.iota;")
111
+
112
+ # disconnect from the database
113
+ api.ads_disconnect(conn)
114
+
115
+ # free the connection resources
116
+ api.ads_free_connection(conn)
117
+
118
+ # free resources the api object uses
119
+ api.ads_fini()
120
+
121
+ # close the interface
122
+ Advantage::API.ads_finalize_interface( api )
123
+
@@ -0,0 +1,186 @@
1
+ #====================================================
2
+ #
3
+ # Copyright 2008-2010 iAnywhere Solutions, Inc.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ #
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+ #
20
+ #====================================================
21
+
22
+ require 'fileutils'
23
+ require 'rbconfig'
24
+ require 'rake/clean'
25
+ require 'rdoc/task'
26
+ require 'rubygems'
27
+ require 'rubygems/builder'
28
+
29
+ # By default, windows will try to use nmake instead of make. If you are on windows but using
30
+ # a different compiler that uses standard make, set this to false.
31
+ USE_NMAKE_ON_WIN = true
32
+
33
+ # By default on windows, ruby expects to be compiled by Visual Studio C++ 6.0. If you are using
34
+ # a newer version of Visual Studio, you will need to apply a manifest to the dll. To apply the
35
+ # manifest set this to true.
36
+ #EJS was set to false
37
+ APPLY_MANIFEST = false
38
+
39
+ PACKAGE_NAME = "advantage"
40
+ ARCH=RbConfig::CONFIG['arch']
41
+
42
+ Dir.mkdir('lib') unless File.directory?('lib')
43
+ pkg_version = ""
44
+
45
+ library_file = ARCH =~ /darwin/ ? "advantage.bundle" : "advantage.so"
46
+
47
+ # The package version of determined by parsing the c source file. This ensures the version is
48
+ # only ever specified ins a single place.
49
+ File.open(File.join("ext", "advantage.c") ) do |f|
50
+ f.grep( /const char\* VERSION/ ) do |line|
51
+ pkg_version = /\s*const char\* VERSION\s*=\s*["|']([^"']*)["|'];\s*/.match(line)[1]
52
+ end
53
+ end
54
+
55
+ # If we can't determine the version, throw up your hands and exit
56
+ raise RuntimeError, "Could not determine current package version!" if pkg_version.empty?
57
+
58
+ MAKE = (ARCH =~ /win32/ and USE_NMAKE_ON_WIN) ? 'nmake' : 'make'
59
+
60
+ spec = Gem::Specification.new do |spec|
61
+ spec.authors = ["Edgar Sherman"]
62
+ spec.email = 'advantage@sybase.com'
63
+ spec.name = 'advantage'
64
+ spec.summary = 'Advantage library for Ruby'
65
+ spec.description = <<-EOF
66
+ Advantage Driver for Ruby
67
+ EOF
68
+ spec.version = pkg_version
69
+ #spec.autorequire = 'advantage'
70
+ spec.has_rdoc = true
71
+ spec.homepage = 'http://devzone.advantagedatabase.com'
72
+ spec.required_ruby_version = '>= 1.8.6'
73
+ spec.require_paths = ['lib']
74
+ spec.test_file = 'test/advantage_test.rb'
75
+ spec.rdoc_options << '--title' << 'Advantage Ruby Driver' <<
76
+ '--main' << 'README' <<
77
+ '--line-numbers'
78
+ spec.extra_rdoc_files = ['README', 'LICENSE', 'ext/advantage.c']
79
+ end
80
+
81
+ # The default task is to build the library (.dll or .so)
82
+ desc "Build the library"
83
+ task :default => [File.join("lib", library_file)]
84
+
85
+ # Builds the binary gem for this platform
86
+ desc "Build the gem"
87
+ task :gem => ["advantage-#{pkg_version}-#{spec.platform}.gem"]
88
+
89
+ file "advantage-#{pkg_version}-#{spec.platform}.gem" => ["Rakefile",
90
+ "test/test.sql",
91
+ "test/advantage_test.rb",
92
+ "README",
93
+ "LICENSE",
94
+ File.join("lib", library_file)] do
95
+ # Get the updated list of files to include in the gem
96
+ spec.files = Dir['ext/**/*'] + Dir['lib/**/*'] + Dir['test/**/*'] + Dir['LICENSE'] + Dir['README'] + Dir['Rakefile']
97
+ # Set the gem to be platform specific since it includes compiled binaries
98
+ spec.platform = Gem::Platform::CURRENT
99
+ #spec.extensions = ''
100
+ Gem::Builder.new(spec).build
101
+ end
102
+
103
+ # Builds the source gem for any platform
104
+ desc "Build the source gem"
105
+ task :source_gem => ["advantage-#{pkg_version}.gem"]
106
+
107
+ file "advantage-#{pkg_version}.gem" => ["Rakefile",
108
+ "test/test.sql",
109
+ "test/advantage_test.rb",
110
+ "README",
111
+ "LICENSE"] do
112
+ # Get the updated list of files to include in the gem
113
+ spec.files = Dir['ext/**/*'] + Dir['lib/**/*'] + Dir['test/**/*'] + Dir['LICENSE'] + Dir['README'] + Dir['Rakefile']
114
+ # Since this contains no compilked binaries, set it to be platform RUBY
115
+ spec.extensions = 'ext/extconf.rb'
116
+ Gem::Builder.new(spec).build
117
+ end
118
+
119
+ file File.join("lib", library_file) => [File.join("ext", library_file)] do
120
+ FileUtils.copy(File.join("ext", library_file), "lib")
121
+ end
122
+
123
+ file File.join("ext", library_file) => ["ext/advantage.c"] do
124
+ sh "cd ext && ruby extconf.rb"
125
+ sh "cd ext && #{MAKE}"
126
+ sh "cd ext && mt -outputresource:advantage.so;2 -manifest advantage.so.manifest" if APPLY_MANIFEST
127
+ end
128
+
129
+ desc "Install the gem"
130
+ task :install => [:gem] do
131
+ sh "gem install advantage-#{pkg_version}-#{spec.platform}.gem"
132
+ end
133
+
134
+ # This builds the distributables. On windows it builds a platform specific gem, a source gem, and a souce zip archive.
135
+ # On other platforms this builds a platform specific gem, a source gem, and a source tar.gz archive.
136
+ desc "Build distributables (src zip, src tar.gz, gem)"
137
+ task :dist do |t|
138
+ puts "Cleaning Build Environment..."
139
+ Rake.application['clobber'].invoke
140
+
141
+ files = Dir.glob('*')
142
+
143
+ puts "Creating #{File.join('build', PACKAGE_NAME)}-#{pkg_version} directory..."
144
+ FileUtils.mkdir_p "#{File.join('build', PACKAGE_NAME)}-#{pkg_version}"
145
+
146
+ puts "Copying files to #{File.join('build', PACKAGE_NAME)}-#{pkg_version}..."
147
+ FileUtils.cp_r files, "#{File.join('build', PACKAGE_NAME)}-#{pkg_version}"
148
+
149
+ if( ARCH =~ /win32/ ) then
150
+ system "attrib -R #{File.join('build', PACKAGE_NAME)}-#{pkg_version} /S"
151
+ else
152
+ system "find #{File.join('build', PACKAGE_NAME)}-#{pkg_version} -type d -exec chmod 755 {} \\;"
153
+ system "find #{File.join('build', PACKAGE_NAME)}-#{pkg_version} -type f -exec chmod 644 {} \\;"
154
+ end
155
+
156
+ if( ARCH =~ /win32/ ) then
157
+ puts "Creating #{File.join('build', PACKAGE_NAME)}-#{pkg_version}.zip..."
158
+ system "cd build && zip -q -r #{PACKAGE_NAME}-#{pkg_version}.zip #{PACKAGE_NAME}-#{pkg_version}"
159
+ else
160
+ puts "Creating #{File.join('build', PACKAGE_NAME)}-#{pkg_version}.tar..."
161
+ system "tar cf #{File.join('build', PACKAGE_NAME)}-#{pkg_version}.tar -C build #{PACKAGE_NAME}-#{pkg_version}"
162
+
163
+ puts "GZipping to create #{File.join('build', PACKAGE_NAME, PACKAGE_NAME)}-#{pkg_version}.tar.gz..."
164
+ system "gzip #{File.join('build', PACKAGE_NAME)}-#{pkg_version}.tar"
165
+ end
166
+
167
+ puts "Building GEM source distributable..."
168
+ Rake.application['source_gem'].invoke
169
+
170
+ puts "Copying source GEM to #{File.join('build', PACKAGE_NAME)}-#{pkg_version}.gem..."
171
+ FileUtils.cp "#{PACKAGE_NAME}-#{pkg_version}.gem", "build"
172
+
173
+ puts "Building GEM binary distributable..."
174
+ Rake.application['gem'].invoke
175
+
176
+ puts "Copying binary GEM to #{File.join('build', PACKAGE_NAME)}-#{pkg_version}-#{spec.platform}.gem..."
177
+ FileUtils.cp "#{PACKAGE_NAME}-#{pkg_version}-#{spec.platform}.gem", "build"
178
+ end
179
+
180
+ RDoc::Task.new do |rd|
181
+ rd.title = "Advantage Ruby Driver"
182
+ rd.main = "README"
183
+ rd.rdoc_files.include('README', 'LICENSE', 'ext/advantage.c')
184
+ end
185
+
186
+ CLOBBER.include("advantage-#{pkg_version}-#{spec.platform}.gem", "advantage-#{pkg_version}.gem", "lib/*", "ext/*.obj", "ext/*.def", "ext/*.so", "ext/*.bundle", "ext/*.log", "ext/*.exp", "ext/*.lib", "ext/*.pdb", "ext/Makefile", "ext/*.so.manifest", "ext/*.o", "build/**/*", "build")
@@ -0,0 +1,215 @@
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
+ n=$(NULLCMD)
9
+ ECHO1 = $(V:1=@$n)
10
+ ECHO = $(ECHO1:0=@echo)
11
+
12
+ #### Start of system configuration section. ####
13
+
14
+ srcdir = .
15
+ topdir = /C/Ruby193/include/ruby-1.9.1
16
+ hdrdir = /C/Ruby193/include/ruby-1.9.1
17
+ arch_hdrdir = C:/Ruby193/include/ruby-1.9.1/$(arch)
18
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
19
+
20
+ DESTDIR = C:
21
+ prefix = $(DESTDIR)/Ruby193
22
+ rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
23
+ exec_prefix = $(prefix)
24
+ vendorhdrdir = $(rubyhdrdir)/vendor_ruby
25
+ sitehdrdir = $(rubyhdrdir)/site_ruby
26
+ rubyhdrdir = $(includedir)/$(RUBY_BASE_NAME)-$(ruby_version)
27
+ vendordir = $(rubylibprefix)/vendor_ruby
28
+ sitedir = $(rubylibprefix)/site_ruby
29
+ ridir = $(datarootdir)/$(RI_BASE_NAME)
30
+ mandir = $(datarootdir)/man
31
+ localedir = $(datarootdir)/locale
32
+ libdir = $(exec_prefix)/lib
33
+ psdir = $(docdir)
34
+ pdfdir = $(docdir)
35
+ dvidir = $(docdir)
36
+ htmldir = $(docdir)
37
+ infodir = $(datarootdir)/info
38
+ docdir = $(datarootdir)/doc/$(PACKAGE)
39
+ oldincludedir = $(DESTDIR)/usr/include
40
+ includedir = $(prefix)/include
41
+ localstatedir = $(prefix)/var
42
+ sharedstatedir = $(prefix)/com
43
+ sysconfdir = $(prefix)/etc
44
+ datadir = $(datarootdir)
45
+ datarootdir = $(prefix)/share
46
+ libexecdir = $(exec_prefix)/libexec
47
+ sbindir = $(exec_prefix)/sbin
48
+ bindir = $(exec_prefix)/bin
49
+ rubylibdir = $(rubylibprefix)/$(ruby_version)
50
+ archdir = $(rubylibdir)/$(arch)
51
+ sitelibdir = $(sitedir)/$(ruby_version)
52
+ sitearchdir = $(sitelibdir)/$(sitearch)
53
+ vendorlibdir = $(vendordir)/$(ruby_version)
54
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
55
+
56
+ NULLCMD = :
57
+
58
+ CC = gcc
59
+ CXX = g++
60
+ LIBRUBY = lib$(RUBY_SO_NAME).dll.a
61
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
62
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
63
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
64
+ OUTFLAG = -o
65
+ COUTFLAG = -o
66
+
67
+ RUBY_EXTCONF_H =
68
+ cflags = $(optflags) $(debugflags) $(warnflags)
69
+ optflags = -O3 -fno-omit-frame-pointer
70
+ debugflags = -g
71
+ warnflags = -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
72
+ CFLAGS = $(cflags) $(ARCH_FLAG)
73
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
74
+ DEFS =
75
+ CPPFLAGS = $(DEFS) $(cppflags)
76
+ CXXFLAGS = $(CFLAGS) $(cxxflags)
77
+ ldflags = -L.
78
+ dldflags = -Wl,--enable-auto-image-base,--enable-auto-import $(DEFFILE)
79
+ ARCH_FLAG =
80
+ DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
81
+ LDSHARED = $(CC) -shared $(if $(filter-out -g -g0,$(debugflags)),,-s)
82
+ LDSHAREDXX = $(CXX) -shared $(if $(filter-out -g -g0,$(debugflags)),,-s)
83
+ AR = ar
84
+ EXEEXT = .exe
85
+
86
+ RUBY_BASE_NAME = ruby
87
+ RUBY_INSTALL_NAME = ruby
88
+ RUBY_SO_NAME = msvcrt-ruby191
89
+ arch = i386-mingw32
90
+ sitearch = i386-msvcrt
91
+ ruby_version = 1.9.1
92
+ ruby = C:/Ruby193/bin/ruby
93
+ RUBY = $(ruby)
94
+ RM = rm -f
95
+ RM_RF = $(RUBY) -run -e rm -- -rf
96
+ RMDIRS = rmdir --ignore-fail-on-non-empty -p
97
+ MAKEDIRS = /usr/bin/mkdir -p
98
+ INSTALL = /usr/bin/install -c
99
+ INSTALL_PROG = $(INSTALL) -m 0755
100
+ INSTALL_DATA = $(INSTALL) -m 644
101
+ COPY = cp
102
+
103
+ #### End of system configuration section. ####
104
+
105
+ preload =
106
+
107
+ libpath = . $(libdir)
108
+ LIBPATH = -L. -L$(libdir)
109
+ DEFFILE = $(TARGET)-$(arch).def
110
+
111
+ CLEANFILES = mkmf.log $(DEFFILE)
112
+ DISTCLEANFILES =
113
+ DISTCLEANDIRS =
114
+
115
+ extout =
116
+ extout_prefix =
117
+ target_prefix =
118
+ LOCAL_LIBS =
119
+ LIBS = $(LIBRUBYARG_SHARED) -lshell32 -lws2_32 -limagehlp
120
+ SRCS = adscapidll.c advantage.c
121
+ OBJS = adscapidll.o advantage.o
122
+ TARGET = advantage
123
+ DLLIB = $(TARGET).so
124
+ EXTSTATIC =
125
+ STATIC_LIB =
126
+
127
+ BINDIR = $(bindir)
128
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
129
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
130
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
131
+ HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
132
+ ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
133
+
134
+ TARGET_SO = $(DLLIB)
135
+ CLEANLIBS = $(TARGET).so
136
+ CLEANOBJS = *.o *.bak
137
+
138
+ all: $(DLLIB)
139
+ static: $(STATIC_LIB)
140
+ .PHONY: all install static install-so install-rb
141
+ .PHONY: clean clean-so clean-rb
142
+
143
+ clean-rb-default::
144
+ clean-rb::
145
+ clean-so::
146
+ clean: clean-so clean-rb-default clean-rb
147
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
148
+
149
+ distclean-rb-default::
150
+ distclean-rb::
151
+ distclean-so::
152
+ distclean: clean distclean-so distclean-rb-default distclean-rb
153
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
154
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
155
+ @-$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
156
+
157
+ realclean: distclean
158
+ install: install-so install-rb
159
+
160
+ install-so: $(RUBYARCHDIR)
161
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
162
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
163
+ @-$(MAKEDIRS) $(@D)
164
+ $(INSTALL_PROG) $(DLLIB) $(@D)
165
+ install-rb: pre-install-rb install-rb-default
166
+ install-rb-default: pre-install-rb-default
167
+ pre-install-rb: Makefile
168
+ pre-install-rb-default: Makefile
169
+ pre-install-rb-default:
170
+ $(ECHO) installing default advantage libraries
171
+ $(RUBYARCHDIR):
172
+ $(Q) $(MAKEDIRS) $@
173
+
174
+ site-install: site-install-so site-install-rb
175
+ site-install-so: install-so
176
+ site-install-rb: install-rb
177
+
178
+ .SUFFIXES: .c .m .cc .mm .cxx .cpp .o
179
+
180
+ .cc.o:
181
+ $(ECHO) compiling $(<)
182
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
183
+
184
+ .mm.o:
185
+ $(ECHO) compiling $(<)
186
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
187
+
188
+ .cxx.o:
189
+ $(ECHO) compiling $(<)
190
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
191
+
192
+ .cpp.o:
193
+ $(ECHO) compiling $(<)
194
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
195
+
196
+ .c.o:
197
+ $(ECHO) compiling $(<)
198
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
199
+
200
+ .m.o:
201
+ $(ECHO) compiling $(<)
202
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
203
+
204
+ $(DLLIB): $(DEFFILE) $(OBJS) Makefile
205
+ $(ECHO) linking shared-object $(DLLIB)
206
+ @-$(RM) $(@)
207
+ $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
208
+
209
+
210
+
211
+ $(DEFFILE):
212
+ $(ECHO) generating $(@)
213
+ $(Q) $(RUBY) -e "puts 'EXPORTS', '' + 'Init_$(TARGET)'.sub(/\..*\z/,'')" > $@
214
+
215
+ $(OBJS): $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h