|
|
|
SHELL = /bin/sh
|
|
|
|
#### Start of system configuration section. ####
|
|
|
|
srcdir = $(top_srcdir)/ext/socket
|
|
topdir = ../..
|
|
hdrdir = $(top_srcdir)
|
|
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
|
RUBYLIB = -
|
|
RUBYOPT = -rpurelib.rb
|
|
|
|
DESTDIR = C:
|
|
prefix = $(DESTDIR)/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby18_mingw
|
|
exec_prefix = $(DESTDIR)/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby18_mingw
|
|
sitedir = $(DESTDIR)/Users/Luis/Projects/oss/oci/rubyinstaller/sandbox/ruby18_mingw/lib/ruby/site_ruby
|
|
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
|
docdir = $(datarootdir)/doc/$(PACKAGE)
|
|
dvidir = $(docdir)
|
|
datarootdir = $(prefix)/share
|
|
top_srcdir = $(topdir)/../../../../ruby
|
|
archdir = $(rubylibdir)/$(arch)
|
|
sbindir = $(exec_prefix)/sbin
|
|
psdir = $(docdir)
|
|
localedir = $(datarootdir)/locale
|
|
htmldir = $(docdir)
|
|
datadir = $(datarootdir)
|
|
includedir = $(prefix)/include
|
|
infodir = $(datarootdir)/info
|
|
sysconfdir = $(prefix)/etc
|
|
mandir = $(datarootdir)/man
|
|
libdir = $(exec_prefix)/lib
|
|
sharedstatedir = $(prefix)/com
|
|
oldincludedir = $(DESTDIR)/usr/include
|
|
pdfdir = $(docdir)
|
|
sitearchdir = $(sitelibdir)/$(sitearch)
|
|
bindir = $(exec_prefix)/bin
|
|
localstatedir = $(prefix)/var
|
|
sitelibdir = $(sitedir)/$(ruby_version)
|
|
libexecdir = $(exec_prefix)/libexec
|
|
|
|
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
|
|
INCFLAGS = -I. -I../.. -I../../../../../../ruby -I../../../../../../ruby/ext/socket
|
|
DEFS =
|
|
CPPFLAGS = -DHAVE_SOCKADDR_STORAGE -DHAVE_INET_NTOA -DHAVE_GETSERVBYPORT -Dsocklen_t=int -DHAVE_WSACLEANUP -DHAVE_GETHOSTNAME -I.
|
|
CXXFLAGS = $(CFLAGS)
|
|
DLDFLAGS = -L. -Wl,--enable-auto-image-base,--enable-auto-import,--export-all
|
|
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 = $(topdir)/miniruby.exe -I'$(topdir)' -I'$(top_srcdir)/lib' -I'$(extout)/$(arch)' -I'$(extout)/common' -I'$(hdrdir)/ext' -rpurelib.rb
|
|
RUBY = $(ruby)
|
|
RM = rm -f
|
|
MAKEDIRS = install -d
|
|
INSTALL = /usr/bin/install -c
|
|
INSTALL_PROG = $(INSTALL) -m 0755
|
|
INSTALL_DATA = $(INSTALL) -m 644
|
|
COPY = cp
|
|
|
|
#### End of system configuration section. ####
|
|
|
|
preload =
|
|
|
|
libpath = . $(topdir)
|
|
LIBPATH = -L. -L$(topdir)
|
|
DEFFILE =
|
|
|
|
CLEANFILES = mkmf.log
|
|
DISTCLEANFILES =
|
|
|
|
extout = $(topdir)/.ext
|
|
extout_prefix = $(extout)$(target_prefix)/
|
|
target_prefix =
|
|
LOCAL_LIBS =
|
|
LIBS = $(LIBRUBYARG_SHARED) -lws2_32 -lshell32 -lws2_32
|
|
SRCS = socket.c getaddrinfo.c getnameinfo.c
|
|
OBJS = socket.o getaddrinfo.o getnameinfo.o
|
|
TARGET = socket
|
|
DLLIB = $(TARGET).so
|
|
EXTSTATIC =
|
|
STATIC_LIB = $(TARGET).a
|
|
|
|
RUBYCOMMONDIR = $(extout)/common
|
|
RUBYLIBDIR = $(RUBYCOMMONDIR)$(target_prefix)
|
|
RUBYARCHDIR = $(extout)/$(arch)$(target_prefix)
|
|
|
|
TARGET_SO = $(RUBYARCHDIR)/$(DLLIB)
|
|
CLEANLIBS = $(RUBYARCHDIR)/$(TARGET).so $(RUBYARCHDIR)/$(TARGET).il? $(RUBYARCHDIR)/$(TARGET).tds $(RUBYARCHDIR)/$(TARGET).map
|
|
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
|
|
|
|
all: install
|
|
static: $(STATIC_LIB) install-rb
|
|
|
|
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)
|
|
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 $<
|
|
|
|
$(RUBYARCHDIR)/$(DLLIB): $(OBJS) Makefile
|
|
@-$(RM) $@
|
|
@-$(MAKEDIRS) $(@D)
|
|
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
|
|
|
$(STATIC_LIB): $(OBJS)
|
|
$(AR) cru $@ $(OBJS)
|
|
@-ranlib $(DLLIB) 2> /dev/null || true
|
|
|
|
###
|
|
socket.o : socket.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/rubyio.h $(hdrdir)/rubysig.h sockport.h
|
|
getnameinfo.o: getnameinfo.c $(topdir)/config.h addrinfo.h sockport.h
|
|
getaddrinfo.o: getaddrinfo.c $(topdir)/config.h addrinfo.h sockport.h
|