# -*- makefile -*- SHELL = $(COMSPEC) MKFILES = Makefile NULL = nul #### Start of system configuration section. #### ## variables may be overridden by $(compile_dir)/Makefile !ifndef srcdir srcdir = .. !endif !ifndef RUBY_INSTALL_NAME RUBY_INSTALL_NAME = ruby !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 !if !defined(icondirs) && defined(ICONDIRS) icondirs=$(ICONDIRS) !endif !if defined(icondirs) icondirs=$(icondirs:\=/) iconinc=-I$(icondirs: = -I) !endif ############### VPATH = $(srcdir);$(srcdir)/missing;$(srcdir)/win32 .SUFFIXES: .y .def .lib !if !defined(CC) CC = cl !endif !if !defined(CPP) CPP = $(CC) -E !endif !if !defined(YACC) YACC = byacc !endif AR = lib -nologo PURIFY = AUTOCONF = autoconf RM = $(srcdir:/=\)\win32\rm.bat !if !defined(PROCESSOR_ARCHITECTURE) PROCESSOR_ARCHITECTURE = x86 !endif MACHINE = $(PROCESSOR_ARCHITECTURE) !if "$(PROCESSOR_ARCHITECTURE)" == "x86" !if !defined(PROCESSOR_LEVEL) PROCESSOR_LEVEL = 5 !endif !if 6 < $(PROCESSOR_LEVEL) PROCESSOR_LEVEL = 6 !endif PROCESSOR_FLAG = -G$(PROCESSOR_LEVEL) CPU = i$(PROCESSOR_LEVEL)86 ARCH = i386 !else CPU = $(PROCESSOR_ARCHITECTURE) ARCH = $(PROCESSOR_ARCHITECTURE) !endif !if !defined(DEBUGFLAGS) DEBUGFLAGS = -Zi !endif !if !defined(OPTFLAGS) OPTFLAGS = -O2b2xg- !endif !if !defined(OS) || !defined(RT) OS = mswin32 RT = msvcrt !endif !ifndef RUBY_SO_NAME RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR) !endif !if !defined(prefix) prefix = /usr !endif !if !defined(exec_prefix) exec_prefix = $(prefix) !endif !if !defined(libdir) libdir = $(exec_prefix)/lib !endif !if !defined(datadir) datadir = $(prefix)/share !endif !ifndef EXTOUT EXTOUT = .ext !endif !ifndef RIDATADIR RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system !endif !ifndef TESTUI TESTUI = console !endif !ifndef TESTS TESTS = !endif !ifndef RDOCTARGET RDOCTARGET = install-doc !endif OUTFLAG = -Fe !if !defined(CFLAGS) CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) !endif !if !defined(CPPFLAGS) CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing !endif !if !defined(LDFLAGS) LDFLAGS = -link -incremental:no -debug -opt:ref -opt:icf !endif !if !defined(XLDFLAGS) XLDFLAGS = -stack:$(STACK) !endif !if !defined(RFLAGS) RFLAGS = -r !endif !if !defined(EXTLIBS) EXTLIBS = !endif LIBS = oldnames.lib user32.lib advapi32.lib wsock32.lib $(EXTLIBS) MISSING = acosh.obj crypt.obj erf.obj win32.obj ARFLAGS = -machine:$(MACHINE) -out: CC = $(CC) -nologo LD = $(CC) LDSHARED = $(LD) -LD XCFLAGS = -DRUBY_EXPORT DLDFLAGS = $(LDFLAGS) -dll SOLIBS = LIBRUBY_LDSHARED = $(LDSHARED) LIBRUBY_DLDFLAGS = $(EXTLDFLAGS) -def:$(RUBYDEF) EXEEXT = .exe PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT) WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT) RUBYDEF = $(RUBY_SO_NAME).def MINIRUBY = .\miniruby$(EXEEXT) RUNRUBY = .\ruby$(EXEEXT) "$(srcdir)/runruby.rb" --extout="$(EXTOUT)" -- !if !defined(STACK) STACK = 0x2000000 !endif ORGLIBPATH = $(LIB) #### End of system configuration section. #### LIBRUBY_A = $(RUBY_SO_NAME)-static.lib LIBRUBY_SO = $(RUBY_SO_NAME).dll LIBRUBY = $(RUBY_SO_NAME).lib LIBRUBYARG = $(LIBRUBY) PREP = miniruby$(EXEEXT) !if !defined(EXTSTATIC) EXTSTATIC = !endif OBJEXT = obj EXTOBJS = DLDOBJS = WINMAINOBJ = winmain.$(OBJEXT) all: $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk !include $(srcdir)/common.mk ruby: $(PROGRAM) rubyw: $(WPROGRAM) lib: $(LIBRUBY) dll: $(LIBRUBY_SO) config: config.h config.status config.h: @echo Creating <<$@ #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_OFF_T 1 #define SIZEOF_INT 4 #define SIZEOF_SHORT 2 #define SIZEOF_LONG 4 #define SIZEOF_LONG_LONG 0 #define SIZEOF___INT64 8 #define SIZEOF_OFF_T 4 #define SIZEOF_VOIDP 4 #define SIZEOF_FLOAT 4 #define SIZEOF_DOUBLE 8 #define HAVE_PROTOTYPES 1 #define TOKEN_PASTE(x,y) x##y #define HAVE_STDARG_PROTOTYPES 1 #if _MSC_VER > 1100 #define NORETURN(x) __declspec(noreturn) x #endif #define HAVE_DECL_SYS_NERR 1 #define HAVE_LIMITS_H 1 #define HAVE_FCNTL_H 1 #define HAVE_SYS_UTIME_H 1 #define HAVE_FLOAT_H 1 #define uid_t int #define gid_t int #define HAVE_STRUCT_STAT_ST_RDEV 1 #define HAVE_ST_RDEV 1 #define GETGROUPS_T int #define RETSIGTYPE void #define HAVE_ALLOCA 1 #define HAVE_DUP2 1 #define HAVE_MEMCMP 1 #define HAVE_MEMMOVE 1 #define HAVE_MKDIR 1 #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_STRTOD 1 #define HAVE_STRTOL 1 #define HAVE_STRTOUL 1 #define HAVE_FLOCK 1 #define HAVE_VSNPRINTF 1 #define HAVE_ISNAN 1 #define HAVE_FINITE 1 #define HAVE_HYPOT 1 #define HAVE_FMOD 1 #define HAVE_FREXP 1 #define HAVE_MODF 1 #define HAVE_WAITPID 1 #define HAVE_FSYNC 1 #define HAVE_GETCWD 1 #define HAVE_CHSIZE 1 #define HAVE_TIMES 1 #define HAVE_LINK 1 #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 #define HAVE_TZNAME 1 #define HAVE_DAYLIGHT 1 #define SETPGRP_VOID 1 #define RSHIFT(x,y) ((x)>>(int)y) #define FILE_COUNT _cnt #define FILE_READPTR _ptr #define inline __inline #define NEED_IO_SEEK_BETWEEN_RW 1 #define STACK_GROW_DIRECTION -1 #define DEFAULT_KCODE KCODE_NONE #define DLEXT ".so" #define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR)" #define RUBY_SITE_LIB "/lib/ruby/site_ruby" #define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)" #define RUBY_PLATFORM "$(ARCH)-$(OS)" #define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)" #define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(RT)" < $@ @del y.tab.c $(OBJS): {$(srcdir)}win32/win32.h dir.$(OBJEXT): {$(srcdir)}win32/dir.h