forked from rkh/mixico
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated local to match joint project
- Loading branch information
Showing
15 changed files
with
372 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# -*- coding: utf-8 -*- | ||
direc = File.dirname(__FILE__) | ||
dlext = Config::CONFIG['DLEXT'] | ||
|
||
require 'rake/clean' | ||
require 'rake/gempackagetask' | ||
require './lib/mixico/version' | ||
|
||
CLEAN.include("ext/**/*.#{dlext}", "ext/**/*.log", "ext/**/*.o", "ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "ext/**/*.def", "ext/**/*.pdb") | ||
CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o") | ||
|
||
def apply_spec_defaults(s) | ||
s.name = "mixico" | ||
s.version = Mixico::VERSION | ||
s.summary = "mixin hijinks — enable and disable mixins" | ||
s.description = s.summary | ||
s.files = Dir['COPYING', 'README', '**/*.rb', '**/*.c', '**/*.h'] | ||
s.authors = ["why the lucky stiff", "Konstantin Haase", "John Mair (banisterfiend)"] | ||
s.email = "konstantin.mailinglists@googlemail.com" | ||
s.homepage = "http://github.com/rkh/mixico/tree" | ||
s.has_rdoc = 'yard' | ||
end | ||
|
||
task :test do | ||
sh "bacon -k #{direc}/test/test.rb" | ||
end | ||
|
||
[:mingw32, :mswin32].each do |v| | ||
namespace v do | ||
spec = Gem::Specification.new do |s| | ||
apply_spec_defaults(s) | ||
s.platform = "i386-#{v}" | ||
s.files += FileList["lib/**/*.#{dlext}"].to_a | ||
end | ||
|
||
Rake::GemPackageTask.new(spec) do |pkg| | ||
pkg.need_zip = false | ||
pkg.need_tar = false | ||
end | ||
end | ||
end | ||
|
||
namespace :ruby do | ||
spec = Gem::Specification.new do |s| | ||
apply_spec_defaults(s) | ||
s.platform = Gem::Platform::RUBY | ||
s.extensions = ["ext/mixico/extconf.rb"] | ||
end | ||
|
||
Rake::GemPackageTask.new(spec) do |pkg| | ||
pkg.need_zip = false | ||
pkg.need_tar = false | ||
end | ||
end | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
|
||
SHELL = /bin/sh | ||
|
||
#### Start of system configuration section. #### | ||
|
||
srcdir = . | ||
topdir = /C/ruby187/lib/ruby/1.8/i386-mingw32 | ||
hdrdir = $(topdir) | ||
VPATH = $(srcdir):$(topdir):$(hdrdir) | ||
|
||
DESTDIR = C: | ||
exec_prefix = $(prefix) | ||
prefix = $(DESTDIR)/ruby187 | ||
sharedstatedir = $(prefix)/com | ||
mandir = $(datarootdir)/man | ||
psdir = $(docdir) | ||
oldincludedir = $(DESTDIR)/usr/include | ||
localedir = $(datarootdir)/locale | ||
bindir = $(exec_prefix)/bin | ||
libexecdir = $(exec_prefix)/libexec | ||
sitedir = $(libdir)/ruby/site_ruby | ||
htmldir = $(docdir) | ||
vendorarchdir = $(vendorlibdir)/$(sitearch) | ||
includedir = $(prefix)/include | ||
infodir = $(datarootdir)/info | ||
vendorlibdir = $(vendordir)/$(ruby_version) | ||
sysconfdir = $(prefix)/etc | ||
libdir = $(exec_prefix)/lib | ||
sbindir = $(exec_prefix)/sbin | ||
rubylibdir = $(libdir)/ruby/$(ruby_version) | ||
docdir = $(datarootdir)/doc/$(PACKAGE) | ||
dvidir = $(docdir) | ||
vendordir = $(libdir)/ruby/vendor_ruby | ||
datarootdir = $(prefix)/share | ||
pdfdir = $(docdir) | ||
archdir = $(rubylibdir)/$(arch) | ||
sitearchdir = $(sitelibdir)/$(sitearch) | ||
datadir = $(datarootdir) | ||
localstatedir = $(prefix)/var | ||
sitelibdir = $(sitedir)/$(ruby_version) | ||
|
||
CC = gcc | ||
LIBRUBY = lib$(LIBRUBY_SO).a | ||
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a | ||
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME) | ||
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static | ||
|
||
RUBY_EXTCONF_H = | ||
CFLAGS = -g -O2 -DFD_SETSIZE=256 $(cflags) | ||
INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) | ||
DEFS = | ||
CPPFLAGS = $(DEFS) $(cppflags) | ||
CXXFLAGS = $(CFLAGS) | ||
ldflags = -L. | ||
dldflags = -Wl,--enable-auto-image-base,--enable-auto-import,--export-all | ||
archflag = | ||
DLDFLAGS = $(ldflags) $(dldflags) $(archflag) | ||
LDSHARED = gcc -shared -s | ||
AR = ar | ||
EXEEXT = .exe | ||
|
||
RUBY_INSTALL_NAME = ruby | ||
RUBY_SO_NAME = msvcrt-ruby18 | ||
arch = i386-mingw32 | ||
sitearch = i386-msvcrt | ||
ruby_version = 1.8 | ||
ruby = C:/ruby187/bin/ruby | ||
RUBY = $(ruby) | ||
RM = rm -f | ||
MAKEDIRS = install -d | ||
INSTALL = /bin/install -c | ||
INSTALL_PROG = $(INSTALL) -m 0755 | ||
INSTALL_DATA = $(INSTALL) -m 644 | ||
COPY = cp | ||
|
||
#### End of system configuration section. #### | ||
|
||
preload = | ||
|
||
libpath = . $(libdir) | ||
LIBPATH = -L. -L$(libdir) | ||
DEFFILE = | ||
|
||
CLEANFILES = mkmf.log | ||
DISTCLEANFILES = | ||
|
||
extout = | ||
extout_prefix = | ||
target_prefix = | ||
LOCAL_LIBS = | ||
LIBS = $(LIBRUBYARG_SHARED) -lshell32 -lws2_32 | ||
SRCS = mixico.c | ||
OBJS = mixico.o | ||
TARGET = mixico | ||
DLLIB = $(TARGET).so | ||
EXTSTATIC = | ||
STATIC_LIB = | ||
|
||
BINDIR = $(bindir) | ||
RUBYCOMMONDIR = $(sitedir)$(target_prefix) | ||
RUBYLIBDIR = $(sitelibdir)$(target_prefix) | ||
RUBYARCHDIR = $(sitearchdir)$(target_prefix) | ||
|
||
TARGET_SO = $(DLLIB) | ||
CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map | ||
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak | ||
|
||
all: $(DLLIB) | ||
static: $(STATIC_LIB) | ||
|
||
clean: | ||
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) | ||
|
||
distclean: clean | ||
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log | ||
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES) | ||
|
||
realclean: distclean | ||
install: install-so install-rb | ||
|
||
install-so: $(RUBYARCHDIR) | ||
install-so: $(RUBYARCHDIR)/$(DLLIB) | ||
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB) | ||
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) | ||
install-rb: pre-install-rb install-rb-default | ||
install-rb-default: pre-install-rb-default | ||
pre-install-rb: Makefile | ||
pre-install-rb-default: Makefile | ||
$(RUBYARCHDIR): | ||
$(MAKEDIRS) $@ | ||
|
||
site-install: site-install-so site-install-rb | ||
site-install-so: install-so | ||
site-install-rb: install-rb | ||
|
||
.SUFFIXES: .c .m .cc .cxx .cpp .o | ||
|
||
.cc.o: | ||
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< | ||
|
||
.cxx.o: | ||
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< | ||
|
||
.cpp.o: | ||
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< | ||
|
||
.c.o: | ||
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $< | ||
|
||
$(DLLIB): $(OBJS) Makefile | ||
@-$(RM) $@ | ||
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) | ||
|
||
|
||
|
||
$(OBJS): ruby.h defines.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
require 'mkmf' | ||
|
||
# 1.9 compatibility | ||
$CFLAGS += " -DRUBY_19" if RUBY_VERSION =~ /1.9/ | ||
|
||
create_makefile("cmixico") | ||
create_makefile("mixico") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
EXPORTS | ||
Init_mixico |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.