SHELL = /bin/sh #### Start of system configuration section. #### top_srcdir = $(topdir)/. srcdir = $(top_srcdir)/ext/openssl topdir = ../.. hdrdir = $(top_srcdir)/include arch_hdrdir = $(extout)/include/$(arch) VPATH = $(srcdir);$(arch_hdrdir)/ruby;$(hdrdir)/ruby RUBYLIB = - RUBYOPT = -r$(top_srcdir)/ext/purelib.rb DESTDIR = C: prefix = $(DESTDIR)//ruby exec_prefix = $(prefix) rubylibprefix = $(prefix)/lib/$(RUBY_BASE_NAME) bindir = $(exec_prefix)/bin sbindir = $(exec_prefix)/sbin libexecdir = $(exec_prefix)/libexec datadir = $(prefix)/share sysconfdir = $(prefix)/etc sharedstatedir = $(DESTDIR)/etc localstatedir = $(DESTDIR)/var libdir = $(exec_prefix)/lib includedir = $(prefix)/include oldincludedir = $(DESTDIR)/usr/include infodir = $(datadir)/info mandir = $(datadir)/man ridir = $(datadir)/ri docdir = $(datadir)/doc/$(RUBY_BASE_NAME) sitedir = $(rubylibprefix)/site_ruby vendordir = $(rubylibprefix)/vendor_ruby rubyhdrdir = $(includedir)/$(RUBY_BASE_NAME)-$(ruby_version) sitehdrdir = $(rubyhdrdir)/site_ruby vendorhdrdir = $(rubyhdrdir)/vendor_ruby rubylibdir = $(rubylibprefix)/$(ruby_version) archdir = $(rubylibdir)/$(arch) sitelibdir = $(sitedir)/$(ruby_version) sitearchdir = $(sitelibdir)/$(sitearch) vendorlibdir = $(vendordir)/$(ruby_version) vendorarchdir = $(vendorlibdir)/$(sitearch) CC = cl -nologo CXX = $(CC) LIBRUBY = $(RUBY_SO_NAME).lib LIBRUBY_A = $(RUBY_SO_NAME)-static.lib LIBRUBYARG_SHARED = $(LIBRUBY) LIBRUBYARG_STATIC = $(LIBRUBY_A) OUTFLAG = -Fe COUTFLAG = -Fo RUBY_EXTCONF_H = extconf.h cflags = optflags = debugflags = warnflags = CFLAGS = -MD -Zi -W2 -wd4996 -O2sy- -Zm600 INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) DEFS = CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" CXXFLAGS = $(CFLAGS) -MD -Zi -W2 -wd4996 -O2sy- -Zm600 ldflags = -incremental:no -debug -opt:ref -opt:icf dldflags = -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) ARCH_FLAG = DLDFLAGS = $(ldflags) $(dldflags) LDSHARED = cl -nologo -LD LDSHAREDXX = $(LDSHARED) AR = lib -nologo EXEEXT = .exe RUBY_BASE_NAME = ruby RUBY_INSTALL_NAME = ruby RUBY_SO_NAME = msvcr100-ruby191 arch = x64-mswin64_100 sitearch = x64-msvcr100 ruby_version = 1.9.1 ruby = $(topdir:/=\)\miniruby.exe -I'$(topdir)' -I'$(top_srcdir)/lib' -I'$(extout)/$(arch)' -I'$(extout)/common' -I./- -I'$(top_srcdir)/ext' -rpurelib.rb RUBY = $(ruby) RM = $(COMSPEC) /C $(top_srcdir:/=\)\win32\rm.bat RM_RF = $(RUBY) -run -e rm -- -rf RMDIRS = $(COMSPEC) /C $(top_srcdir:/=\)\win32\rmdirs.bat MAKEDIRS = @$(RUBY) -run -e mkdir -- -p INSTALL = @$(RUBY) -run -e install -- -vp INSTALL_PROG = $(INSTALL) -m 0755 INSTALL_DATA = $(INSTALL) -m 0644 COPY = @$(RUBY) -run -e cp -- -v #### End of system configuration section. #### preload = libpath = . $(topdir) LIBPATH = -libpath:. -libpath:$(topdir) DEFFILE = $(TARGET)-$(arch).def CLEANFILES = mkmf.log $(DEFFILE) DISTCLEANFILES = vc*.pdb DISTCLEANDIRS = extout = $(topdir)/.ext extout_prefix = $(extout)$(target_prefix)/ target_prefix = LOCAL_LIBS = LIBS = $(LIBRUBYARG_SHARED) ssleay32.lib libeay32.lib gdi32.lib wsock32.lib zlib.lib wsock32.lib oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib SRCS = openssl_missing.c ossl.c ossl_asn1.c ossl_bio.c ossl_bn.c ossl_cipher.c ossl_config.c ossl_digest.c ossl_engine.c ossl_hmac.c ossl_ns_spki.c ossl_ocsp.c ossl_pkcs12.c ossl_pkcs5.c ossl_pkcs7.c ossl_pkey.c ossl_pkey_dh.c ossl_pkey_dsa.c ossl_pkey_ec.c ossl_pkey_rsa.c ossl_rand.c ossl_ssl.c ossl_ssl_session.c ossl_x509.c ossl_x509attr.c ossl_x509cert.c ossl_x509crl.c ossl_x509ext.c ossl_x509name.c ossl_x509req.c ossl_x509revoked.c ossl_x509store.c OBJS = openssl_missing.obj ossl.obj ossl_asn1.obj ossl_bio.obj ossl_bn.obj ossl_cipher.obj ossl_config.obj ossl_digest.obj ossl_engine.obj ossl_hmac.obj ossl_ns_spki.obj ossl_ocsp.obj ossl_pkcs12.obj ossl_pkcs5.obj ossl_pkcs7.obj ossl_pkey.obj ossl_pkey_dh.obj ossl_pkey_dsa.obj ossl_pkey_ec.obj ossl_pkey_rsa.obj ossl_rand.obj ossl_ssl.obj ossl_ssl_session.obj ossl_x509.obj ossl_x509attr.obj ossl_x509cert.obj ossl_x509crl.obj ossl_x509ext.obj ossl_x509name.obj ossl_x509req.obj ossl_x509revoked.obj ossl_x509store.obj TARGET = openssl DLLIB = $(TARGET).so EXTSTATIC = STATIC_LIB = BINDIR = $(extout)/bin RUBYCOMMONDIR = $(extout)/common RUBYLIBDIR = $(RUBYCOMMONDIR)$(target_prefix) RUBYARCHDIR = $(extout)/$(arch)$(target_prefix) HDRDIR = $(extout)/include/ruby$(target_prefix) ARCHHDRDIR = $(extout)/include/$(arch)/ruby$(target_prefix) TARGET_SO = $(RUBYARCHDIR)/$(DLLIB) CLEANLIBS = $(RUBYARCHDIR)/$(TARGET).so CLEANOBJS = *.obj $(TARGET)-$(arch).exp $(TARGET)-$(arch).lib $(TARGET)-$(arch).pdb *.bak all: install static: $(STATIC_LIB) install-rb .PHONY: all install static install-so install-rb .PHONY: clean clean-so clean-rb clean-rb-default:: clean-rb:: clean-so:: clean: clean-so clean-rb-default clean-rb @-$(RM) $(CLEANLIBS:/=\) $(CLEANOBJS:/=\) $(CLEANFILES:/=\) distclean-rb-default:: distclean-rb:: distclean-so:: distclean: clean distclean-so distclean-rb-default distclean-rb @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES:/=\) @-$(RMDIRS) $(DISTCLEANDIRS:/=\) realclean: distclean install: install-so install-rb install-so: $(RUBYARCHDIR) install-so: $(RUBYARCHDIR)/$(DLLIB) clean-so:: @-$(RM) $(RUBYARCHDIR:/=\)\$(DLLIB:/=\) @-$(RMDIRS) $(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 pre-install-rb-default: $(RUBYLIBDIR)/openssl install-rb-default: $(RUBYLIBDIR)/openssl/bn.rb $(RUBYLIBDIR)/openssl/bn.rb: $(srcdir)/lib/openssl/bn.rb @-$(MAKEDIRS) $(@D:/=\) $(COPY) $(srcdir)/lib/openssl/bn.rb $(@D:/=\) clean-rb-default:: @-$(RM) $(RUBYLIBDIR:/=\)\openssl\bn.rb install-rb-default: $(RUBYLIBDIR)/openssl/buffering.rb $(RUBYLIBDIR)/openssl/buffering.rb: $(srcdir)/lib/openssl/buffering.rb @-$(MAKEDIRS) $(@D:/=\) $(COPY) $(srcdir)/lib/openssl/buffering.rb $(@D:/=\) clean-rb-default:: @-$(RM) $(RUBYLIBDIR:/=\)\openssl\buffering.rb install-rb-default: $(RUBYLIBDIR)/openssl/cipher.rb $(RUBYLIBDIR)/openssl/cipher.rb: $(srcdir)/lib/openssl/cipher.rb @-$(MAKEDIRS) $(@D:/=\) $(COPY) $(srcdir)/lib/openssl/cipher.rb $(@D:/=\) clean-rb-default:: @-$(RM) $(RUBYLIBDIR:/=\)\openssl\cipher.rb install-rb-default: $(RUBYLIBDIR)/openssl/digest.rb $(RUBYLIBDIR)/openssl/digest.rb: $(srcdir)/lib/openssl/digest.rb @-$(MAKEDIRS) $(@D:/=\) $(COPY) $(srcdir)/lib/openssl/digest.rb $(@D:/=\) clean-rb-default:: @-$(RM) $(RUBYLIBDIR:/=\)\openssl\digest.rb install-rb-default: $(RUBYLIBDIR)/openssl/ssl-internal.rb $(RUBYLIBDIR)/openssl/ssl-internal.rb: $(srcdir)/lib/openssl/ssl-internal.rb @-$(MAKEDIRS) $(@D:/=\) $(COPY) $(srcdir)/lib/openssl/ssl-internal.rb $(@D:/=\) clean-rb-default:: @-$(RM) $(RUBYLIBDIR:/=\)\openssl\ssl-internal.rb install-rb-default: $(RUBYLIBDIR)/openssl/ssl.rb $(RUBYLIBDIR)/openssl/ssl.rb: $(srcdir)/lib/openssl/ssl.rb @-$(MAKEDIRS) $(@D:/=\) $(COPY) $(srcdir)/lib/openssl/ssl.rb $(@D:/=\) clean-rb-default:: @-$(RM) $(RUBYLIBDIR:/=\)\openssl\ssl.rb install-rb-default: $(RUBYLIBDIR)/openssl/x509-internal.rb $(RUBYLIBDIR)/openssl/x509-internal.rb: $(srcdir)/lib/openssl/x509-internal.rb @-$(MAKEDIRS) $(@D:/=\) $(COPY) $(srcdir)/lib/openssl/x509-internal.rb $(@D:/=\) clean-rb-default:: @-$(RM) $(RUBYLIBDIR:/=\)\openssl\x509-internal.rb install-rb-default: $(RUBYLIBDIR)/openssl/x509.rb $(RUBYLIBDIR)/openssl/x509.rb: $(srcdir)/lib/openssl/x509.rb @-$(MAKEDIRS) $(@D:/=\) $(COPY) $(srcdir)/lib/openssl/x509.rb $(@D:/=\) clean-rb-default:: @-$(RM) $(RUBYLIBDIR:/=\)\openssl\x509.rb pre-install-rb-default: $(RUBYLIBDIR) install-rb-default: $(RUBYLIBDIR)/openssl.rb $(RUBYLIBDIR)/openssl.rb: $(srcdir)/lib/openssl.rb @-$(MAKEDIRS) $(@D:/=\) $(COPY) $(srcdir)/lib/openssl.rb $(@D:/=\) clean-rb-default:: @-$(RM) $(RUBYLIBDIR:/=\)\openssl.rb clean-rb-default:: @-$(RMDIRS) $(RUBYLIBDIR:/=\)\openssl @-$(RMDIRS) $(RUBYLIBDIR:/=\) $(RUBYARCHDIR): $(MAKEDIRS) $@ $(RUBYLIBDIR)/openssl: $(MAKEDIRS) $@ $(RUBYLIBDIR): $(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 .obj {$(hdrdir)}.cc.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) {$(topdir)}.cc.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) {$(srcdir)}.cc.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) .cc.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) {$(hdrdir)}.cxx.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) {$(topdir)}.cxx.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) {$(srcdir)}.cxx.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) .cxx.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) {$(hdrdir)}.cpp.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) {$(topdir)}.cpp.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) {$(srcdir)}.cpp.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) .cpp.obj: $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tp$(<:\=/) {$(hdrdir)}.c.obj: $(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tc$(<:\=/) {$(topdir)}.c.obj: $(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tc$(<:\=/) {$(srcdir)}.c.obj: $(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tc$(<:\=/) .c.obj: $(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) $(COUTFLAG)$(@) -c -Tc$(<:\=/) $(RUBYARCHDIR)/$(DLLIB): $(DEFFILE) $(OBJS) Makefile @-$(RM) $(@:/=\) @-$(MAKEDIRS) $(@D) $(LDSHARED) -Fe$(@) $(OBJS) $(LIBS) $(LOCAL_LIBS) -link $(DLDFLAGS) -implib:$(*F:.so=)-$(arch).lib -pdb:$(*F:.so=)-$(arch).pdb -def:$(DEFFILE) @if exist $(@).manifest $(RUBY) -run -e wait_writable -- -n 10 $(@) @if exist $(@).manifest mt -nologo -manifest $(@).manifest -outputresource:$(@);2 @if exist $(@).manifest $(RM) $(@:/=\).manifest $(DEFFILE): $(RUBY) -e "puts 'EXPORTS', 'Init_$(TARGET)'" > $@ $(OBJS): {.;$(VPATH)}$(hdrdir)/ruby.h {.;$(VPATH)}$(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h $(RUBY_EXTCONF_H)