2003-08-16 18:58:34 +04:00
|
|
|
# -*- makefile -*-
|
|
|
|
|
2000-12-06 12:10:17 +03:00
|
|
|
SHELL = $(COMSPEC)
|
2011-12-14 15:02:00 +04:00
|
|
|
ECHO1 = $(V:1=@:)
|
2009-02-24 13:01:08 +03:00
|
|
|
RUNCMD = $(COMSPEC) /c
|
2014-06-10 12:30:01 +04:00
|
|
|
MKFILES = Makefile verconf.mk
|
2004-03-22 02:21:31 +03:00
|
|
|
NULL = nul
|
2009-03-06 12:37:31 +03:00
|
|
|
CHDIR = cd
|
2012-11-19 11:08:13 +04:00
|
|
|
PATH_SEPARATOR = ;
|
2013-10-15 11:33:59 +04:00
|
|
|
TZ = # skip timezone tests
|
2014-11-21 18:58:35 +03:00
|
|
|
PWD = $(MAKEDIR)
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2007-12-22 09:30:40 +03:00
|
|
|
!ifndef MFLAGS
|
2007-12-24 06:35:06 +03:00
|
|
|
MFLAGS=-l
|
2007-12-22 09:30:40 +03:00
|
|
|
!endif
|
|
|
|
|
2008-01-08 14:02:10 +03:00
|
|
|
!ifndef CROSS_COMPILING
|
2013-01-07 10:23:15 +04:00
|
|
|
CROSS_COMPILING = no
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
|
|
|
!ifndef LARGEFILE_SUPPORT
|
|
|
|
LARGEFILE_SUPPORT = 1
|
|
|
|
!endif
|
|
|
|
!ifndef win_srcdir
|
|
|
|
win_srcdir = $(srcdir)/win32
|
|
|
|
!endif
|
|
|
|
|
2016-01-09 04:44:56 +03:00
|
|
|
!if exist(verconf.mk)
|
|
|
|
! include verconf.mk
|
|
|
|
!endif
|
|
|
|
|
2000-08-03 13:55:54 +04:00
|
|
|
#### Start of system configuration section. ####
|
|
|
|
|
2005-10-14 18:10:08 +04:00
|
|
|
!if defined(pathlist)
|
|
|
|
PATH = $(pathlist:;=/bin;)$(PATH)
|
|
|
|
INCLUDE = $(pathlist:;=/include;)
|
|
|
|
LIB = $(pathlist:;=/lib;)
|
|
|
|
!endif
|
|
|
|
|
2000-08-03 13:55:54 +04:00
|
|
|
## variables may be overridden by $(compile_dir)/Makefile
|
|
|
|
!ifndef srcdir
|
|
|
|
srcdir = ..
|
|
|
|
!endif
|
2009-05-08 05:14:14 +04:00
|
|
|
!ifndef RUBY_BASE_NAME
|
|
|
|
RUBY_BASE_NAME = ruby
|
|
|
|
!endif
|
2000-08-03 13:55:54 +04:00
|
|
|
!ifndef RUBY_INSTALL_NAME
|
2010-12-16 13:55:11 +03:00
|
|
|
RUBY_INSTALL_NAME = $(PROGRAM_PREFIX)$(RUBY_BASE_NAME)$(PROGRAM_SUFFIX)
|
2000-08-03 13:55:54 +04:00
|
|
|
!endif
|
|
|
|
!if !defined(RUBYW_INSTALL_NAME) || "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
|
|
|
|
RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw)
|
|
|
|
!endif
|
|
|
|
!if "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
|
|
|
|
RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME)w
|
|
|
|
!endif
|
2010-11-18 17:56:34 +03:00
|
|
|
STUBPROGRAM = rubystub$(EXEEXT)
|
2001-06-09 11:41:44 +04:00
|
|
|
!if !defined(icondirs) && defined(ICONDIRS)
|
|
|
|
icondirs=$(ICONDIRS)
|
|
|
|
!endif
|
|
|
|
!if defined(icondirs)
|
|
|
|
icondirs=$(icondirs:\=/)
|
2002-03-20 14:21:19 +03:00
|
|
|
iconinc=-I$(icondirs: = -I)
|
2001-06-09 11:41:44 +04:00
|
|
|
!endif
|
2018-03-09 07:24:48 +03:00
|
|
|
!if !defined(MATHN)
|
|
|
|
MATHN = yes
|
|
|
|
!endif
|
2000-08-03 13:55:54 +04:00
|
|
|
###############
|
|
|
|
|
2012-11-19 09:56:38 +04:00
|
|
|
.SUFFIXES: .def .lib
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2002-03-20 14:21:19 +03:00
|
|
|
!if !defined(CC)
|
2016-07-11 19:30:03 +03:00
|
|
|
CC = cl -nologo
|
2002-03-20 14:21:19 +03:00
|
|
|
!endif
|
2006-09-26 10:32:09 +04:00
|
|
|
!if !defined(CPP) || "$(CPP)" == "cl"
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
CPP = $(CC) -E
|
|
|
|
!endif
|
2002-03-20 14:21:19 +03:00
|
|
|
!if !defined(YACC)
|
2004-09-17 15:38:49 +04:00
|
|
|
YACC = bison
|
2002-03-20 14:21:19 +03:00
|
|
|
!endif
|
2002-09-10 12:24:11 +04:00
|
|
|
AR = lib -nologo
|
2000-08-03 13:55:54 +04:00
|
|
|
PURIFY =
|
|
|
|
AUTOCONF = autoconf
|
2008-01-25 12:27:30 +03:00
|
|
|
IFCHANGE = $(COMSPEC) /C $(srcdir:/=\)\win32\ifchange.bat
|
2006-01-17 05:08:33 +03:00
|
|
|
RM = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat
|
2010-12-26 16:46:02 +03:00
|
|
|
RMDIR = $(COMSPEC) /C $(srcdir:/=\)\win32\rmdirs.bat
|
2009-01-25 05:06:29 +03:00
|
|
|
RMDIRS = $(COMSPEC) /C $(srcdir:/=\)\win32\rmdirs.bat
|
2014-07-07 11:08:06 +04:00
|
|
|
RMALL = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat -r
|
2012-03-01 10:40:09 +04:00
|
|
|
MAKEDIRS = $(COMSPEC) /E:ON /C $(srcdir:/=\)\win32\makedirs.bat
|
2007-12-11 10:19:28 +03:00
|
|
|
CP = copy > nul
|
2008-01-13 03:17:31 +03:00
|
|
|
MV = move > nul
|
2007-01-23 09:41:22 +03:00
|
|
|
!if !defined(BASERUBY)
|
|
|
|
BASERUBY = ruby
|
|
|
|
!endif
|
2009-07-21 08:35:56 +04:00
|
|
|
!if !defined(TEST_RUNNABLE)
|
|
|
|
TEST_RUNNABLE = yes
|
|
|
|
!endif
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2014-10-31 11:07:50 +03:00
|
|
|
!if !defined(MACHINE)
|
|
|
|
MACHINE = x86
|
2002-09-10 12:24:11 +04:00
|
|
|
!endif
|
2014-10-31 11:07:50 +03:00
|
|
|
!if "$(MACHINE)" == "x86"
|
2002-03-20 14:21:19 +03:00
|
|
|
!if !defined(PROCESSOR_LEVEL)
|
|
|
|
PROCESSOR_LEVEL = 5
|
|
|
|
!endif
|
2002-06-11 08:16:58 +04:00
|
|
|
!if 6 < $(PROCESSOR_LEVEL)
|
|
|
|
PROCESSOR_LEVEL = 6
|
|
|
|
!endif
|
2005-12-30 12:23:15 +03:00
|
|
|
!if $(MSC_VER) < 1400
|
2002-03-20 14:21:19 +03:00
|
|
|
PROCESSOR_FLAG = -G$(PROCESSOR_LEVEL)
|
2005-12-30 12:23:15 +03:00
|
|
|
!endif
|
2002-03-20 14:21:19 +03:00
|
|
|
CPU = i$(PROCESSOR_LEVEL)86
|
|
|
|
ARCH = i386
|
|
|
|
!else
|
2014-10-31 11:07:50 +03:00
|
|
|
CPU = $(MACHINE)
|
|
|
|
ARCH = $(MACHINE)
|
2002-03-20 14:21:19 +03:00
|
|
|
!endif
|
2007-02-25 05:48:19 +03:00
|
|
|
!if !defined(DEBUGFLAGS)
|
2002-03-20 14:21:19 +03:00
|
|
|
DEBUGFLAGS = -Zi
|
|
|
|
!endif
|
2017-06-21 07:34:25 +03:00
|
|
|
!if "$(RUBY_DEVEL)" == "yes"
|
2017-09-08 11:03:18 +03:00
|
|
|
XCFLAGS = $(XCFLAGS) -DRUBY_DEVEL=1
|
2017-06-21 07:34:25 +03:00
|
|
|
!endif
|
2002-03-20 14:21:19 +03:00
|
|
|
!if !defined(OPTFLAGS)
|
2006-01-09 08:27:43 +03:00
|
|
|
!if $(MSC_VER) < 1400
|
|
|
|
OPTFLAGS = -O2b2xg-
|
|
|
|
!else
|
2009-03-10 07:52:29 +03:00
|
|
|
OPTFLAGS = -O2sy-
|
2002-03-20 14:21:19 +03:00
|
|
|
!endif
|
2006-01-09 08:27:43 +03:00
|
|
|
!endif
|
2008-07-11 17:10:29 +04:00
|
|
|
!if !defined(PLATFORM)
|
|
|
|
PLATFORM = mswin32
|
2005-04-13 14:25:41 +04:00
|
|
|
!endif
|
|
|
|
!if !defined(RT)
|
|
|
|
!error RT not defined. Retry from configure pass.
|
2003-12-18 15:48:43 +03:00
|
|
|
!endif
|
2015-03-22 05:26:28 +03:00
|
|
|
!ifndef NTVER
|
|
|
|
NTVER = 0x0600
|
|
|
|
!endif
|
2009-11-26 11:55:34 +03:00
|
|
|
!ifdef NTVER
|
|
|
|
ARCHDEFS = -D_WIN32_WINNT=$(NTVER) $(ARCHDEFS)
|
|
|
|
!endif
|
2012-02-28 19:51:25 +04:00
|
|
|
!if !defined(PLATFORM_DIR)
|
|
|
|
PLATFORM_DIR = win32
|
|
|
|
!endif
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2008-07-11 17:10:29 +04:00
|
|
|
arch = $(ARCH)-$(PLATFORM)
|
2009-10-26 21:45:34 +03:00
|
|
|
sitearch = $(ARCH)-$(RT)
|
2008-07-15 17:34:49 +04:00
|
|
|
!if !defined(ruby_version)
|
2016-01-09 03:20:46 +03:00
|
|
|
ruby_version = $(MAJOR).$(MINOR).0
|
2008-07-15 17:34:49 +04:00
|
|
|
!endif
|
2018-02-08 21:48:25 +03:00
|
|
|
!if !defined(RUBY_VERSION_NAME)
|
|
|
|
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
|
|
|
!endif
|
2007-06-10 07:06:15 +04:00
|
|
|
|
2002-09-10 12:24:11 +04:00
|
|
|
!ifndef RUBY_SO_NAME
|
2016-01-09 03:20:46 +03:00
|
|
|
RUBY_SO_NAME = $(RT)-$(RUBY_BASE_NAME)$(ruby_version:.=)
|
2011-05-16 06:22:27 +04:00
|
|
|
!if "$(ARCH)" != "i386"
|
|
|
|
RUBY_SO_NAME = $(ARCH)-$(RUBY_SO_NAME)
|
|
|
|
!endif
|
2002-09-10 12:24:11 +04:00
|
|
|
!endif
|
2008-01-08 14:02:10 +03:00
|
|
|
!ifndef RUBY_PLATFORM
|
|
|
|
RUBY_PLATFORM = $(arch)
|
|
|
|
!endif
|
2002-09-10 12:24:11 +04:00
|
|
|
|
2002-03-20 14:21:19 +03:00
|
|
|
!if !defined(prefix)
|
2000-08-03 13:55:54 +04:00
|
|
|
prefix = /usr
|
2002-03-20 14:21:19 +03:00
|
|
|
!endif
|
2003-08-16 18:58:34 +04:00
|
|
|
!if !defined(exec_prefix)
|
|
|
|
exec_prefix = $(prefix)
|
|
|
|
!endif
|
2016-01-22 17:28:31 +03:00
|
|
|
!if !defined(libdir_basename)
|
|
|
|
libdir_basename = lib
|
|
|
|
!endif
|
2003-08-16 18:58:34 +04:00
|
|
|
!if !defined(libdir)
|
2016-01-22 17:28:31 +03:00
|
|
|
libdir = $(exec_prefix)/$(libdir_basename)
|
2003-08-16 18:58:34 +04:00
|
|
|
!endif
|
2004-02-09 11:48:55 +03:00
|
|
|
!if !defined(datadir)
|
|
|
|
datadir = $(prefix)/share
|
|
|
|
!endif
|
|
|
|
!ifndef EXTOUT
|
|
|
|
EXTOUT = .ext
|
|
|
|
!endif
|
|
|
|
!ifndef TESTUI
|
|
|
|
TESTUI = console
|
|
|
|
!endif
|
|
|
|
!ifndef TESTS
|
|
|
|
TESTS =
|
|
|
|
!endif
|
2009-09-16 11:20:19 +04:00
|
|
|
!ifndef CAPITARGET
|
|
|
|
! ifdef DOXYGEN
|
|
|
|
CAPITARGET = capi
|
|
|
|
! else
|
|
|
|
CAPITARGET = nodoc
|
|
|
|
! endif
|
|
|
|
!endif
|
|
|
|
!ifndef DOCTARGETS
|
2009-09-16 12:00:07 +04:00
|
|
|
! if "$(RDOCTARGET)" == "rdoc" || "$(RDOCTARGET)" == ""
|
2009-09-16 11:20:19 +04:00
|
|
|
DOCTARGETS = $(DOCTARGETS) rdoc
|
|
|
|
! endif
|
|
|
|
! if "$(CAPITARGET)" == "capi"
|
|
|
|
DOCTARGETS = $(DOCTARGETS) capi
|
|
|
|
! endif
|
2009-09-16 11:27:58 +04:00
|
|
|
!endif
|
2009-09-16 11:20:19 +04:00
|
|
|
!ifndef INSTALLDOC
|
2009-09-16 12:06:24 +04:00
|
|
|
! if "$(DOCTARGETS)" != ""
|
2009-09-16 11:20:19 +04:00
|
|
|
INSTALLDOC = all
|
|
|
|
! else
|
|
|
|
INSTALLDOC = nodoc
|
|
|
|
DOCTARGETS = nodoc
|
|
|
|
! endif
|
2004-02-09 11:48:55 +03:00
|
|
|
!endif
|
2004-03-22 02:21:31 +03:00
|
|
|
|
2016-07-11 19:30:03 +03:00
|
|
|
!if !defined(OUTFLAG)
|
2004-03-22 02:21:31 +03:00
|
|
|
OUTFLAG = -Fe
|
2016-07-11 19:30:03 +03:00
|
|
|
!endif
|
|
|
|
!if !defined(COUTFLAG)
|
2007-12-24 06:49:56 +03:00
|
|
|
COUTFLAG = -Fo
|
2016-07-11 19:30:03 +03:00
|
|
|
!endif
|
2018-02-04 18:17:44 +03:00
|
|
|
!if !defined(CPPOUTFLAG)
|
2018-02-11 04:01:09 +03:00
|
|
|
! if $(MSC_VER) < 1600
|
|
|
|
CPPOUTFLAG = >
|
|
|
|
! else
|
2018-02-04 18:17:44 +03:00
|
|
|
CPPOUTFLAG = -Fi
|
2018-02-11 04:01:09 +03:00
|
|
|
! endif
|
2018-02-04 18:17:44 +03:00
|
|
|
!endif
|
2016-07-11 19:30:03 +03:00
|
|
|
!if !defined(CSRCFLAG)
|
|
|
|
CSRCFLAG = -Tc
|
|
|
|
!endif
|
2008-01-08 14:02:10 +03:00
|
|
|
!if !defined(RUNTIMEFLAG)
|
|
|
|
RUNTIMEFLAG = -MD
|
|
|
|
!endif
|
2008-09-02 07:59:39 +04:00
|
|
|
!if !defined(COMPILERFLAG)
|
2009-01-15 07:14:18 +03:00
|
|
|
COMPILERFLAG = -Zm600
|
2008-09-02 07:59:39 +04:00
|
|
|
!endif
|
2009-03-10 14:07:42 +03:00
|
|
|
!if !defined(WARNFLAGS)
|
2009-03-12 16:31:11 +03:00
|
|
|
!if $(MSC_VER) >= 1400
|
2015-09-05 04:38:50 +03:00
|
|
|
WARNFLAGS = -W2 -wd4100 -wd4127 -wd4210 -wd4214 -wd4255 -wd4574 \
|
|
|
|
-wd4668 -wd4710 -wd4711 -wd4820 -wd4996 \
|
|
|
|
-we4028 -we4142
|
2009-03-12 16:31:11 +03:00
|
|
|
!else
|
|
|
|
WARNFLAGS = -W2
|
|
|
|
!endif
|
2009-03-10 14:07:42 +03:00
|
|
|
!endif
|
2015-04-10 16:29:23 +03:00
|
|
|
WERRORFLAG = -WX
|
2018-02-04 16:33:13 +03:00
|
|
|
!if !defined(CFLAGS_NO_ARCH)
|
|
|
|
CFLAGS_NO_ARCH = $(RUNTIMEFLAG) $(DEBUGFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(COMPILERFLAG)
|
|
|
|
!endif
|
|
|
|
!if !defined(ARCH_FLAG)
|
|
|
|
ARCH_FLAG = $(PROCESSOR_FLAG)
|
|
|
|
!endif
|
2002-03-20 14:21:19 +03:00
|
|
|
!if !defined(CFLAGS)
|
2018-02-04 16:33:13 +03:00
|
|
|
CFLAGS = $(CFLAGS_NO_ARCH) $(ARCH_FLAG)
|
2002-03-20 14:21:19 +03:00
|
|
|
!endif
|
2005-04-21 01:45:43 +04:00
|
|
|
!if !defined(CXXFLAGS)
|
|
|
|
CXXFLAGS = $(CFLAGS)
|
|
|
|
!endif
|
2003-12-18 15:48:43 +03:00
|
|
|
!if !defined(LDFLAGS)
|
2009-03-08 17:02:50 +03:00
|
|
|
LDFLAGS = -incremental:no -debug -opt:ref -opt:icf
|
2003-12-18 15:48:43 +03:00
|
|
|
!endif
|
2002-03-20 14:21:19 +03:00
|
|
|
!if !defined(XLDFLAGS)
|
2003-12-18 15:48:43 +03:00
|
|
|
XLDFLAGS = -stack:$(STACK)
|
2002-03-20 14:21:19 +03:00
|
|
|
!endif
|
|
|
|
!if !defined(RFLAGS)
|
|
|
|
RFLAGS = -r
|
|
|
|
!endif
|
|
|
|
!if !defined(EXTLIBS)
|
|
|
|
EXTLIBS =
|
|
|
|
!endif
|
2012-05-20 07:25:14 +04:00
|
|
|
!if !defined(EXTSOLIBS)
|
|
|
|
EXTSOLIBS =
|
|
|
|
!endif
|
2008-01-08 14:02:10 +03:00
|
|
|
!if !defined(LIBS)
|
2014-07-14 15:50:43 +04:00
|
|
|
LIBS = user32.lib advapi32.lib shell32.lib ws2_32.lib
|
2013-05-14 12:24:58 +04:00
|
|
|
!if $(MSC_VER) >= 1400
|
|
|
|
LIBS = $(LIBS) iphlpapi.lib
|
|
|
|
!endif
|
2013-10-17 12:11:21 +04:00
|
|
|
LIBS = $(LIBS) imagehlp.lib shlwapi.lib $(EXTLIBS)
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
|
|
|
!if !defined(MISSING)
|
2016-06-01 09:58:21 +03:00
|
|
|
MISSING = crypt.obj ffs.obj langinfo.obj lgamma_r.obj strlcat.obj strlcpy.obj win32/win32.obj win32/file.obj setproctitle.obj
|
2013-10-23 17:51:05 +04:00
|
|
|
!if $(RT_VER) < 120
|
2018-01-20 09:49:30 +03:00
|
|
|
MISSING = $(MISSING) acosh.obj cbrt.obj erf.obj nan.obj tgamma.obj
|
2013-10-23 17:51:05 +04:00
|
|
|
!endif
|
2015-12-01 06:52:20 +03:00
|
|
|
MISSING = $(MISSING) explicit_bzero.obj
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
2012-11-26 07:11:12 +04:00
|
|
|
DLNOBJ = dln.obj
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
|
|
|
|
ARFLAGS = -machine:$(MACHINE) -out:
|
|
|
|
LD = $(CC)
|
|
|
|
LDSHARED = $(LD) -LD
|
2016-07-16 15:41:23 +03:00
|
|
|
XCFLAGS = -DRUBY_EXPORT $(INCFLAGS) $(XCFLAGS)
|
2018-03-09 07:24:48 +03:00
|
|
|
!if "$(MATHN)" == "yes"
|
|
|
|
XCFLAGS = $(XCFLAGS) -DCANONICALIZATION_FOR_MATHN
|
|
|
|
!endif
|
2005-12-30 12:23:15 +03:00
|
|
|
!if $(MSC_VER) >= 1400
|
|
|
|
# Prevents VC++ 2005 (cl ver 14) warnings
|
2006-05-24 20:52:00 +04:00
|
|
|
MANIFESTTOOL = mt -nologo
|
2009-10-01 09:19:19 +04:00
|
|
|
LDSHARED_0 = @if exist $(@).manifest $(MINIRUBY) -run -e wait_writable -- -n 10 $@
|
|
|
|
LDSHARED_1 = @if exist $(@).manifest $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2
|
|
|
|
LDSHARED_2 = @if exist $(@).manifest @$(RM) $(@:/=\).manifest
|
2005-12-30 12:23:15 +03:00
|
|
|
!endif
|
2018-02-06 18:55:12 +03:00
|
|
|
CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS)
|
2018-06-22 07:13:02 +03:00
|
|
|
!if "$(USE_RUBYGEMS)" == "no"
|
|
|
|
CPPFLAGS = -DDISABLE_RUBYGEMS $(CPPFLAGS)
|
|
|
|
!endif
|
2018-02-11 04:01:09 +03:00
|
|
|
!if "$(CPPOUTFLAG)" == ">"
|
|
|
|
MJIT_HEADER_FLAGS =
|
|
|
|
!else
|
2018-02-04 16:43:06 +03:00
|
|
|
MJIT_HEADER_FLAGS = -P
|
2018-02-11 04:01:09 +03:00
|
|
|
!endif
|
2018-02-06 06:19:42 +03:00
|
|
|
MJIT_HEADER_SUFFIX =
|
|
|
|
MJIT_HEADER_ARCH =
|
2018-02-08 18:19:32 +03:00
|
|
|
MJIT_HEADER_INSTALL_DIR = include/$(RUBY_VERSION_NAME)/$(arch)
|
2018-03-02 01:49:26 +03:00
|
|
|
!ifndef MJIT_CC
|
|
|
|
MJIT_CC = $(CC)
|
|
|
|
!endif
|
|
|
|
!ifndef MJIT_OPTFLAGS
|
|
|
|
MJIT_OPTFLAGS = $(OPTFLAGS)
|
|
|
|
!endif
|
|
|
|
!ifndef MJIT_DEBUGFLAGS
|
|
|
|
MJIT_DEBUGFLAGS = $(DEBUGFLAGS)
|
|
|
|
!endif
|
2018-03-03 08:09:32 +03:00
|
|
|
!ifndef MJIT_LDSHARED
|
2018-03-05 15:23:48 +03:00
|
|
|
MJIT_LDSHARED = $(MJIT_CC) -LD
|
2018-03-03 08:09:32 +03:00
|
|
|
!endif
|
2005-12-30 12:23:15 +03:00
|
|
|
|
2018-07-09 04:50:12 +03:00
|
|
|
POSTLINK =
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
DLDFLAGS = $(LDFLAGS) -dll
|
2018-03-02 04:37:53 +03:00
|
|
|
MAINLIBS = $(LIBS)
|
2013-03-04 12:05:13 +04:00
|
|
|
SOLIBS =
|
2010-10-07 13:10:47 +04:00
|
|
|
RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
|
2010-12-02 17:06:54 +03:00
|
|
|
!ifndef RCFLAGS
|
2010-12-03 06:56:21 +03:00
|
|
|
!if $(MSC_VER) >= 1600
|
2010-12-02 17:06:54 +03:00
|
|
|
RCFLAGS=-nologo
|
|
|
|
!endif
|
|
|
|
!endif
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2017-05-31 09:40:49 +03:00
|
|
|
ENABLE_SHARED = yes
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
LIBRUBY_LDSHARED = $(LDSHARED)
|
2008-07-12 18:58:07 +04:00
|
|
|
LIBRUBY_DLDFLAGS = $(EXTLDFLAGS) -implib:dummy.lib -def:$(RUBYDEF)
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
|
2000-08-03 13:55:54 +04:00
|
|
|
EXEEXT = .exe
|
2009-11-30 10:54:26 +03:00
|
|
|
EXECUTABLE_EXTS = ".exe",".com",".cmd",".bat"
|
2008-01-08 14:02:10 +03:00
|
|
|
!if !defined(PROGRAM)
|
2000-08-03 13:55:54 +04:00
|
|
|
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
|
|
|
!if !defined(WPROGRAM) && defined(RUBYW_INSTALL_NAME)
|
2000-08-03 13:55:54 +04:00
|
|
|
WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
2000-08-03 13:55:54 +04:00
|
|
|
RUBYDEF = $(RUBY_SO_NAME).def
|
2013-01-07 10:23:15 +04:00
|
|
|
!if "$(CROSS_COMPILING)" == "yes"
|
|
|
|
MINIRUBY = $(RUBY) -I$(MAKEDIR) -r$(arch)-fake
|
2008-01-08 14:02:10 +03:00
|
|
|
RUNRUBY = $(MINIRUBY)
|
|
|
|
!else
|
2011-01-14 05:37:34 +03:00
|
|
|
MINIRUBY = .\miniruby$(EXEEXT) -I$(srcdir)/lib -I.
|
|
|
|
RUNRUBY = .\$(PROGRAM) -I$(srcdir)/lib -I"$(EXTOUT)/$(arch)" -I.
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
|
|
|
MINIRUBY = $(MINIRUBY) $(MINIRUBYOPT)
|
2011-07-09 03:39:42 +04:00
|
|
|
RUNRUBY = $(RUNRUBY) "$(srcdir)/tool/runruby.rb" --extout="$(EXTOUT)" $(RUNRUBYOPT) -- $(RUN_OPTS)
|
2013-01-07 10:23:15 +04:00
|
|
|
!if "$(CROSS_COMPILING)" == "yes"
|
2009-10-23 02:32:39 +04:00
|
|
|
XRUBY = $(MINIRUBY)
|
2015-03-07 05:06:06 +03:00
|
|
|
BOOTSTRAPRUBY = $(BASERUBY)
|
2009-10-23 02:32:39 +04:00
|
|
|
!else
|
2015-03-07 05:06:06 +03:00
|
|
|
BOOTSTRAPRUBY = $(MINIRUBY)
|
2009-10-23 02:32:39 +04:00
|
|
|
XRUBY = $(RUNRUBY)
|
|
|
|
!endif
|
2012-05-17 06:48:59 +04:00
|
|
|
BTESTRUBY = $(MINIRUBY)
|
2008-01-08 14:02:10 +03:00
|
|
|
!ifndef RUBY
|
|
|
|
RUBY = ruby
|
|
|
|
!endif
|
2011-02-11 06:03:26 +03:00
|
|
|
|
2012-11-16 19:22:37 +04:00
|
|
|
DTRACE_EXT = dmyh
|
|
|
|
|
2002-03-20 14:21:19 +03:00
|
|
|
!if !defined(STACK)
|
* include/ruby/intern.h, thread.c, win32/Makefile.sub (rb_fdset_t,
rb_fd_init, rb_fd_term, rb_fd_zero, rb_fd_set, rb_fd_clr, rb_fd_isset,
rb_fd_select, rb_fd_ptr, rb_fd_max, HAVE_RB_FD_INIT): new type,
functions, and macros for Windows.
* win32/win32.c (extract_fd, rb_w32_select): use rb_fdset_t to expand
fd_array if needed. [ruby-core:19946]
* win32/win32.c (copy_fd): new funcion for rb_w32_select().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 10:52:22 +03:00
|
|
|
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
|
|
|
|
STACK = 0x400000
|
|
|
|
!else
|
2007-02-14 16:13:52 +03:00
|
|
|
STACK = 0x200000
|
* include/ruby/intern.h, thread.c, win32/Makefile.sub (rb_fdset_t,
rb_fd_init, rb_fd_term, rb_fd_zero, rb_fd_set, rb_fd_clr, rb_fd_isset,
rb_fd_select, rb_fd_ptr, rb_fd_max, HAVE_RB_FD_INIT): new type,
functions, and macros for Windows.
* win32/win32.c (extract_fd, rb_w32_select): use rb_fdset_t to expand
fd_array if needed. [ruby-core:19946]
* win32/win32.c (copy_fd): new funcion for rb_w32_select().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 10:52:22 +03:00
|
|
|
!endif
|
2008-01-08 14:02:10 +03:00
|
|
|
!if defined(STACK_COMMIT)
|
|
|
|
STACK = $(STACK),$(STACK_COMMIT)
|
|
|
|
!endif
|
2002-03-20 14:21:19 +03:00
|
|
|
!endif
|
2000-08-03 13:55:54 +04:00
|
|
|
ORGLIBPATH = $(LIB)
|
|
|
|
|
|
|
|
#### End of system configuration section. ####
|
|
|
|
|
2002-11-14 16:51:19 +03:00
|
|
|
LIBRUBY_A = $(RUBY_SO_NAME)-static.lib
|
2000-08-03 13:55:54 +04:00
|
|
|
LIBRUBY_SO = $(RUBY_SO_NAME).dll
|
2017-10-14 18:35:05 +03:00
|
|
|
LIBRUBY_SONAME= $(RUBY_SO_NAME).dll
|
2000-08-03 13:55:54 +04:00
|
|
|
LIBRUBY = $(RUBY_SO_NAME).lib
|
|
|
|
LIBRUBYARG = $(LIBRUBY)
|
2018-02-06 21:59:18 +03:00
|
|
|
LIBRUBYARG_SHARED = $(LIBRUBY)
|
2012-07-03 06:16:08 +04:00
|
|
|
LIBRUBY_RELATIVE = yes
|
|
|
|
|
2007-02-28 04:33:57 +03:00
|
|
|
THREAD_MODEL = win32
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2013-01-07 10:23:15 +04:00
|
|
|
!if "$(CROSS_COMPILING)" == "yes"
|
|
|
|
PREP = $(arch)-fake.rb
|
2008-01-08 14:02:10 +03:00
|
|
|
!else
|
2004-03-04 16:50:48 +03:00
|
|
|
PREP = miniruby$(EXEEXT)
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
2004-03-04 16:50:48 +03:00
|
|
|
|
2004-01-19 07:10:53 +03:00
|
|
|
!if !defined(EXTSTATIC)
|
2013-03-04 12:05:13 +04:00
|
|
|
EXTSTATIC =
|
2004-01-19 07:10:53 +03:00
|
|
|
!endif
|
|
|
|
|
2004-03-22 02:21:31 +03:00
|
|
|
OBJEXT = obj
|
2007-02-02 21:23:07 +03:00
|
|
|
ASMEXT = asm
|
2004-03-22 02:21:31 +03:00
|
|
|
|
2006-09-20 04:54:45 +04:00
|
|
|
INSTALLED_LIST= .installed.list
|
|
|
|
|
2009-03-15 03:17:21 +03:00
|
|
|
SRC_FILE = $(<:\=/)
|
2012-11-16 19:22:37 +04:00
|
|
|
OS_SRC_FILE = $(<:/=\)
|
|
|
|
DEST_FILE = $(@:\=/)
|
|
|
|
OS_DEST_FILE = $(@:/=\)
|
2009-03-15 03:17:21 +03:00
|
|
|
|
2008-01-08 14:02:10 +03:00
|
|
|
!if !defined(WINMAINOBJ)
|
2004-03-22 02:21:31 +03:00
|
|
|
WINMAINOBJ = winmain.$(OBJEXT)
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
2017-05-15 10:04:48 +03:00
|
|
|
MAINSRC = $(MAINOBJ:.obj=.c)
|
2009-03-05 05:27:20 +03:00
|
|
|
ARCHMINIOBJS = dmydln.$(OBJEXT) miniruby.res
|
2008-02-07 05:14:54 +03:00
|
|
|
LIBOBJS = $(MISSING) $(LIBOBJS)
|
2008-01-08 14:02:10 +03:00
|
|
|
|
|
|
|
!ifndef COMMON_LIBS
|
|
|
|
COMMON_LIBS = m
|
|
|
|
!endif
|
|
|
|
!ifndef COMMON_MACROS
|
|
|
|
COMMON_MACROS = WIN32_LEAN_AND_MEAN WIN32
|
|
|
|
!endif
|
|
|
|
!ifndef COMMON_HEADERS
|
2008-06-06 16:52:30 +04:00
|
|
|
COMMON_HEADERS = winsock2.h ws2tcpip.h windows.h
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
2004-03-22 02:21:31 +03:00
|
|
|
|
2013-03-02 17:49:49 +04:00
|
|
|
!if "$(EXTSTATIC)" == "static"
|
|
|
|
ENCOBJS = enc/encinit.$(OBJEXT) enc/libenc.lib enc/libtrans.lib
|
|
|
|
EXTOBJS = ext/extinit.$(OBJEXT)
|
2014-07-03 07:40:24 +04:00
|
|
|
! if !defined(ENCSTATIC)
|
|
|
|
ENCSTATIC = static
|
|
|
|
! endif
|
2014-11-27 23:02:32 +03:00
|
|
|
!else
|
|
|
|
ENCOBJS = dmyenc.$(OBJEXT)
|
|
|
|
EXTOBJS = dmyext.$(OBJEXT)
|
2013-03-02 17:49:49 +04:00
|
|
|
!endif
|
|
|
|
|
2007-06-10 07:06:15 +04:00
|
|
|
arch_hdrdir = $(EXTOUT)/include/$(arch)
|
2014-11-21 08:27:07 +03:00
|
|
|
top_srcdir = $(srcdir)
|
2007-06-10 07:06:15 +04:00
|
|
|
hdrdir = $(srcdir)/include
|
2015-01-18 06:56:52 +03:00
|
|
|
VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(win_srcdir)
|
2007-06-10 07:06:15 +04:00
|
|
|
|
2017-04-10 04:22:48 +03:00
|
|
|
!ifndef GIT
|
|
|
|
GIT = git
|
|
|
|
!endif
|
|
|
|
!if "$(HAVE_GIT)" == "yes" || "$(HAVE_GIT)" == "no"
|
|
|
|
!else if "$(GIT)" == ""
|
|
|
|
HAVE_GIT = no
|
2017-04-10 05:13:52 +03:00
|
|
|
!else if [for %I in ($(GIT)) do @if not "%~xI" == "" exit 1]
|
|
|
|
! if [for %I in ($(GIT)) do @if not "%~$$PATH:I" == "" exit 1]
|
2017-04-10 04:22:48 +03:00
|
|
|
HAVE_GIT = yes
|
|
|
|
! else
|
|
|
|
HAVE_GIT = no
|
|
|
|
! endif
|
|
|
|
!else
|
2017-04-10 05:13:52 +03:00
|
|
|
! if [for %x in (%PATHEXT:;= %) do @for %I in ($(GIT)%x) do @if not "%~$$PATH:I" == "" exit 1]
|
2017-04-10 04:22:48 +03:00
|
|
|
HAVE_GIT = yes
|
|
|
|
! else
|
|
|
|
HAVE_GIT = no
|
|
|
|
! endif
|
|
|
|
!endif
|
|
|
|
|
2009-01-16 11:33:02 +03:00
|
|
|
!if exist($(srcdir)/.svn)
|
|
|
|
VCS = svn
|
|
|
|
VCSUP = $(VCS) up $(SVNUPOPTIONS)
|
|
|
|
!else if exist($(srcdir)/.git/svn)
|
2017-04-10 04:22:48 +03:00
|
|
|
VCS = $(GIT) svn
|
2009-01-17 13:40:51 +03:00
|
|
|
VCSUP = $(VCS) rebase $(GITSVNREBASEOPTIONS)
|
2009-01-16 11:33:02 +03:00
|
|
|
!else if exist($(srcdir)/.git)
|
2017-04-10 04:22:48 +03:00
|
|
|
VCS = $(GIT)
|
2009-01-17 13:40:51 +03:00
|
|
|
VCSUP = $(VCS) pull $(GITPULLOPTIONS)
|
2014-09-19 11:04:35 +04:00
|
|
|
!else
|
2014-09-19 10:49:56 +04:00
|
|
|
VCSUP = rem
|
2009-01-16 11:33:02 +03:00
|
|
|
!endif
|
2010-10-26 07:47:15 +04:00
|
|
|
ruby_pc = $(RUBY_BASE_NAME)-$(MAJOR).$(MINOR).pc
|
2009-01-16 11:33:02 +03:00
|
|
|
|
2018-02-09 06:51:57 +03:00
|
|
|
MESSAGE_BEGIN = @(for %I in (
|
|
|
|
MESSAGE_END = ) do @echo.%~I)
|
2013-02-09 19:16:15 +04:00
|
|
|
ECHO_BEGIN = @echo.
|
|
|
|
ECHO_END =
|
2010-11-12 14:52:45 +03:00
|
|
|
|
2008-01-08 14:02:10 +03:00
|
|
|
all: $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(srcdir)/common.mk
|
2013-03-29 16:02:16 +04:00
|
|
|
prog: config
|
2004-03-22 02:21:31 +03:00
|
|
|
|
2000-08-03 13:55:54 +04:00
|
|
|
ruby: $(PROGRAM)
|
|
|
|
rubyw: $(WPROGRAM)
|
2010-11-18 17:56:34 +03:00
|
|
|
stub: $(STUBPROGRAM)
|
2016-08-20 05:20:34 +03:00
|
|
|
rubystub: $(STUBPROGRAM)
|
2010-11-18 17:56:34 +03:00
|
|
|
|
2015-01-18 06:56:52 +03:00
|
|
|
!if !exist(enc/trans/newline.c) && exist($(srcdir)/enc/trans/newline.c)
|
|
|
|
NEWLINE_C = $(srcdir)/enc/trans/newline.c
|
2012-03-26 09:08:55 +04:00
|
|
|
!else
|
2015-01-18 06:56:52 +03:00
|
|
|
NEWLINE_C = enc/trans/newline.c
|
2012-03-26 09:08:55 +04:00
|
|
|
!endif
|
|
|
|
!if !exist(miniprelude.c) && exist($(srcdir)/miniprelude.c)
|
|
|
|
MINIPRELUDE_C = $(srcdir)/miniprelude.c
|
|
|
|
!else
|
|
|
|
MINIPRELUDE_C = miniprelude.c
|
|
|
|
!endif
|
2014-11-11 13:29:00 +03:00
|
|
|
!if !exist(prelude.c) && exist($(srcdir)/prelude.c)
|
|
|
|
PRELUDE_C = $(srcdir)/prelude.c
|
|
|
|
!else
|
|
|
|
PRELUDE_C = prelude.c
|
|
|
|
!endif
|
2018-05-20 21:13:08 +03:00
|
|
|
!if !exist(golf_prelude.c) && exist($(srcdir)/golf_prelude.c)
|
|
|
|
GOLF_PRELUDE_C = $(srcdir)/golf_prelude.c
|
|
|
|
!else
|
|
|
|
GOLF_PRELUDE_C = golf_prelude.c
|
|
|
|
!endif
|
2013-01-06 14:08:22 +04:00
|
|
|
RBCONFIG = ./.rbconfig.time
|
2012-03-26 09:08:55 +04:00
|
|
|
|
2012-03-18 14:45:05 +04:00
|
|
|
!include $(srcdir)/common.mk
|
|
|
|
|
2010-11-18 17:56:34 +03:00
|
|
|
!ifdef SCRIPTPROGRAMS
|
|
|
|
!else if [echo>scriptbin.mk SCRIPTPROGRAMS = \]
|
|
|
|
!else if [for %I in ($(srcdir:/=\)\bin\*) do @echo>>scriptbin.mk %~nI.exe \]
|
|
|
|
!else if [echo.>>scriptbin.mk]
|
|
|
|
!else if [echo.>>scriptbin.mk]
|
|
|
|
!endif
|
|
|
|
!if [for %I in ($(srcdir:/=\)\bin\*) do @for %J in (\
|
|
|
|
"%~nI.exe: $$(srcdir)/bin/%~nI" \
|
2012-03-18 14:45:05 +04:00
|
|
|
" $$(ECHO) generating $$(@)" \
|
|
|
|
" $$(Q) copy /y /b $$(STUBPROGRAM) $$(@) > nul" \
|
|
|
|
" $$(Q) echo.>>$$(@)" \
|
|
|
|
" $$(Q) echo.>>$$(@)" \
|
|
|
|
" $$(Q) copy /b $$(@)+$$(srcdir:/=\)\bin\%~nI $$(@) > nul" \
|
|
|
|
"" \
|
2010-11-18 17:56:34 +03:00
|
|
|
) do @echo.%~J>>scriptbin.mk]
|
|
|
|
!else
|
|
|
|
! include scriptbin.mk
|
|
|
|
! if [del scriptbin.mk > nul]
|
|
|
|
! endif
|
|
|
|
!endif
|
|
|
|
|
|
|
|
scriptbin: $(SCRIPTPROGRAMS)
|
|
|
|
|
|
|
|
$(SCRIPTPROGRAMS): $(STUBPROGRAM)
|
2004-03-25 08:01:15 +03:00
|
|
|
|
2016-01-19 05:30:17 +03:00
|
|
|
update-src::
|
2009-03-06 12:37:31 +03:00
|
|
|
@cd "$(srcdir:/=\)" && set LC_TIME=C && $(VCSUP)
|
2009-01-16 11:33:02 +03:00
|
|
|
|
2018-03-05 04:54:21 +03:00
|
|
|
.PHONY: reconfig
|
|
|
|
reconfig $(MKFILES): $(srcdir)/common.mk $(srcdir)/version.h \
|
2014-06-10 12:30:01 +04:00
|
|
|
$(win_srcdir)/Makefile.sub $(win_srcdir)/configure.bat \
|
|
|
|
$(win_srcdir)/setup.mak $(win_srcdir)/enc-setup.mak \
|
|
|
|
$(srcdir)/enc/Makefile.in
|
2008-01-08 14:02:10 +03:00
|
|
|
$(COMSPEC) /C $(win_srcdir:/=\)\configure.bat $(configure_args)
|
2013-01-10 12:45:42 +04:00
|
|
|
@fc Makefile Makefile.old > nul && echo Makefile unchanged || \
|
|
|
|
(echo $(MKFILES) was updated, re-run $(MAKE). & exit 1)
|
2005-10-14 18:10:08 +04:00
|
|
|
|
2007-06-10 07:06:15 +04:00
|
|
|
RUBY_CONFIG_H = $(arch_hdrdir)/ruby/config.h
|
2005-03-03 12:38:40 +03:00
|
|
|
CONFIG_H = ./.config.h.time
|
2002-03-20 14:21:19 +03:00
|
|
|
|
2005-03-03 12:38:40 +03:00
|
|
|
config: config.status
|
|
|
|
|
|
|
|
config.status: $(CONFIG_H)
|
|
|
|
|
2008-01-08 14:02:10 +03:00
|
|
|
BANG = !
|
|
|
|
|
2016-12-26 11:01:37 +03:00
|
|
|
!if !exist(config.status)
|
|
|
|
!else if [for /f "skip=1 delims=, tokens=2-3" %I in (config.status) do @ \
|
|
|
|
if "%I" == "@RUBY_SO_NAME@" ( \
|
|
|
|
if not "%J" == "$(RUBY_SO_NAME)" exit 1 \
|
|
|
|
) else if "%I" == "@target_alias@" ( \
|
|
|
|
if not "%J" == "$(ARCH)-$(PLATFORM)" exit 1 \
|
|
|
|
) \
|
|
|
|
]
|
|
|
|
config.status: nul
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
|
|
|
|
2010-07-26 13:18:21 +04:00
|
|
|
guard = INCLUDE_RUBY_CONFIG_H
|
|
|
|
|
2008-01-08 14:02:10 +03:00
|
|
|
$(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
2005-03-03 12:38:40 +03:00
|
|
|
@echo Creating config.h
|
2007-06-10 07:06:15 +04:00
|
|
|
!if !exist("$(arch_hdrdir)")
|
|
|
|
@md $(arch_hdrdir:/=\)
|
|
|
|
!endif
|
|
|
|
!if !exist("$(arch_hdrdir)/ruby")
|
|
|
|
@md $(arch_hdrdir:/=\)\ruby
|
|
|
|
!endif
|
2013-06-21 04:52:33 +04:00
|
|
|
@$(IFCHANGE) "--timestamp=$(@:/=\)" $(RUBY_CONFIG_H:/=\) <<
|
2010-07-26 13:18:21 +04:00
|
|
|
#ifndef $(guard)
|
|
|
|
#define $(guard) 1
|
2005-12-30 12:23:15 +03:00
|
|
|
#if _MSC_VER != $(MSC_VER)
|
2007-06-10 07:06:15 +04:00
|
|
|
#error MSC version unmatch: _MSC_VER: $(MSC_VER) is expected.
|
2005-12-30 12:23:15 +03:00
|
|
|
#endif
|
2012-04-16 11:08:27 +04:00
|
|
|
#define RUBY_MSVCRT_VERSION $(RT_VER)
|
2002-05-14 13:22:22 +04:00
|
|
|
#define STDC_HEADERS 1
|
|
|
|
#define HAVE_SYS_TYPES_H 1
|
|
|
|
#define HAVE_SYS_STAT_H 1
|
2017-01-30 14:45:00 +03:00
|
|
|
!if $(MSC_VER) >= 1800
|
|
|
|
#define HAVE_STDBOOL_H 1
|
|
|
|
!endif
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_STDLIB_H 1
|
2010-08-01 12:27:34 +04:00
|
|
|
#define HAVE_STDDEF_H 1
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_STRING_H 1
|
|
|
|
#define HAVE_MEMORY_H 1
|
2006-02-14 07:39:32 +03:00
|
|
|
!if $(MSC_VER) >= 1400
|
|
|
|
#define HAVE_LONG_LONG 1
|
2017-02-28 05:58:12 +03:00
|
|
|
!else
|
|
|
|
#define ULL_TO_DOUBLE(n) ((double)(unsigned long)((n)>>32) * (1I64 << 32) + (unsigned long)(n))
|
2006-02-14 07:39:32 +03:00
|
|
|
!endif
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_OFF_T 1
|
|
|
|
#define SIZEOF_INT 4
|
|
|
|
#define SIZEOF_SHORT 2
|
|
|
|
#define SIZEOF_LONG 4
|
2006-02-14 05:48:08 +03:00
|
|
|
!if $(MSC_VER) >= 1400
|
|
|
|
#define SIZEOF_LONG_LONG 8
|
|
|
|
!else
|
2002-05-14 13:22:22 +04:00
|
|
|
#define SIZEOF_LONG_LONG 0
|
2006-02-14 05:48:08 +03:00
|
|
|
!endif
|
2002-05-14 13:22:22 +04:00
|
|
|
#define SIZEOF___INT64 8
|
2006-08-12 10:56:09 +04:00
|
|
|
#define _INTEGRAL_MAX_BITS 64
|
2008-01-08 14:02:10 +03:00
|
|
|
!if $(LARGEFILE_SUPPORT)
|
2006-08-12 10:56:09 +04:00
|
|
|
#define SIZEOF_OFF_T 8
|
2008-01-08 14:02:10 +03:00
|
|
|
!else
|
|
|
|
#define SIZEOF_OFF_T 4
|
|
|
|
!endif
|
2007-06-27 15:47:53 +04:00
|
|
|
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
|
|
|
|
#define SIZEOF_VOIDP 8
|
|
|
|
!else
|
2002-05-14 13:22:22 +04:00
|
|
|
#define SIZEOF_VOIDP 4
|
2007-06-27 15:47:53 +04:00
|
|
|
!endif
|
2002-05-14 13:22:22 +04:00
|
|
|
#define SIZEOF_FLOAT 4
|
|
|
|
#define SIZEOF_DOUBLE 8
|
2013-03-27 11:40:43 +04:00
|
|
|
#define SIGNEDNESS_OF_TIME_T -1
|
2017-05-12 12:46:45 +03:00
|
|
|
#define NEGATIVE_TIME_T 1
|
2009-10-01 09:19:19 +04:00
|
|
|
!if $(RT_VER) >= 80
|
2006-02-14 05:48:08 +03:00
|
|
|
#define SIZEOF_TIME_T 8
|
2009-03-10 22:47:46 +03:00
|
|
|
#define TIMET2NUM(v) LL2NUM(v)
|
|
|
|
#define NUM2TIMET(v) NUM2LL(v)
|
2006-02-14 05:48:08 +03:00
|
|
|
!else
|
2004-04-07 05:43:27 +04:00
|
|
|
#define SIZEOF_TIME_T 4
|
2009-03-10 22:47:46 +03:00
|
|
|
#define TIMET2NUM(v) LONG2NUM(v)
|
|
|
|
#define NUM2TIMET(v) NUM2LONG(v)
|
2006-02-14 05:48:08 +03:00
|
|
|
!endif
|
2013-08-15 09:32:02 +04:00
|
|
|
#define CLOCKID2NUM(v) INT2NUM(v)
|
|
|
|
#define NUM2CLOCKID(v) NUM2INT(v)
|
2013-08-23 06:07:20 +04:00
|
|
|
#define SIZEOF_CLOCK_T 4
|
2008-07-13 00:39:02 +04:00
|
|
|
#define SIZEOF_RLIM_T 0
|
|
|
|
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
|
|
|
|
#define SIZEOF_SIZE_T 8
|
|
|
|
#define SIZEOF_PTRDIFF_T 8
|
2009-01-16 06:18:09 +03:00
|
|
|
#define SIZEOF_INTPTR_T 8
|
|
|
|
#define SIZEOF_UINTPTR_T 8
|
2008-07-13 00:39:02 +04:00
|
|
|
!else
|
|
|
|
#define SIZEOF_SIZE_T 4
|
|
|
|
#define SIZEOF_PTRDIFF_T 4
|
2009-01-16 06:18:09 +03:00
|
|
|
#define SIZEOF_INTPTR_T 4
|
|
|
|
#define SIZEOF_UINTPTR_T 4
|
2008-07-13 00:39:02 +04:00
|
|
|
!endif
|
2008-09-08 13:09:41 +04:00
|
|
|
!if $(MSC_VER) < 1400
|
|
|
|
#define SIZE_MAX UINT_MAX
|
|
|
|
!endif
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_PROTOTYPES 1
|
|
|
|
#define TOKEN_PASTE(x,y) x##y
|
|
|
|
#define HAVE_STDARG_PROTOTYPES 1
|
2018-02-05 07:58:07 +03:00
|
|
|
!if $(MSC_VER) >= 1800
|
2018-02-05 07:07:25 +03:00
|
|
|
#define HAVE_VA_COPY 1
|
2018-02-05 07:58:07 +03:00
|
|
|
!else
|
|
|
|
#define HAVE_VA_COPY_VIA_STRUCT_ASSIGNMENT 1
|
|
|
|
!endif
|
2005-08-03 19:27:13 +04:00
|
|
|
!if $(MSC_VER) > 1100
|
2002-05-14 13:22:22 +04:00
|
|
|
#define NORETURN(x) __declspec(noreturn) x
|
2005-08-03 19:27:13 +04:00
|
|
|
!endif
|
|
|
|
!if $(MSC_VER) >= 1300
|
2005-04-30 06:59:44 +04:00
|
|
|
#define DEPRECATED(x) __declspec(deprecated) x
|
2015-07-28 04:32:15 +03:00
|
|
|
#define DEPRECATED_TYPE(mesg, x) __declspec(deprecated mesg) x
|
2005-04-30 06:59:44 +04:00
|
|
|
#define NOINLINE(x) __declspec(noinline) x
|
2005-08-03 19:27:13 +04:00
|
|
|
!endif
|
2016-05-21 16:24:32 +03:00
|
|
|
#define ALWAYS_INLINE(x) __forceinline x
|
2016-09-16 13:47:54 +03:00
|
|
|
#define WARN_UNUSED_RESULT(x) x
|
|
|
|
#define MAYBE_UNUSED(x) x
|
2015-07-21 14:29:12 +03:00
|
|
|
#define UNREACHABLE __assume(0)
|
2015-07-22 14:27:46 +03:00
|
|
|
#define ASSUME(x) __assume(!!(x))
|
2006-07-07 09:08:05 +04:00
|
|
|
#define FUNC_STDCALL(x) __stdcall x
|
|
|
|
#define FUNC_CDECL(x) __cdecl x
|
2007-06-28 17:31:08 +04:00
|
|
|
#define FUNC_FASTCALL(x) __fastcall x
|
2013-03-14 20:21:54 +04:00
|
|
|
!if $(MSC_VER) >= 1500
|
|
|
|
#define RUBY_FUNCTION_NAME_STRING __FUNCTION__
|
2014-02-25 11:00:10 +04:00
|
|
|
#define PACKED_STRUCT(x) __pragma(pack(push, 1)) x __pragma(pack(pop))
|
2014-07-21 16:13:07 +04:00
|
|
|
!else
|
|
|
|
#define PACKED_STRUCT(x) x
|
|
|
|
!endif
|
2014-02-25 11:00:10 +04:00
|
|
|
!if "$(ARCH)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
|
|
|
|
#define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
|
|
|
|
!else
|
|
|
|
#define PACKED_STRUCT_UNALIGNED(x) x
|
|
|
|
!endif
|
2005-10-25 21:00:03 +04:00
|
|
|
#define RUBY_EXTERN extern __declspec(dllimport)
|
2018-01-15 05:35:16 +03:00
|
|
|
#define RUBY_ALIGNAS(n) __declspec(align(n))
|
2018-01-15 05:35:17 +03:00
|
|
|
#define RUBY_ALIGNOF __alignof
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_DECL_SYS_NERR 1
|
|
|
|
#define HAVE_LIMITS_H 1
|
|
|
|
#define HAVE_FCNTL_H 1
|
|
|
|
#define HAVE_SYS_UTIME_H 1
|
2004-02-14 17:59:19 +03:00
|
|
|
#define HAVE_FLOAT_H 1
|
2013-03-16 18:48:33 +04:00
|
|
|
#define HAVE_TIME_H 1
|
2005-05-16 17:22:09 +04:00
|
|
|
#define rb_pid_t int
|
|
|
|
#define rb_gid_t int
|
|
|
|
#define rb_uid_t int
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_STRUCT_STAT_ST_RDEV 1
|
|
|
|
#define HAVE_ST_RDEV 1
|
2013-03-16 18:48:33 +04:00
|
|
|
#define HAVE_STRUCT_TIMEVAL 1
|
2015-04-23 22:51:18 +03:00
|
|
|
!if $(MSC_VER) >= 1900
|
|
|
|
#define HAVE_STRUCT_TIMESPEC
|
|
|
|
!endif
|
2011-10-29 16:08:47 +04:00
|
|
|
!if $(MSC_VER) >= 1600
|
|
|
|
#define HAVE_STDINT_H 1
|
|
|
|
!else
|
* configure.in (int8_t, uint8_t, int16_t, uint16_t int32_t,
uint32_t int64_t, uint64_t, int128_t, uint128_t,
intptr_t, uintptr_t): check if defined.
* win32/Makefile.sub: follow configure.in.
* ext/digest/defs.h: remove checks for uint8_t, uint32_t and uint64_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-14 04:47:02 +03:00
|
|
|
#define int8_t signed char
|
|
|
|
#define uint8_t unsigned char
|
2011-10-29 16:08:47 +04:00
|
|
|
#define int16_t short
|
|
|
|
#define uint16_t unsigned short
|
|
|
|
#define int32_t int
|
|
|
|
#define uint32_t unsigned int
|
|
|
|
#define int64_t __int64
|
|
|
|
#define uint64_t unsigned __int64
|
2010-04-29 19:54:18 +04:00
|
|
|
#define INT8_MIN _I8_MIN
|
|
|
|
#define INT8_MAX _I8_MAX
|
|
|
|
#define UINT8_MAX _UI8_MAX
|
2011-10-29 16:08:47 +04:00
|
|
|
#define INT16_MIN _I16_MIN
|
|
|
|
#define INT16_MAX _I16_MAX
|
|
|
|
#define UINT16_MAX _UI16_MAX
|
|
|
|
#define INT32_MIN _I32_MIN
|
|
|
|
#define INT32_MAX _I32_MAX
|
|
|
|
#define UINT32_MAX _UI32_MAX
|
|
|
|
#define INT64_MIN _I64_MIN
|
|
|
|
#define INT64_MAX _I64_MAX
|
|
|
|
#define UINT64_MAX _UI64_MAX
|
|
|
|
!endif
|
|
|
|
#define HAVE_INT8_T 1
|
|
|
|
#define HAVE_UINT8_T 1
|
|
|
|
#define SIZEOF_INT8_T 1
|
|
|
|
#define SIZEOF_UINT8_T 1
|
* configure.in (int8_t, uint8_t, int16_t, uint16_t int32_t,
uint32_t int64_t, uint64_t, int128_t, uint128_t,
intptr_t, uintptr_t): check if defined.
* win32/Makefile.sub: follow configure.in.
* ext/digest/defs.h: remove checks for uint8_t, uint32_t and uint64_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-14 04:47:02 +03:00
|
|
|
#define HAVE_INT16_T 1
|
|
|
|
#define HAVE_UINT16_T 1
|
2010-03-02 23:49:02 +03:00
|
|
|
#define SIZEOF_INT16_T 2
|
2010-04-29 19:54:18 +04:00
|
|
|
#define SIZEOF_UINT16_T 2
|
* configure.in (int8_t, uint8_t, int16_t, uint16_t int32_t,
uint32_t int64_t, uint64_t, int128_t, uint128_t,
intptr_t, uintptr_t): check if defined.
* win32/Makefile.sub: follow configure.in.
* ext/digest/defs.h: remove checks for uint8_t, uint32_t and uint64_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-14 04:47:02 +03:00
|
|
|
#define HAVE_INT32_T 1
|
|
|
|
#define HAVE_UINT32_T 1
|
2010-03-02 23:49:02 +03:00
|
|
|
#define SIZEOF_INT32_T 4
|
2010-04-29 19:54:18 +04:00
|
|
|
#define SIZEOF_UINT32_T 4
|
2010-03-02 23:49:02 +03:00
|
|
|
#define HAVE_INT64_T 1
|
|
|
|
#define HAVE_UINT64_T 1
|
|
|
|
#define SIZEOF_INT64_T 8
|
2010-04-29 19:54:18 +04:00
|
|
|
#define SIZEOF_UINT64_T 8
|
* configure.in (int8_t, uint8_t, int16_t, uint16_t int32_t,
uint32_t int64_t, uint64_t, int128_t, uint128_t,
intptr_t, uintptr_t): check if defined.
* win32/Makefile.sub: follow configure.in.
* ext/digest/defs.h: remove checks for uint8_t, uint32_t and uint64_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-14 04:47:02 +03:00
|
|
|
#define HAVE_INTPTR_T 1
|
|
|
|
#define HAVE_UINTPTR_T 1
|
2008-03-31 13:58:41 +04:00
|
|
|
#define HAVE_SSIZE_T 1
|
2008-04-01 04:42:06 +04:00
|
|
|
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
|
2008-03-31 13:58:41 +04:00
|
|
|
#define ssize_t __int64
|
|
|
|
!else
|
|
|
|
#define ssize_t int
|
|
|
|
!endif
|
2010-11-11 18:30:24 +03:00
|
|
|
#define PRI_LL_PREFIX "I64"
|
2018-07-05 06:20:20 +03:00
|
|
|
#define PRI_PIDT_PREFIX PRI_INT_PREFIX
|
2002-05-14 13:22:22 +04:00
|
|
|
#define GETGROUPS_T int
|
|
|
|
#define RETSIGTYPE void
|
2009-03-10 22:47:46 +03:00
|
|
|
#define TYPEOF_TIMEVAL_TV_SEC long
|
2013-10-23 20:34:17 +04:00
|
|
|
!if $(RT_VER) >= 120
|
2013-10-23 17:51:05 +04:00
|
|
|
#define HAVE_ACOSH 1
|
|
|
|
#define HAVE_ASINH 1
|
|
|
|
#define HAVE_ATANH 1
|
|
|
|
#define HAVE_CBRT 1
|
|
|
|
#define HAVE_LOG2 1
|
2013-10-23 20:34:17 +04:00
|
|
|
#define log2(x) log2(x)
|
2013-10-23 17:51:05 +04:00
|
|
|
#define HAVE_ERF 1
|
|
|
|
#define HAVE_ERFC 1
|
|
|
|
#define HAVE_ROUND 1
|
|
|
|
#define HAVE_TGAMMA 1
|
2014-05-18 09:46:36 +04:00
|
|
|
#define HAVE_NEXTAFTER 1
|
2013-10-23 17:51:05 +04:00
|
|
|
!endif
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_ALLOCA 1
|
|
|
|
#define HAVE_DUP2 1
|
|
|
|
#define HAVE_MEMCMP 1
|
|
|
|
#define HAVE_MEMMOVE 1
|
|
|
|
#define HAVE_MKDIR 1
|
2013-08-15 09:32:02 +04:00
|
|
|
#define HAVE_CLOCK_GETTIME 1
|
2013-09-06 09:23:28 +04:00
|
|
|
#define HAVE_CLOCK_GETRES 1
|
2018-06-15 13:15:40 +03:00
|
|
|
#define HAVE_GETTIMEOFDAY 1
|
2013-05-12 12:42:19 +04:00
|
|
|
#define HAVE_SPAWNV 1
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_STRCASECMP 1
|
|
|
|
#define HAVE_STRNCASECMP 1
|
|
|
|
#define HAVE_STRERROR 1
|
|
|
|
#define HAVE_STRFTIME 1
|
|
|
|
#define HAVE_STRCHR 1
|
|
|
|
#define HAVE_STRSTR 1
|
|
|
|
#define HAVE_FLOCK 1
|
2003-04-21 16:26:08 +04:00
|
|
|
#define HAVE_ISNAN 1
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_FINITE 1
|
2018-01-27 04:28:21 +03:00
|
|
|
!if $(RT_VER) >= 120
|
2018-01-26 19:38:38 +03:00
|
|
|
#define HAVE_NAN 1
|
|
|
|
!endif
|
2004-02-14 17:59:19 +03:00
|
|
|
#define HAVE_HYPOT 1
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_FMOD 1
|
|
|
|
#define HAVE_FREXP 1
|
|
|
|
#define HAVE_MODF 1
|
|
|
|
#define HAVE_WAITPID 1
|
2003-05-13 12:59:36 +04:00
|
|
|
#define HAVE_FSYNC 1
|
2004-02-14 17:59:19 +03:00
|
|
|
#define HAVE_GETCWD 1
|
2006-08-12 10:56:09 +04:00
|
|
|
#define HAVE_TRUNCATE 1
|
2008-02-15 04:27:48 +03:00
|
|
|
#define HAVE_FTRUNCATE 1
|
2015-03-23 08:40:48 +03:00
|
|
|
#define HAVE_LSTAT 1
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_TIMES 1
|
2004-09-07 07:52:15 +04:00
|
|
|
#define HAVE_FCNTL 1
|
2004-01-21 19:09:40 +03:00
|
|
|
#define HAVE_LINK 1
|
2015-03-23 11:36:04 +03:00
|
|
|
#define HAVE_READLINK 1
|
2015-08-25 00:34:45 +03:00
|
|
|
#define HAVE_SYMLINK 1
|
2015-08-26 08:21:41 +03:00
|
|
|
#define HAVE_LCHOWN 1
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE__SETJMP 1
|
|
|
|
#define HAVE_TELLDIR 1
|
|
|
|
#define HAVE_SEEKDIR 1
|
|
|
|
#define HAVE_MKTIME 1
|
|
|
|
#define HAVE_COSH 1
|
|
|
|
#define HAVE_SINH 1
|
|
|
|
#define HAVE_TANH 1
|
2010-03-03 00:19:33 +03:00
|
|
|
#define HAVE_SIGNBIT 1
|
2002-05-14 13:22:22 +04:00
|
|
|
#define HAVE_TZNAME 1
|
|
|
|
#define HAVE_DAYLIGHT 1
|
2012-04-16 11:22:43 +04:00
|
|
|
#define HAVE_GMTIME_R 1
|
2016-05-11 19:39:24 +03:00
|
|
|
!if $(RT_VER) > 120
|
2016-05-11 11:18:56 +03:00
|
|
|
#define HAVE_QSORT_S
|
|
|
|
!endif
|
2013-06-08 14:26:36 +04:00
|
|
|
#define HAVE_TYPE_NET_LUID 1
|
2002-05-14 13:22:22 +04:00
|
|
|
#define SETPGRP_VOID 1
|
|
|
|
#define RSHIFT(x,y) ((x)>>(int)y)
|
* include/ruby/intern.h, thread.c, win32/Makefile.sub (rb_fdset_t,
rb_fd_init, rb_fd_term, rb_fd_zero, rb_fd_set, rb_fd_clr, rb_fd_isset,
rb_fd_select, rb_fd_ptr, rb_fd_max, HAVE_RB_FD_INIT): new type,
functions, and macros for Windows.
* win32/win32.c (extract_fd, rb_w32_select): use rb_fdset_t to expand
fd_array if needed. [ruby-core:19946]
* win32/win32.c (copy_fd): new funcion for rb_w32_select().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 10:52:22 +03:00
|
|
|
#define HAVE_RB_FD_INIT 1
|
2008-04-01 04:42:06 +04:00
|
|
|
#define RUBY_SETJMP(env) _setjmp(env)
|
|
|
|
#define RUBY_LONGJMP(env,val) longjmp(env,val)
|
|
|
|
#define RUBY_JMP_BUF jmp_buf
|
2004-02-14 17:59:19 +03:00
|
|
|
#define inline __inline
|
|
|
|
#define NEED_IO_SEEK_BETWEEN_RW 1
|
2009-03-04 13:35:28 +03:00
|
|
|
!if "$(MACHINE)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
|
2004-02-14 17:59:19 +03:00
|
|
|
#define STACK_GROW_DIRECTION -1
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
2002-05-14 13:22:22 +04:00
|
|
|
#define DEFAULT_KCODE KCODE_NONE
|
2009-02-19 08:48:14 +03:00
|
|
|
#define LOAD_RELATIVE 1
|
2002-05-14 13:22:22 +04:00
|
|
|
#define DLEXT ".so"
|
2018-04-26 15:36:27 +03:00
|
|
|
!if "$(libdir_basename)" != "lib"
|
|
|
|
#define LIBDIR_BASENAME "$(libdir_basename)"
|
|
|
|
!endif
|
2013-03-02 17:49:49 +04:00
|
|
|
!if "$(EXTSTATIC)" == "static"
|
|
|
|
#define EXTSTATIC 1
|
|
|
|
!endif
|
2009-11-30 10:54:26 +03:00
|
|
|
#define EXECUTABLE_EXTS $(EXECUTABLE_EXTS)
|
2009-03-17 07:48:03 +03:00
|
|
|
#define RUBY_COREDLL "$(RT)"
|
2013-05-15 20:44:55 +04:00
|
|
|
#define RUBY_PLATFORM "$(arch)"
|
|
|
|
#define RUBY_SITEARCH "$(sitearch)"
|
2010-07-26 13:18:21 +04:00
|
|
|
#endif /* $(guard) */
|
2012-03-27 17:44:25 +04:00
|
|
|
<<
|
2005-03-03 12:38:40 +03:00
|
|
|
|
2007-06-10 07:06:15 +04:00
|
|
|
#!if exist($(RUBY_CONFIG_H))
|
2005-03-03 12:38:40 +03:00
|
|
|
#! if exist(config_h.bak)
|
2007-06-10 07:06:15 +04:00
|
|
|
# @del $(RUBY_CONFIG_H:.h=_h).bak
|
2005-03-03 12:38:40 +03:00
|
|
|
#! endif
|
2007-06-10 07:06:15 +04:00
|
|
|
# @copy $(RUBY_CONFIG_H) $(RUBY_CONFIG_H:.h=_h).bak
|
2005-03-03 12:38:40 +03:00
|
|
|
#!endif
|
2007-06-10 07:06:15 +04:00
|
|
|
#!if exist($(RUBY_CONFIG_H))
|
2005-03-03 12:38:40 +03:00
|
|
|
# @echo NMAKE will abort if config.h is changed, then restart NMAKE.
|
2007-06-10 07:06:15 +04:00
|
|
|
# @fc.exe $(RUBY_CONFIG_H) $(RUBY_CONFIG_H:.h=_h).bak > nul
|
|
|
|
# @echo $(RUBY_CONFIG_H) unchanged.
|
|
|
|
# @del $(RUBY_CONFIG_H)
|
|
|
|
# @ren $(RUBY_CONFIG_H:.h=_h).bak $(RUBY_CONFIG_H)
|
2005-03-03 12:38:40 +03:00
|
|
|
#!endif
|
2002-03-20 14:21:19 +03:00
|
|
|
|
2010-01-29 08:21:55 +03:00
|
|
|
EXECUTABLE_EXTS = $(EXECUTABLE_EXTS:"=) # "
|
|
|
|
EXECUTABLE_EXTS = $(EXECUTABLE_EXTS:,= )
|
|
|
|
|
2008-01-08 14:02:10 +03:00
|
|
|
config.status: $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(srcdir)/common.mk
|
2005-03-03 12:38:40 +03:00
|
|
|
@echo Creating $@
|
|
|
|
@exit <<$@
|
2002-03-20 15:59:21 +03:00
|
|
|
# Generated automatically by Makefile.sub.
|
|
|
|
s,@SHELL@,$$(COMSPEC),;t t
|
2005-04-20 19:08:36 +04:00
|
|
|
s,@BUILD_FILE_SEPARATOR@,\,;t t
|
2004-03-23 08:32:01 +03:00
|
|
|
s,@PATH_SEPARATOR@,;,;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@CFLAGS@,$(CFLAGS),;t t
|
2010-12-07 02:00:47 +03:00
|
|
|
s,@WERRORFLAG@,$(WERRORFLAG),;t t
|
2007-12-19 22:16:32 +03:00
|
|
|
s,@DEFS@,$(DEFS),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@CPPFLAGS@,$(CPPFLAGS),;t t
|
|
|
|
s,@CXXFLAGS@,$(CXXFLAGS),;t t
|
|
|
|
s,@FFLAGS@,$(FFLAGS),;t t
|
2009-03-10 06:27:54 +03:00
|
|
|
s,@LDFLAGS@,$(LDFLAGS),;t t
|
2018-03-02 10:49:20 +03:00
|
|
|
s,@LIBS@,user32.lib,;t t
|
2018-03-02 04:37:53 +03:00
|
|
|
s,@MAINLIBS@,$(MAINLIBS),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@exec_prefix@,$${prefix},;t t
|
2003-12-28 20:25:31 +03:00
|
|
|
s,@prefix@,$(prefix),;t t
|
2010-12-16 13:55:11 +03:00
|
|
|
s,@program_transform_name@,s,.*,$(PROGRAM_PREFIX)&$(PROGRAM_SUFFIX),,;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@bindir@,$${exec_prefix}/bin,;t t
|
|
|
|
s,@sbindir@,$${exec_prefix}/sbin,;t t
|
|
|
|
s,@libexecdir@,$${exec_prefix}/libexec,;t t
|
|
|
|
s,@datadir@,$${prefix}/share,;t t
|
2017-10-24 16:48:08 +03:00
|
|
|
s,@sysconfdir@,,;t t
|
|
|
|
s,@sharedstatedir@,$${prefix}/com,;t t
|
|
|
|
s,@localstatedir@,$${prefix}/var,;t t
|
2016-01-22 17:28:31 +03:00
|
|
|
s,@libdir@,$${exec_prefix}/$(libdir_basename),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@includedir@,$${prefix}/include,;t t
|
|
|
|
s,@oldincludedir@,/usr/include,;t t
|
2009-09-16 12:42:48 +04:00
|
|
|
s,@infodir@,$${datadir}/info,;t t
|
|
|
|
s,@mandir@,$${datadir}/man,;t t
|
|
|
|
s,@ridir@,$${datadir}/ri,;t t
|
|
|
|
s,@docdir@,$${datadir}/doc/$${RUBY_BASE_NAME},;t t
|
2008-07-11 17:10:29 +04:00
|
|
|
s,@build@,$(CPU)-pc-$(PLATFORM),;t t
|
|
|
|
s,@build_alias@,$(CPU)-$(PLATFORM),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@build_cpu@,$(CPU),;t t
|
|
|
|
s,@build_vendor@,pc,;t t
|
2008-07-11 17:10:29 +04:00
|
|
|
s,@build_os@,$(PLATFORM),;t t
|
|
|
|
s,@host@,$(CPU)-pc-$(PLATFORM),;t t
|
|
|
|
s,@host_alias@,$(CPU)-$(PLATFORM),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@host_cpu@,$(CPU),;t t
|
|
|
|
s,@host_vendor@,pc,;t t
|
2008-07-11 17:10:29 +04:00
|
|
|
s,@host_os@,$(PLATFORM),;t t
|
|
|
|
s,@target@,$(ARCH)-pc-$(PLATFORM),;t t
|
|
|
|
s,@target_alias@,$(ARCH)-$(PLATFORM),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@target_cpu@,$(ARCH),;t t
|
|
|
|
s,@target_vendor@,pc,;t t
|
2008-07-11 17:10:29 +04:00
|
|
|
s,@target_os@,$(PLATFORM),;t t
|
2011-12-14 15:02:00 +04:00
|
|
|
s,@NULLCMD@,:,;t t
|
2002-03-28 12:59:49 +03:00
|
|
|
s,@CC@,$(CC),;t t
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
s,@CPP@,$(CPP),;t t
|
2005-04-21 01:45:43 +04:00
|
|
|
s,@CXX@,$$(CC),;t t
|
|
|
|
s,@LD@,$$(CC),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@YACC@,$(YACC),;t t
|
2002-10-22 08:19:26 +04:00
|
|
|
s,@RANLIB@,,;t t
|
2002-09-10 12:24:11 +04:00
|
|
|
s,@AR@,$(AR),;t t
|
2002-10-22 08:19:26 +04:00
|
|
|
s,@ARFLAGS@,$(ARFLAGS),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@LN_S@,$(LN_S),;t t
|
2007-12-24 05:56:33 +03:00
|
|
|
s,@SET_MAKE@,MFLAGS = -$$(MAKEFLAGS),;t t
|
2007-12-19 22:16:32 +03:00
|
|
|
s,@RM@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rm.bat,;t t
|
2010-12-26 16:46:02 +03:00
|
|
|
s,@RMDIR@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rmdirs.bat,:t t
|
2009-01-25 05:06:29 +03:00
|
|
|
s,@RMDIRS@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rmdirs.bat,;t t
|
2014-07-07 11:08:06 +04:00
|
|
|
s,@RMALL@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rm.bat -f -r,:t t
|
2013-03-02 17:50:08 +04:00
|
|
|
s,@MAKEDIRS@,$$(COMSPEC) /E:ON /C $$(top_srcdir:/=\)\win32\makedirs.bat,;t t
|
2008-01-08 14:02:10 +03:00
|
|
|
s,@LIBOBJS@,$(LIBOBJS),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@ALLOCA@,$(ALLOCA),;t t
|
|
|
|
s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
|
|
|
|
s,@EXEEXT@,.exe,;t t
|
2009-11-30 10:54:26 +03:00
|
|
|
s,@EXECUTABLE_EXTS@,$(EXECUTABLE_EXTS),;t t
|
2004-03-22 02:21:31 +03:00
|
|
|
s,@OBJEXT@,$(OBJEXT),;t t
|
2014-10-08 05:38:32 +04:00
|
|
|
s,@ASMEXT@,$(ASMEXT),;t t
|
2003-12-01 03:30:37 +03:00
|
|
|
s,@XCFLAGS@,$(XCFLAGS),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@XLDFLAGS@,$(XLDFLAGS),;t t
|
2007-12-24 06:49:56 +03:00
|
|
|
s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH),;t t
|
2012-07-23 18:58:42 +04:00
|
|
|
s,@EXTDLDFLAGS@,$(EXTDLDFLAGS),;t t
|
2003-12-01 03:30:37 +03:00
|
|
|
s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@STATIC@,$(STATIC),;t t
|
2003-03-04 17:12:19 +03:00
|
|
|
s,@CCDLFLAGS@,,;t t
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
s,@LDSHARED@,$(LDSHARED),;t t
|
2017-10-14 18:35:05 +03:00
|
|
|
s,@SOEXT@,dll,;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@DLEXT@,so,;t t
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
s,@LIBEXT@,lib,;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@STRIP@,$(STRIP),;t t
|
|
|
|
s,@EXTSTATIC@,$(EXTSTATIC),;t t
|
|
|
|
s,@setup@,Setup,;t t
|
2002-09-08 13:08:15 +04:00
|
|
|
s,@MINIRUBY@,$(MINIRUBY),;t t
|
2005-03-03 12:38:40 +03:00
|
|
|
s,@PREP@,miniruby$(EXEEXT),;t t
|
|
|
|
s,@RUNRUBY@,$(RUNRUBY),;t t
|
|
|
|
s,@EXTOUT@,$(EXTOUT),;t t
|
|
|
|
s,@ARCHFILE@,,;t t
|
|
|
|
s,@RDOCTARGET@,,;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t
|
|
|
|
s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t
|
2009-05-08 05:14:14 +04:00
|
|
|
s,@RUBY_BASE_NAME@,$(RUBY_BASE_NAME),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
s,@rubyw_install_name@,$(RUBYW_INSTALL_NAME),;t t
|
|
|
|
s,@RUBYW_INSTALL_NAME@,$(RUBYW_INSTALL_NAME),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@RUBY_SO_NAME@,$(RUBY_SO_NAME),;t t
|
2002-11-14 16:51:19 +03:00
|
|
|
s,@LIBRUBY_A@,$$(RUBY_SO_NAME)-static.lib,;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@LIBRUBY_SO@,$$(RUBY_SO_NAME).dll,;t t
|
|
|
|
s,@LIBRUBY_ALIASES@,$(LIBRUBY_ALIASES),;t t
|
|
|
|
s,@LIBRUBY@,$$(RUBY_SO_NAME).lib,;t t
|
2002-11-14 16:51:19 +03:00
|
|
|
s,@LIBRUBYARG@,$$(LIBRUBYARG_SHARED),;t t
|
2018-03-02 04:37:53 +03:00
|
|
|
s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A) $$(MAINLIBS),;t t
|
2002-11-14 16:51:19 +03:00
|
|
|
s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@SOLIBS@,$(SOLIBS),;t t
|
|
|
|
s,@DLDLIBS@,$(DLDLIBS),;t t
|
|
|
|
s,@ENABLE_SHARED@,yes,;t t
|
2008-08-06 08:55:39 +04:00
|
|
|
s,@BASERUBY@,$(BASERUBY),;t t
|
2004-03-22 02:21:31 +03:00
|
|
|
s,@OUTFLAG@,$(OUTFLAG),;t t
|
2007-12-24 06:49:56 +03:00
|
|
|
s,@COUTFLAG@,$(COUTFLAG),;t t
|
2016-07-11 19:30:03 +03:00
|
|
|
s,@CSRCFLAG@,$(CSRCFLAG),;t t
|
2002-09-15 16:57:21 +04:00
|
|
|
s,@CPPOUTFILE@,-P,;t t
|
2017-09-13 18:28:16 +03:00
|
|
|
s,@PRELOADENV@,,;t t
|
|
|
|
s,@LIBPATHENV@,PATH,;t t
|
2009-07-15 11:30:42 +04:00
|
|
|
s,@LIBPATHFLAG@, -libpath:%s,;t t
|
2003-10-31 06:58:21 +03:00
|
|
|
s,@RPATHFLAG@,,;t t
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
s,@LIBARG@,%s.lib,;t t
|
2009-03-10 07:45:51 +03:00
|
|
|
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) -link $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;t t
|
2006-05-24 20:52:00 +04:00
|
|
|
!if $(MSC_VER) >= 1400
|
2009-10-01 09:19:19 +04:00
|
|
|
s,@LINK_SO@,@if exist $$(@).manifest $$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t
|
|
|
|
s,@LINK_SO@,@if exist $$(@).manifest $(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t
|
|
|
|
s,@LINK_SO@,@if exist $$(@).manifest $$(RM) $$(@:/=\).manifest,;t t
|
2006-05-24 20:52:00 +04:00
|
|
|
!endif
|
2016-07-11 19:30:03 +03:00
|
|
|
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c $$(CSRCFLAG)$$(<:\=/),;t t
|
2007-12-24 06:49:56 +03:00
|
|
|
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t
|
2016-07-11 19:30:03 +03:00
|
|
|
s,@ASSEMBLE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -Fa$$(@) -c $$(CSRCFLAG)$$(<:\=/),;t t
|
2014-10-08 05:38:32 +04:00
|
|
|
s,@ASSEMBLE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -Fa$$(@) -c -Tp$$(<:\=/),;t t
|
2012-11-28 16:19:49 +04:00
|
|
|
s,@COMPILE_RULES@,{$$(*VPATH*)}.%s.%s: .%s.%s:,;t t
|
2007-06-10 07:06:15 +04:00
|
|
|
s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t
|
2002-10-22 08:19:26 +04:00
|
|
|
s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
|
2008-01-08 14:02:10 +03:00
|
|
|
s,@COMMON_LIBS@,$(COMMON_LIBS),;t t
|
|
|
|
s,@COMMON_MACROS@,$(COMMON_MACROS),;t t
|
|
|
|
s,@COMMON_HEADERS@,$(COMMON_HEADERS),;t t
|
2008-08-07 09:16:27 +04:00
|
|
|
s,@cleanobjs@,$$*.exp $$*.lib $$*.pdb,;t t
|
2004-03-23 08:32:01 +03:00
|
|
|
s,@DISTCLEANFILES@,vc*.pdb,;t t
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
s,@EXPORT_PREFIX@, ,;t t
|
2013-02-07 15:55:14 +04:00
|
|
|
s,@archlibdir@,$${libdir}/$${arch},;t t
|
|
|
|
s,@sitearchlibdir@,$${libdir}/$${sitearch},;t t
|
|
|
|
s,@archincludedir@,$${includedir}/$${arch},;t t
|
|
|
|
s,@sitearchincludedir@,$${includedir}/$${sitearch},;t t
|
2008-07-11 17:10:29 +04:00
|
|
|
s,@arch@,$(ARCH)-$(PLATFORM),;t t
|
2002-08-23 12:18:19 +04:00
|
|
|
s,@sitearch@,$(ARCH)-$(RT),;t t
|
2008-07-15 17:34:49 +04:00
|
|
|
s,@ruby_version@,$(ruby_version),;t t
|
2016-01-09 04:44:56 +03:00
|
|
|
s,@RUBY_PROGRAM_VERSION@,$(RUBY_PROGRAM_VERSION),;t t
|
2009-05-08 05:14:14 +04:00
|
|
|
s,@rubylibprefix@,$${prefix}/lib/$${RUBY_BASE_NAME},;t t
|
2013-02-07 11:21:33 +04:00
|
|
|
s,@rubyarchdir@,$${rubylibdir}/$${arch},;t t
|
|
|
|
s,@rubylibdir@,$${rubylibprefix}/$${ruby_version},;t t
|
2009-05-08 05:14:14 +04:00
|
|
|
s,@sitedir@,$${rubylibprefix}/site_ruby,;t t
|
2013-02-11 08:15:14 +04:00
|
|
|
s,@sitearchdir@,$${sitelibdir}/$${sitearch},;t t
|
2013-02-07 15:55:14 +04:00
|
|
|
s,@sitelibdir@,$${sitedir}/$${ruby_version},;t t
|
2009-05-08 05:14:14 +04:00
|
|
|
s,@vendordir@,$${rubylibprefix}/vendor_ruby,;t t
|
2013-05-16 11:20:00 +04:00
|
|
|
s,@vendorarchdir@,$${vendorlibdir}/$${sitearch},;t t
|
2013-02-07 15:55:14 +04:00
|
|
|
s,@vendorlibdir@,$${vendordir}/$${ruby_version},;t t
|
2009-05-08 05:14:14 +04:00
|
|
|
s,@rubyhdrdir@,$$(includedir)/$${RUBY_BASE_NAME}-$$(ruby_version),;t t
|
2007-06-10 10:43:12 +04:00
|
|
|
s,@sitehdrdir@,$$(rubyhdrdir)/site_ruby,;t t
|
2007-11-04 18:26:21 +03:00
|
|
|
s,@vendorhdrdir@,$$(rubyhdrdir)/vendor_ruby,;t t
|
2013-02-07 15:55:14 +04:00
|
|
|
s,@rubyarchhdrdir@,$$(rubyhdrdir)/$${arch},;t t
|
|
|
|
s,@sitearchhdrdir@,$$(sitehdrdir)/$${sitearch},;t t
|
|
|
|
s,@vendorarchhdrdir@,$$(vendorhdrdir)/$${sitearch},;t t
|
2013-10-30 07:44:30 +04:00
|
|
|
s,@PLATFORM_DIR@,$(PLATFORM_DIR),;t t
|
|
|
|
s,@THREAD_MODEL@,$(THREAD_MODEL),;t t
|
2002-03-20 15:59:21 +03:00
|
|
|
s,@configure_args@,--with-make-prog=nmake --enable-shared $(configure_args),;t t
|
|
|
|
s,@configure_input@,$$configure_input,;t t
|
|
|
|
s,@srcdir@,$(srcdir),;t t
|
|
|
|
s,@top_srcdir@,$(srcdir),;t t
|
2009-01-27 05:09:47 +03:00
|
|
|
s,@try_header@,try_compile,;t t
|
2010-10-26 07:47:15 +04:00
|
|
|
s,@ruby_pc@,$(ruby_pc),;t t
|
2007-12-25 16:57:19 +03:00
|
|
|
<<KEEP
|
2001-06-09 11:41:44 +04:00
|
|
|
|
2008-09-02 07:32:32 +04:00
|
|
|
miniruby: miniruby$(EXEEXT)
|
|
|
|
|
2004-03-22 02:21:31 +03:00
|
|
|
miniruby$(EXEEXT):
|
2009-11-19 11:04:11 +03:00
|
|
|
@echo $(LIBS)
|
2010-11-17 17:17:26 +03:00
|
|
|
$(ECHO) linking $(@:\=/)
|
2015-03-08 09:30:32 +03:00
|
|
|
$(Q) $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(LIBS) -Fe$@ -link $(LDFLAGS)
|
2009-01-27 05:03:54 +03:00
|
|
|
@$(RM) miniruby.lib miniruby.exp
|
2010-11-12 14:51:42 +03:00
|
|
|
$(Q) miniruby.exe -v
|
|
|
|
$(Q) $(LDSHARED_1)
|
|
|
|
$(Q) $(LDSHARED_2)
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2009-03-05 05:27:20 +03:00
|
|
|
miniruby.rc:
|
|
|
|
@exit > $@
|
|
|
|
|
2008-01-08 14:02:10 +03:00
|
|
|
!if "$(PROGRAM)" != ""
|
|
|
|
$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
|
2010-11-17 17:17:26 +03:00
|
|
|
$(ECHO) linking $(@:\=/)
|
2018-05-20 21:36:53 +03:00
|
|
|
$(Q) $(PURIFY) $(CC) $(MAINOBJ) $(EXTOBJS) $(RUBY_INSTALL_NAME).res \
|
2009-03-10 07:45:51 +03:00
|
|
|
$(OUTFLAG)$@ $(LIBRUBYARG) -link $(LDFLAGS) $(XLDFLAGS)
|
2010-11-12 14:51:42 +03:00
|
|
|
$(Q) $(LDSHARED_0)
|
|
|
|
$(Q) $(LDSHARED_1)
|
|
|
|
$(Q) $(LDSHARED_2)
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2008-01-08 14:02:10 +03:00
|
|
|
!if "$(WPROGRAM)" != ""
|
2004-03-23 08:32:01 +03:00
|
|
|
$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $(RUBYW_INSTALL_NAME).res
|
2010-11-17 17:17:26 +03:00
|
|
|
$(ECHO) linking $(@:\=/)
|
2010-11-12 14:51:42 +03:00
|
|
|
$(Q) $(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) \
|
2004-03-23 08:32:01 +03:00
|
|
|
$(RUBYW_INSTALL_NAME).res $(OUTFLAG)$@ $(LIBRUBYARG) \
|
2009-03-10 07:45:51 +03:00
|
|
|
-link $(LDFLAGS) $(XLDFLAGS) -subsystem:Windows
|
2010-11-12 14:51:42 +03:00
|
|
|
$(Q) $(LDSHARED_0)
|
|
|
|
$(Q) $(LDSHARED_1)
|
|
|
|
$(Q) $(LDSHARED_2)
|
2008-01-08 14:02:10 +03:00
|
|
|
!endif
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2010-11-18 17:56:34 +03:00
|
|
|
!if "$(STUBPROGRAM)" != ""
|
2016-08-20 05:20:34 +03:00
|
|
|
$(STUBPROGRAM): rubystub.$(OBJEXT) $(LIBRUBY) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
|
2010-11-18 17:56:34 +03:00
|
|
|
$(ECHO) linking $(@:\=/)
|
2016-08-20 05:20:34 +03:00
|
|
|
$(Q) $(PURIFY) $(CC) rubystub.$(OBJEXT) $(RUBY_INSTALL_NAME).res \
|
2010-11-18 17:56:34 +03:00
|
|
|
$(OUTFLAG)$@ $(LIBRUBYARG) -link $(LDFLAGS) $(XLDFLAGS)
|
|
|
|
$(Q) $(LDSHARED_0)
|
|
|
|
$(Q) $(LDSHARED_1)
|
|
|
|
$(Q) $(LDSHARED_2)
|
|
|
|
!endif
|
|
|
|
|
2018-02-17 08:52:20 +03:00
|
|
|
!if "$(LIBRUBY_SO_UPDATE)" == ""
|
|
|
|
PRE_LIBRUBY_UPDATE = $(RM) $(LIBRUBY_EXTS)
|
|
|
|
!else
|
|
|
|
PRE_LIBRUBY_UPDATE =
|
|
|
|
!endif
|
|
|
|
|
2014-11-27 23:04:48 +03:00
|
|
|
$(LIBRUBY_A): $(OBJS) $(INITOBJS)
|
2018-02-17 08:52:21 +03:00
|
|
|
!if "$(EXTSTATIC)" != ""
|
|
|
|
@-$(PRE_LIBRUBY_UPDATE)
|
|
|
|
!endif
|
2010-11-17 17:17:26 +03:00
|
|
|
$(ECHO) linking static-library $(@:\=/)
|
2014-11-27 23:04:48 +03:00
|
|
|
$(Q) $(AR) $(ARFLAGS)$@ $(OBJS) $(INITOBJS)
|
2000-08-03 13:55:54 +04:00
|
|
|
|
|
|
|
$(LIBRUBY): $(RUBYDEF)
|
2010-11-17 17:17:26 +03:00
|
|
|
$(ECHO) linking import-library $(@:\=/)
|
2010-11-12 14:51:42 +03:00
|
|
|
$(Q) $(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2004-03-23 08:32:01 +03:00
|
|
|
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
|
2009-11-19 11:04:11 +03:00
|
|
|
@echo $(DLDOBJS)
|
2018-02-17 08:52:21 +03:00
|
|
|
!if "$(EXTSTATIC)" == ""
|
2006-10-01 19:00:45 +04:00
|
|
|
@-$(PRE_LIBRUBY_UPDATE)
|
2018-02-17 08:52:21 +03:00
|
|
|
!endif
|
2010-11-17 17:17:26 +03:00
|
|
|
$(ECHO) linking shared-library $(@:\=/)
|
2018-05-20 21:36:53 +03:00
|
|
|
$(Q) $(LDSHARED) $(DLDOBJS) $(LIBRUBY_A) \
|
2015-08-21 13:48:19 +03:00
|
|
|
$(RUBY_SO_NAME).res $(SOLIBS) $(EXTSOLIBS) $(LIBS) -Fe$@ -link $(LDFLAGS) \
|
2004-03-23 08:32:01 +03:00
|
|
|
$(LIBRUBY_DLDFLAGS)
|
2009-01-27 05:03:54 +03:00
|
|
|
@$(RM) dummy.lib dummy.exp
|
2010-11-12 14:51:42 +03:00
|
|
|
$(Q) $(LDSHARED_0)
|
|
|
|
$(Q) $(LDSHARED_1)
|
|
|
|
$(Q) $(LDSHARED_2)
|
2013-03-02 19:04:23 +04:00
|
|
|
# | findstr -v -c:LNK4049 -c:LNK4217
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2016-12-26 08:07:54 +03:00
|
|
|
$(RUBYDEF): $(LIBRUBY_A) $(RBCONFIG)
|
2010-11-17 17:17:26 +03:00
|
|
|
$(ECHO) generating $(@:\=/)
|
2010-11-17 12:38:38 +03:00
|
|
|
$(Q) $(MINIRUBY) $(srcdir)/win32/mkexports.rb \
|
2007-06-27 15:47:53 +04:00
|
|
|
-output=$@ -arch=$(ARCH) $(LIBRUBY_A)
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
|
2008-01-08 14:02:10 +03:00
|
|
|
{$(win_srcdir)}.def.lib:
|
2010-11-17 12:38:38 +03:00
|
|
|
$(Q) $(AR) $(ARFLAGS)$@ -def:$<
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2004-03-22 02:21:31 +03:00
|
|
|
clean-local::
|
2010-12-30 14:21:54 +03:00
|
|
|
$(Q)$(RM) $(WINMAINOBJ) ext\extinit.c ext\extinit.$(OBJEXT) ext\vc*.pdb miniruby.lib
|
|
|
|
$(Q)$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res
|
|
|
|
$(Q)$(RM) miniruby.rc $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
|
|
|
|
$(Q)$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF) ext\ripper\y.output
|
2004-03-22 02:21:31 +03:00
|
|
|
|
|
|
|
distclean-local::
|
2010-12-30 14:21:54 +03:00
|
|
|
$(Q)$(RM) ext\config.cache $(RBCONFIG:/=\) $(CONFIG_H:/=\)
|
2012-05-03 20:57:51 +04:00
|
|
|
-$(Q)$(RM) $(INSTALLED_LIST:/=\) $(arch_hdrdir:/=\)\ruby\config.h verconf.h
|
2010-12-30 14:21:54 +03:00
|
|
|
-$(Q)$(RMDIRS) $(arch_hdrdir:/=\)\ruby
|
2009-01-25 05:06:29 +03:00
|
|
|
|
2017-03-01 10:53:15 +03:00
|
|
|
ext/clean.mk ext/distclean.mk ext/realclean.mk::
|
|
|
|
$(Q)if exist $(EXTS_MK) $(MAKE) -k -f $(EXTS_MK) top_srcdir=$(srcdir) $(*F)
|
|
|
|
|
|
|
|
ext/clean gems/clean ext/distclean gems/distclean ext/realclean gems/realclean::
|
|
|
|
$(Q)cd $(@D) && for /R $(EXTS) %I in (.) \
|
|
|
|
do $(Q)if exist %I\Makefile ( \
|
2009-01-25 05:06:29 +03:00
|
|
|
cd %I && ( \
|
2015-07-27 04:55:58 +03:00
|
|
|
call set n=%I && \
|
2017-03-01 10:53:15 +03:00
|
|
|
call set n=%n:%CD%\$(@D)\=% && \
|
2015-07-27 04:55:58 +03:00
|
|
|
call set n=%n:\.=% && \
|
2017-03-01 10:53:15 +03:00
|
|
|
call echo $(@F)ing %n:\=/% & \
|
|
|
|
$(MAKE) $(MFLAGS) $(@F) & \
|
2009-01-01 01:16:51 +03:00
|
|
|
cd %CD% & \
|
2009-01-25 05:06:29 +03:00
|
|
|
$(RMDIRS) %I \
|
|
|
|
) )
|
2008-08-07 11:28:56 +04:00
|
|
|
|
2017-03-01 10:53:15 +03:00
|
|
|
ext/distclean gems/distclean ext/realclean gems/realclean::
|
|
|
|
$(Q)cd $(@D) && for /R $(EXTS) %I in (exts.mk*) \
|
|
|
|
do $(Q)(del %I & rmdir %~dpI)
|
|
|
|
-$(Q)rmdir $(@D) 2> nul || @
|
2010-06-14 21:32:03 +04:00
|
|
|
|
|
|
|
clean-enc distclean-enc realclean-enc:
|
|
|
|
!if exist($(ENC_MK))
|
2017-03-01 10:53:15 +03:00
|
|
|
$(ECHO) $(@:-enc=ing) encodings
|
|
|
|
-$(Q)$(MAKE) $(MAKE_ENC) $(@:-enc=)
|
2010-06-14 21:32:03 +04:00
|
|
|
!endif
|
|
|
|
|
2015-03-07 05:06:11 +03:00
|
|
|
$(RBCONFIG): $(PREP)
|
|
|
|
|
2010-10-08 05:52:37 +04:00
|
|
|
$(RCFILES): $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb
|
* configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 18:03:46 +04:00
|
|
|
@$(MINIRUBY) $(srcdir)/win32/resource.rb \
|
2000-08-03 13:55:54 +04:00
|
|
|
-ruby_name=$(RUBY_INSTALL_NAME) \
|
|
|
|
-rubyw_name=$(RUBYW_INSTALL_NAME) \
|
2002-09-11 06:38:51 +04:00
|
|
|
-so_name=$(RUBY_SO_NAME) \
|
2008-01-08 14:02:10 +03:00
|
|
|
. $(icondirs) $(win_srcdir)
|
|
|
|
|
2017-10-26 03:59:15 +03:00
|
|
|
test-bundled-gems-run:
|
|
|
|
$(Q) for /f %G in ($(srcdir)/gems/bundled_gems) do @( \
|
|
|
|
echo testing %G gem & \
|
|
|
|
$(XRUBY) -C $(srcdir)/gems/src/%G -Ilib ../../../.bundle/bin/rake || \
|
|
|
|
exit /b %STATUS% \
|
|
|
|
)
|
|
|
|
|
benchmark: introduce benchmark_driver.gem
Makefile.in: Clone benchmark-driver repository in benchmark/benchmark-driver
`make update-benchmark-driver`, like simplecov.
win32/Makefile.sub: Roughly do the same thing.
.gitignore: Ignore the cloned repository.
common.mk: Trigger `make update-benchmark-driver` to run `make benchmark`
and adjust arguments for benchmark_driver.gem.
benchmark/require.yml: renamed from benchmark/bm_require.rb, benchmark/prepare_require.rb
benchmark/require_thread.yml: renamed from benchmark/bm_require_thread.rb, benchmark/prepare_require_thread.rb
benchmark/so_count_words.yml: renamed from benchmark/bm_so_count_words.rb, benchmark/prepare_so_count_words.rb,
benchmark/wc.input.base
benchmark/so_k_nucleotide.yml: renamed from benchmark/bm_so_k_nucleotide.rb, benchmark/prepare_so_k_nucleotide.rb,
benchmark/make_fasta_output.rb
benchmark/so_reverse_complement.yml: renamed from benchmark/bm_so_reverse_complement.rb, benchmark/prepare_so_reverse_complement.rb,
benchmark/make_fasta_output.rb
I'm sorry but I made some duplications between benchmark/require.yml and benchmark/require_thread.yml,
and between benchmark/so_k_nucleotide.yml and benchmark/so_reverse_complement.yml.
If you're not comfortable with it, please combine these YAMLs to share
the same prelude. One YAML file can have multiple benchmark definitions
sharing prelude.
benchmark/driver.rb: Replace its core feature with benchmark_driver.gem.
Some old features are gone for now, but I'll add them again later.
[Misc #14902]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-08 17:38:05 +03:00
|
|
|
update-benchmark-driver:
|
|
|
|
$(GIT) clone https://github.com/benchmark-driver/benchmark-driver $(srcdir)/benchmark/benchmark-driver || \
|
|
|
|
$(GIT) -C $(srcdir)/benchmark/benchmark-driver pull origin master
|
|
|
|
|
2010-10-26 07:47:15 +04:00
|
|
|
$(ruby_pc): $(RBCONFIG)
|
2015-03-07 05:06:18 +03:00
|
|
|
@$(BOOTSTRAPRUBY) $(srcdir)/tool/expand-config.rb \
|
|
|
|
-output=$@ -mode=$(INSTALL_DATA_MODE) -config=rbconfig.rb \
|
|
|
|
$(srcdir)/template/ruby.pc.in
|
2010-10-26 07:47:15 +04:00
|
|
|
|
2015-01-18 06:56:52 +03:00
|
|
|
{$(srcdir)/enc/trans}.c.obj:
|
|
|
|
$(ECHO) compiling $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
|
2007-10-11 01:35:45 +04:00
|
|
|
{$(srcdir)/enc}.c.obj:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) compiling $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
|
2000-12-22 06:22:25 +03:00
|
|
|
{$(srcdir)/missing}.c.obj:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) compiling $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
|
2008-01-08 14:02:10 +03:00
|
|
|
{$(win_srcdir)}.c.obj:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) compiling $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
|
2012-02-28 19:51:25 +04:00
|
|
|
{$(srcdir)}.c{}.obj:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) compiling $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
|
2000-08-03 13:55:54 +04:00
|
|
|
.c.obj:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) compiling $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2007-02-02 21:23:07 +03:00
|
|
|
{$(srcdir)/missing}.c.asm:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) translating $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/)
|
2012-08-23 14:18:23 +04:00
|
|
|
{$(win_srcdir)}.c.asm:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) translating $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/)
|
2012-08-23 14:18:23 +04:00
|
|
|
{$(srcdir)}.c{}.asm:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) translating $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/)
|
2007-02-02 21:23:07 +03:00
|
|
|
.c.asm:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) translating $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/)
|
2007-02-02 21:23:07 +03:00
|
|
|
|
2009-03-16 03:29:00 +03:00
|
|
|
{$(srcdir)/missing}.c.i:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) preprocessing $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/) > $@
|
2012-08-23 14:18:23 +04:00
|
|
|
{$(win_srcdir)}.c.i:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) preprocessing $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/)
|
2012-08-23 14:18:23 +04:00
|
|
|
{$(srcdir)}.c{}.i:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) preprocessing $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/)
|
2009-03-16 03:29:00 +03:00
|
|
|
.c.i:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) preprocessing $(<:\=/)
|
2016-07-11 19:30:03 +03:00
|
|
|
$(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/)
|
2009-03-16 03:29:00 +03:00
|
|
|
|
2000-08-03 13:55:54 +04:00
|
|
|
.rc.res:
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) compiling $(<:\=/)
|
2010-12-02 17:06:54 +03:00
|
|
|
$(Q) $(RC) $(RCFLAGS) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
|
2000-08-03 13:55:54 +04:00
|
|
|
|
2007-11-13 09:29:49 +03:00
|
|
|
lex.c: {$(srcdir)}lex.c.blt
|
|
|
|
copy $(?:/=\) $@
|
|
|
|
|
2017-04-23 04:23:30 +03:00
|
|
|
$(srcdir)/enc/jis/props.h: {$(srcdir)}enc/jis/props.h.blt
|
2014-05-26 08:03:52 +04:00
|
|
|
@if not exist $(@D:/=\) md $(@D:/=\)
|
|
|
|
$(ECHO) copying $@
|
|
|
|
$(Q) copy $(?:/=\) $(@:/=\) > nul
|
|
|
|
|
2007-06-10 07:06:15 +04:00
|
|
|
$(OBJS): {$(hdrdir)/ruby}win32.h
|
2004-03-22 02:21:31 +03:00
|
|
|
|
2017-12-04 06:33:48 +03:00
|
|
|
win32/win32.$(OBJEXT): {$(VPATH)}id.h
|
2012-02-28 19:51:25 +04:00
|
|
|
dir.$(OBJEXT) win32/win32.$(OBJEXT): {$(srcdir)}win32/dir.h
|
2015-08-26 08:21:41 +03:00
|
|
|
file.$(OBJEXT) win32/win32.$(OBJEXT): {$(VPATH)}win32/file.h
|
2004-04-07 05:43:27 +04:00
|
|
|
|
|
|
|
ext/extinit.obj: ext/extinit.c $(SETUP)
|
2010-11-11 18:31:59 +03:00
|
|
|
$(ECHO) compiling ext/extinit.c
|
2010-11-12 14:51:42 +03:00
|
|
|
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
|
2009-03-05 05:52:21 +03:00
|
|
|
|
2012-11-22 16:49:59 +04:00
|
|
|
probes.h: {$(VPATH)}probes.dmyh
|
2016-01-09 06:32:43 +03:00
|
|
|
@$(ECHO) making dummy <<$(DEST_FILE)
|
|
|
|
#include "$(*F).dmyh"
|
|
|
|
<<KEEP
|
2012-11-22 16:49:59 +04:00
|
|
|
|
2009-03-06 08:28:42 +03:00
|
|
|
INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
|
mjit_compile.c: merge initial JIT compiler
which has been developed by Takashi Kokubun <takashikkbn@gmail> as
YARV-MJIT. Many of its bugs are fixed by wanabe <s.wanabe@gmail.com>.
This JIT compiler is designed to be a safe migration path to introduce
JIT compiler to MRI. So this commit does not include any bytecode
changes or dynamic instruction modifications, which are done in original
MJIT.
This commit even strips off some aggressive optimizations from
YARV-MJIT, and thus it's slower than YARV-MJIT too. But it's still
fairly faster than Ruby 2.5 in some benchmarks (attached below).
Note that this JIT compiler passes `make test`, `make test-all`, `make
test-spec` without JIT, and even with JIT. Not only it's perfectly safe
with JIT disabled because it does not replace VM instructions unlike
MJIT, but also with JIT enabled it stably runs Ruby applications
including Rails applications.
I'm expecting this version as just "initial" JIT compiler. I have many
optimization ideas which are skipped for initial merging, and you may
easily replace this JIT compiler with a faster one by just replacing
mjit_compile.c. `mjit_compile` interface is designed for the purpose.
common.mk: update dependencies for mjit_compile.c.
internal.h: declare `rb_vm_insn_addr2insn` for MJIT.
vm.c: exclude some definitions if `-DMJIT_HEADER` is provided to
compiler. This avoids to include some functions which take a long time
to compile, e.g. vm_exec_core. Some of the purpose is achieved in
transform_mjit_header.rb (see `IGNORED_FUNCTIONS`) but others are
manually resolved for now. Load mjit_helper.h for MJIT header.
mjit_helper.h: New. This is a file used only by JIT-ed code. I'll
refactor `mjit_call_cfunc` later.
vm_eval.c: add some #ifdef switches to skip compiling some functions
like Init_vm_eval.
win32/mkexports.rb: export thread/ec functions, which are used by MJIT.
include/ruby/defines.h: add MJIT_FUNC_EXPORTED macro alis to clarify
that a function is exported only for MJIT.
array.c: export a function used by MJIT.
bignum.c: ditto.
class.c: ditto.
compile.c: ditto.
error.c: ditto.
gc.c: ditto.
hash.c: ditto.
iseq.c: ditto.
numeric.c: ditto.
object.c: ditto.
proc.c: ditto.
re.c: ditto.
st.c: ditto.
string.c: ditto.
thread.c: ditto.
variable.c: ditto.
vm_backtrace.c: ditto.
vm_insnhelper.c: ditto.
vm_method.c: ditto.
I would like to improve maintainability of function exports, but I
believe this way is acceptable as initial merging if we clarify the
new exports are for MJIT (so that we can use them as TODO list to fix)
and add unit tests to detect unresolved symbols.
I'll add unit tests of JIT compilations in succeeding commits.
Author: Takashi Kokubun <takashikkbn@gmail.com>
Contributor: wanabe <s.wanabe@gmail.com>
Part of [Feature #14235]
---
* Known issues
* Code generated by gcc is faster than clang. The benchmark may be worse
in macOS. Following benchmark result is provided by gcc w/ Linux.
* Performance is decreased when Google Chrome is running
* JIT can work on MinGW, but it doesn't improve performance at least
in short running benchmark.
* Currently it doesn't perform well with Rails. We'll try to fix this
before release.
---
* Benchmark reslts
Benchmarked with:
Intel 4.0GHz i7-4790K with 16GB memory under x86-64 Ubuntu 8 Cores
- 2.0.0-p0: Ruby 2.0.0-p0
- r62186: Ruby trunk (early 2.6.0), before MJIT changes
- JIT off: On this commit, but without `--jit` option
- JIT on: On this commit, and with `--jit` option
** Optcarrot fps
Benchmark: https://github.com/mame/optcarrot
| |2.0.0-p0 |r62186 |JIT off |JIT on |
|:--------|:--------|:--------|:--------|:--------|
|fps |37.32 |51.46 |51.31 |58.88 |
|vs 2.0.0 |1.00x |1.38x |1.37x |1.58x |
** MJIT benchmarks
Benchmark: https://github.com/benchmark-driver/mjit-benchmarks
(Original: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch/MJIT-benchmarks)
| |2.0.0-p0 |r62186 |JIT off |JIT on |
|:----------|:--------|:--------|:--------|:--------|
|aread |1.00 |1.09 |1.07 |2.19 |
|aref |1.00 |1.13 |1.11 |2.22 |
|aset |1.00 |1.50 |1.45 |2.64 |
|awrite |1.00 |1.17 |1.13 |2.20 |
|call |1.00 |1.29 |1.26 |2.02 |
|const2 |1.00 |1.10 |1.10 |2.19 |
|const |1.00 |1.11 |1.10 |2.19 |
|fannk |1.00 |1.04 |1.02 |1.00 |
|fib |1.00 |1.32 |1.31 |1.84 |
|ivread |1.00 |1.13 |1.12 |2.43 |
|ivwrite |1.00 |1.23 |1.21 |2.40 |
|mandelbrot |1.00 |1.13 |1.16 |1.28 |
|meteor |1.00 |2.97 |2.92 |3.17 |
|nbody |1.00 |1.17 |1.15 |1.49 |
|nest-ntimes|1.00 |1.22 |1.20 |1.39 |
|nest-while |1.00 |1.10 |1.10 |1.37 |
|norm |1.00 |1.18 |1.16 |1.24 |
|nsvb |1.00 |1.16 |1.16 |1.17 |
|red-black |1.00 |1.02 |0.99 |1.12 |
|sieve |1.00 |1.30 |1.28 |1.62 |
|trees |1.00 |1.14 |1.13 |1.19 |
|while |1.00 |1.12 |1.11 |2.41 |
** Discourse's script/bench.rb
Benchmark: https://github.com/discourse/discourse/blob/v1.8.7/script/bench.rb
NOTE: Rails performance was somehow a little degraded with JIT for now.
We should fix this.
(At least I know opt_aref is performing badly in JIT and I have an idea
to fix it. Please wait for the fix.)
*** JIT off
Your Results: (note for timings- percentile is first, duration is second in millisecs)
categories_admin:
50: 17
75: 18
90: 22
99: 29
home_admin:
50: 21
75: 21
90: 27
99: 40
topic_admin:
50: 17
75: 18
90: 22
99: 32
categories:
50: 35
75: 41
90: 43
99: 77
home:
50: 39
75: 46
90: 49
99: 95
topic:
50: 46
75: 52
90: 56
99: 101
*** JIT on
Your Results: (note for timings- percentile is first, duration is second in millisecs)
categories_admin:
50: 19
75: 21
90: 25
99: 33
home_admin:
50: 24
75: 26
90: 30
99: 35
topic_admin:
50: 19
75: 20
90: 25
99: 30
categories:
50: 40
75: 44
90: 48
99: 76
home:
50: 42
75: 48
90: 51
99: 89
topic:
50: 49
75: 55
90: 58
99: 99
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 14:22:28 +03:00
|
|
|
vmtc.inc vm.inc mjit_compile.inc
|
2009-03-06 08:28:42 +03:00
|
|
|
|
2010-11-18 17:56:34 +03:00
|
|
|
!if [exit > insns_rules.mk]
|
|
|
|
!else if [for %I in ($(INSNS)) do \
|
|
|
|
@for %J in (\
|
2010-11-19 17:05:50 +03:00
|
|
|
"%I: $$(srcdir)/insns.def {$$(VPATH)}vm_opts.h \" \
|
|
|
|
" $$(srcdir)/defs/opt_operand.def $$(srcdir)/defs/opt_insn_unif.def \" \
|
2018-01-12 11:38:09 +03:00
|
|
|
" $$(srcdir)/tool/insns2vm.rb" \
|
2010-11-18 17:56:34 +03:00
|
|
|
" @$$(RM) $$(PROGRAM)" \
|
2011-09-06 16:16:44 +04:00
|
|
|
" $$(BASERUBY) -Ku $$(srcdir)/tool/insns2vm.rb $$(INSNS2VMOPT) %I" \
|
2010-11-18 17:56:34 +03:00
|
|
|
"" \
|
|
|
|
) do @echo.%~J>>insns_rules.mk]
|
2009-03-05 05:52:21 +03:00
|
|
|
!else
|
|
|
|
! include insns_rules.mk
|
|
|
|
! if [del insns_rules.mk > nul]
|
|
|
|
! endif
|
|
|
|
!endif
|
2013-05-16 11:54:04 +04:00
|
|
|
|
2014-12-01 11:20:45 +03:00
|
|
|
verconf.h: verconf.mk
|
|
|
|
|
2013-05-16 11:54:04 +04:00
|
|
|
loadpath: verconf.h
|
|
|
|
@$(CPP) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/loadpath.c | \
|
|
|
|
sed -e '1,/^const char ruby_initial_load_paths/d;/;/,$$d' \
|
|
|
|
-e '/^^ /!d;s/ *"\\\\0"$$//;s/" *"//g'
|
2018-02-10 09:22:38 +03:00
|
|
|
|
|
|
|
mjit_config.h:
|
2018-02-10 13:07:41 +03:00
|
|
|
@echo making <<$@
|
2018-02-10 09:22:38 +03:00
|
|
|
#ifndef RUBY_MJIT_CONFIG_H
|
|
|
|
#define RUBY_MJIT_CONFIG_H 1
|
2018-02-20 05:37:28 +03:00
|
|
|
|
2018-07-31 15:43:06 +03:00
|
|
|
#define MJIT_BUILD_DIR "$(MAKEDIR)"
|
2018-04-28 04:45:52 +03:00
|
|
|
#define MJIT_MIN_HEADER_NAME "/$(MJIT_HEADER_INSTALL_DIR)/$(MJIT_MIN_HEADER_NAME)"
|
2018-02-10 09:22:38 +03:00
|
|
|
<<KEEP
|
2018-02-11 07:54:15 +03:00
|
|
|
@
|
|
|
|
@(set sep=#define MJIT_CC_COMMON ) & \
|
2018-03-02 01:49:26 +03:00
|
|
|
for %I in ($(MJIT_CC)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
2018-02-11 07:54:15 +03:00
|
|
|
@echo /* MJIT_CC_COMMON */>> $@
|
|
|
|
@
|
|
|
|
@(set sep=#define MJIT_CFLAGS ) & \
|
2018-02-11 10:10:37 +03:00
|
|
|
for %I in ($(RUNTIMEFLAG) $(ARCH_FLAG)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
2018-02-11 07:54:15 +03:00
|
|
|
@echo /* MJIT_CFLAGS */>> $@
|
|
|
|
@
|
|
|
|
@(set sep=#define MJIT_OPTFLAGS ) & \
|
2018-03-02 01:49:26 +03:00
|
|
|
for %I in ($(MJIT_OPTFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
2018-02-11 07:54:15 +03:00
|
|
|
@echo /* MJIT_OPTFLAGS */>> $@
|
|
|
|
@
|
|
|
|
@(set sep=#define MJIT_DEBUGFLAGS ) & \
|
2018-03-02 01:49:26 +03:00
|
|
|
for %I in ($(MJIT_DEBUGFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
2018-02-11 07:54:15 +03:00
|
|
|
@echo /* MJIT_DEBUGFLAGS */>> $@
|
|
|
|
@
|
|
|
|
@(set sep=#define MJIT_LDSHARED ) & \
|
2018-03-03 08:09:32 +03:00
|
|
|
for %I in ($(MJIT_LDSHARED)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
2018-02-11 07:54:15 +03:00
|
|
|
@echo /* MJIT_LDSHARED */>> $@
|
|
|
|
@
|
|
|
|
@(set sep=#define MJIT_DLDFLAGS ) & \
|
2018-02-11 10:10:37 +03:00
|
|
|
for %I in ($(DLDFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
2018-02-11 07:54:15 +03:00
|
|
|
@echo /* MJIT_DLDFLAGS */>> $@
|
|
|
|
@
|
2018-02-20 05:37:28 +03:00
|
|
|
@(set sep=#define MJIT_LIBS ) & \
|
|
|
|
for %I in ($(LIBRUBYARG_SHARED)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
|
|
|
@echo /* MJIT_LIBS */>> $@
|
|
|
|
@
|
|
|
|
@echo.>> $@
|
2018-02-10 13:07:41 +03:00
|
|
|
@echo #endif /* RUBY_MJIT_CONFIG_H */>> $@
|
|
|
|
@$(Q:@=: :) type $@
|