summaryrefslogtreecommitdiff
path: root/wince
diff options
context:
space:
mode:
authoruema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-26 05:25:30 +0000
committeruema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-26 05:25:30 +0000
commit5f0df5186540dd5a6f11063f6e420c86636b235d (patch)
tree1330399ba14a2e9a26cba8c40db9ebd54ba95441 /wince
parent6068cd754095d7f0742438ffd21d201775eda229 (diff)
* wince/ : files removed.
(config, dll.mak, exe.mak, mswince-ruby17.def, io.c, process.c, signal.c, string.c, time.c) * wince/ : files added. (assert.c, Makefile.sub, mkexports.rb, io_wce.c, process_wce.c, signal_wce.c, string_wce.c, time_wce.c) * wince/configure.bat : like mswin32 style. * wince/direct.c : remove "static" at _currentdir. * wince/io.h : change definition. * wince/stdio.c : _fdopen -> fdopen. * wince/process.h : add_P_OVERLAY. * wince/time.h : change definition. * wince/wincemain.c : add wce_SetCurrentDir. * wince/wince.c : add wce_SetCurrentDir and wce_fopen. fix GetModuleFileNameA to return correct "lpFileName". * wince/wince.h : remove #ifdef. * wince/sys/utime.h, utime.c : rename _utime to utime. * wince/sys/stat.c : expand relative directory in stat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'wince')
-rw-r--r--wince/Makefile.sub692
-rw-r--r--wince/README.wince101
-rw-r--r--wince/assert.c11
-rw-r--r--wince/assert.h2
-rw-r--r--wince/config135
-rw-r--r--wince/configure.bat186
-rw-r--r--wince/direct.c2
-rw-r--r--wince/dll.mak1531
-rw-r--r--wince/exe.mak353
-rw-r--r--wince/io.h19
-rw-r--r--wince/io_wce.c (renamed from wince/io.c)8
-rw-r--r--wince/mkexports.rb35
-rw-r--r--wince/mswince-ruby17.def813
-rw-r--r--wince/process.h2
-rw-r--r--wince/process_wce.c (renamed from wince/process.c)0
-rw-r--r--wince/resource.rb97
-rw-r--r--wince/setup.mak184
-rw-r--r--wince/signal_wce.c (renamed from wince/signal.c)0
-rw-r--r--wince/stdio.c2
-rw-r--r--wince/stdlib.c22
-rw-r--r--wince/string_wce.c69
-rw-r--r--wince/sys/stat.c3
-rw-r--r--wince/sys/utime.c2
-rw-r--r--wince/sys/utime.h4
-rw-r--r--wince/time.h4
-rw-r--r--wince/time_wce.c (renamed from wince/time.c)0
-rw-r--r--wince/wince.c62
-rw-r--r--wince/wince.h39
-rw-r--r--wince/wincemain.c3
29 files changed, 1319 insertions, 3062 deletions
diff --git a/wince/Makefile.sub b/wince/Makefile.sub
new file mode 100644
index 0000000000..f91f2c0ead
--- /dev/null
+++ b/wince/Makefile.sub
@@ -0,0 +1,692 @@
+SHELL = $(COMSPEC)
+
+#### 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
+.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
+
+!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 = -w -O2b2xg-
+!endif
+!ifndef OS
+OS = mswin32
+!endif
+!ifndef RT
+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(DESTDIR)
+DESTDIR = $(prefix)
+!endif
+!if !defined(CFLAGS)
+CFLAGS = $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
+!endif
+!if !defined(CPPFLAGS)
+CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -I$(srcdir)/wince
+!endif
+!if !defined(XLDFLAGS)
+XLDFLAGS =
+!endif
+!if !defined(RFLAGS)
+RFLAGS = -r
+!endif
+!if !defined(EXTLIBS)
+EXTLIBS =
+!endif
+LIBS = coredll.lib winsock.lib $(EXTLIBS)
+MISSING = acosh.obj crypt.obj dup2.obj hypot.obj \
+ isinf.obj isnan.obj strftime.obj win32.obj
+WINCEOBJ= assert.obj direct.obj errno.obj io_wce.obj process_wce.obj \
+ signal_wce.obj stdio.obj stdlib.obj string_wce.obj \
+ time_wce.obj wince.obj winsock2.obj
+WINCESYSOBJ = stat.obj timeb.obj utime.obj
+
+ARFLAGS = -machine:$(MACHINE) -out:
+CC = $(CC) -nologo
+LD = $(CC)
+LDSHARED = $(LD) -LD
+XCFLAGS =
+LDFLAGS = -link -incremental:yes -pdb:none -MACHINE:$(MACHINE)
+DLDFLAGS = $(LDFLAGS) -dll
+XLDFLAGS = -stack:$(STACK)
+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 = .\minirubyce$(EXEEXT)
+
+!if !defined(STACK)
+STACK = 0x200000,0x10000
+!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)
+
+EXTOBJS =
+
+MAINOBJ = main.obj
+WINMAINOBJ = wincemain.obj
+
+OBJS = array.obj \
+ bignum.obj \
+ class.obj \
+ compar.obj \
+ dir.obj \
+ dln.obj \
+ enum.obj \
+ error.obj \
+ eval.obj \
+ file.obj \
+ gc.obj \
+ hash.obj \
+ inits.obj \
+ io.obj \
+ marshal.obj \
+ math.obj \
+ numeric.obj \
+ object.obj \
+ pack.obj \
+ parse.obj \
+ prec.obj \
+ process.obj \
+ random.obj \
+ range.obj \
+ re.obj \
+ regex.obj \
+ ruby.obj \
+ signal.obj \
+ sprintf.obj \
+ st.obj \
+ string.obj \
+ struct.obj \
+ time.obj \
+ util.obj \
+ variable.obj \
+ version.obj \
+ $(MISSING) \
+ $(WINCEOBJ) \
+ $(WINCESYSOBJ)
+
+all: ext minirubyce$(EXEEXT) rbconfig.rb \
+ $(LIBRUBY) $(MISCLIBS)
+# @$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)"
+ @miniruby$(EXEEXT) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)"
+
+ext:
+ @mkdir $@
+
+ruby: $(PROGRAM)
+rubyw: $(WPROGRAM)
+lib: $(LIBRUBY)
+dll: $(LIBRUBY_SO)
+
+config: config.h config.status
+
+BANG = !
+
+!if exist(config.h)
+!include config.h
+!endif
+
+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_FLOAT_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 && !defined NORETURN
+#define NORETURN(x) __declspec(noreturn) x
+#else
+#define NORETURN(x) x
+#endif
+#define HAVE_DECL_SYS_NERR 1
+#define STDC_HEADERS 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_SYS_UTIME_H 1
+#define HAVE_MEMORY_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_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_FINITE 1
+#define HAVE_FMOD 1
+#define HAVE_FREXP 1
+#define HAVE_HYPOT 1
+#define HAVE_MODF 1
+#define HAVE_WAITPID 1
+#define HAVE_CHSIZE 0
+#define HAVE_TIMES 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_EXECVE 0
+#define HAVE_TZNAME 1
+#define HAVE_DAYLIGHT 1
+#define SETPGRP_VOID 1
+#define inline __inline
+#define RSHIFT(x,y) ((x)>>(int)y)
+#define DEFAULT_KCODE KCODE_NONE
+#define DLEXT ".so"
+#define DLEXT2 ".dll"
+#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)"
+#define LIBRUBY_SO "$(LIBRUBY_SO)"
+#if 0
+$(BANG)if "$(RUBY_SO_NAME)"!="$$(RUBY_SO_NAME)" || "$(ARCH)-$(OS)"!="$$(ARCH)-$$(OS)"
+config.h: nul
+$(BANG)endif
+#endif
+#define GC_MALLOC_LIMIT 4000000
+#define stricmp _stricmp
+#define fopen wce_fopen
+#define open _open
+#define read _read
+#define write _write
+#define lseek _lseek
+<<KEEP
+
+config.status: Makefile $(srcdir)/wince/Makefile.sub
+ @echo Creating <<$@
+# Generated automatically by Makefile.sub.
+s,@SHELL@,$$(COMSPEC),;t t
+s,@CFLAGS@,$(CFLAGS),;t t
+s,@CPPFLAGS@,$(CPPFLAGS),;t t
+s,@CXXFLAGS@,$(CXXFLAGS),;t t
+s,@FFLAGS@,$(FFLAGS),;t t
+s,@LDFLAGS@,,;t t
+s,@LIBS@,$(LIBS),;t t
+s,@exec_prefix@,$${prefix},;t t
+s,@prefix@,,;t t
+s,@program_transform_name@,s,,,,;t t
+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
+s,@sysconfdir@,$${prefix}/etc,;t t
+s,@sharedstatedir@,/etc,;t t
+s,@localstatedir@,/var,;t t
+s,@libdir@,$${exec_prefix}/lib,;t t
+s,@includedir@,$${prefix}/include,;t t
+s,@oldincludedir@,/usr/include,;t t
+s,@infodir@,$${prefix}/info,;t t
+s,@mandir@,$${prefix}/man,;t t
+s,@build@,$(CPU)-pc-$(OS),;t t
+s,@build_alias@,$(CPU)-$(OS),;t t
+s,@build_cpu@,$(CPU),;t t
+s,@build_vendor@,pc,;t t
+s,@build_os@,$(OS),;t t
+s,@host@,$(CPU)-pc-$(OS),;t t
+s,@host_alias@,$(CPU)-$(OS),;t t
+s,@host_cpu@,$(CPU),;t t
+s,@host_vendor@,pc,;t t
+s,@host_os@,$(OS),;t t
+s,@target@,$(ARCH)-pc-$(OS),;t t
+s,@target_alias@,$(ARCH)-$(OS),;t t
+s,@target_cpu@,$(ARCH),;t t
+s,@target_vendor@,pc,;t t
+s,@target_os@,$(OS),;t t
+s,@CC@,$(CC),;t t
+s,@CPP@,$(CPP),;t t
+s,@YACC@,$(YACC),;t t
+s,@RANLIB@,,;t t
+s,@AR@,$(AR),;t t
+s,@ARFLAGS@,$(ARFLAGS),;t t
+s,@LN_S@,$(LN_S),;t t
+s,@SET_MAKE@,$(SET_MAKE),;t t
+s,@LIBOBJS@, acosh.obj crypt.obj win32.obj isinf.obj isnan.obj,;t t
+s,@ALLOCA@,$(ALLOCA),;t t
+s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
+s,@EXEEXT@,.exe,;t t
+s,@OBJEXT@,obj,;t t
+s,@XLDFLAGS@,$(XLDFLAGS),;t t
+s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH) -def:$$(DEFFILE),;t t
+s,@STATIC@,$(STATIC),;t t
+s,@CCDLFLAGS@,-DIMPORT,;t t
+s,@LDSHARED@,$(LDSHARED),;t t
+s,@DLEXT@,so,;t t
+s,@DLEXT2@,dll,;t t
+s,@LIBEXT@,lib,;t t
+s,@STRIP@,$(STRIP),;t t
+s,@EXTSTATIC@,$(EXTSTATIC),;t t
+s,@setup@,Setup,;t t
+s,@MINIRUBY@,$(MINIRUBY),;t t
+s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t
+s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t
+s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
+s,@rubyw_install_name@,$(RUBYW_INSTALL_NAME),;t t
+s,@RUBYW_INSTALL_NAME@,$(RUBYW_INSTALL_NAME),;t t
+s,@RUBY_SO_NAME@,$(RUBY_SO_NAME),;t t
+s,@LIBRUBY_A@,$$(RUBY_SO_NAME)-static.lib,;t t
+s,@LIBRUBY_SO@,$$(RUBY_SO_NAME).dll,;t t
+s,@LIBRUBY_ALIASES@,$(LIBRUBY_ALIASES),;t t
+s,@LIBRUBY@,$$(RUBY_SO_NAME).lib,;t t
+s,@LIBRUBYARG@,$$(LIBRUBYARG_SHARED),;t t
+s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A),;t t
+s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
+s,@SOLIBS@,$(SOLIBS),;t t
+s,@DLDLIBS@,$(DLDLIBS),;t t
+s,@ENABLE_SHARED@,yes,;t t
+s,@OUTFLAG@,-Fe,;t t
+s,@CPPOUTFILE@,-P,;t t
+s,@LIBPATHFLAG@, -libpath:%s,;t t
+s,@LIBARG@,%s.lib,;t t
+s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS),;t t
+s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t
+s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t
+s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: .%s.%s:,;t t
+s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
+s,@COMMON_LIBS@,m,;t t
+s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t
+s,@COMMON_HEADERS@,winsock2.h windows.h,;t t
+s,@EXPORT_PREFIX@, ,;t t
+s,@arch@,$(ARCH)-$(OS),;t t
+s,@sitearch@,$(ARCH)-$(RT),;t t
+s,@sitedir@,$${prefix}/lib/ruby/site_ruby,;t t
+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
+<<KEEP
+
+minirubyce$(EXEEXT): $(OBJS) $(MAINOBJ) $(WINMAINOBJ) dmyext.obj
+ @echo. $(LIBS)
+ $(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) dmyext.obj $(OBJS) $(LIBS) -Fe$@ $(LDFLAGS)
+
+$(PROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
+ $(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) $*.res \
+ -Fe$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS) -subsystem:"windowsce,3.0"
+
+$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
+ $(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) $*.res \
+ -Fe$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS) -subsystem:"windowsce,3.0"
+
+$(LIBRUBY_A): $(OBJS) dmyext.obj
+ $(AR) $(ARFLAGS)$@ $(OBJS) dmyext.obj
+
+$(LIBRUBY): $(RUBYDEF)
+ $(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
+
+$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS) $(RUBYDEF) $*.res
+ @echo. $(EXTOBJS)
+ $(LIBRUBY_LDSHARED) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY_A) $*.res $(LIBS) \
+ -Fe$@ $(LDFLAGS) $(LIBRUBY_DLDFLAGS)
+
+$(RUBYDEF): $(LIBRUBY_A) minirubyce$(EXEEXT)
+ miniruby$(EXEEXT) $(srcdir)/wince/mkexports.rb \
+ -output=$@ $(LIBRUBY_A) $(ARCH)
+
+{$(srcdir)/wince}.def.lib:
+ $(AR) $(ARFLAGS)$@ -def:$<
+
+install: rbconfig.rb
+# miniruby$(EXEEXT) $(srcdir)/instruby.rb -$(MFLAGS)$(MAKEFLAGS) $(DESTDIR)
+# miniruby$(EXEEXT) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install
+ miniruby$(EXEEXT) $(srcdir)/instruby.rb \
+ "--dest-dir=$(DESTDIR)" "--make=nmake"
+ miniruby$(EXEEXT) $(srcdir)/ext/extmk.rb \
+ --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install
+
+clean: clean-ext clean-local
+
+clean-local:
+ @if exist $(LIBRUBY_A) del $(LIBRUBY_A)
+ @if exist $(MAINOBJ) del $(MAINOBJ)
+ @if exist rbconfig.rb del rbconfig.rb
+ @if exist ext\extinit.c del ext\extinit.c
+ @if exist ext\extinit.obj del ext\extinit.obj
+ @if exist ext\vc*.pdb del ext\vc*.pdb
+ @if exist *.obj del *.obj
+ @if exist *.res del *.res
+
+clean-ext:
+# @-$(MINIRUBY) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" clean
+ @-miniruby$(EXEEXT) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" clean
+
+distclean: distclean-ext distclean-local
+
+distclean-local: clean-local
+ @if exist Makefile del Makefile
+ @if exist config.h del config.h
+ @if exist ext\config.cache del ext\config.cache
+ @if exist config.cache del config.cache
+ @if exist config.log del config.log
+ @if exist config.status del config.status
+ @if exist *~ del *~
+ @if exist *.bak del *.bak
+ @if exist *.stackdump del *.stackdump
+ @if exist *.core del *.core
+ @if exist gmon.out del gmon.out
+ @if exist y.tab.c del y.tab.c
+ @if exist y.output del y.output
+ @if exist *.map del *.map
+ @if exist *.pdb del *.pdb
+ @if exist *.ilk del *.ilk
+ @if exist *.exp del *.exp
+ @if exist $(RUBYDEF) del $(RUBYDEF)
+ @if exist $(RUBY_INSTALL_NAME).rc del $(RUBY_INSTALL_NAME).rc
+ @if exist $(RUBYW_INSTALL_NAME).rc del $(RUBYW_INSTALL_NAME).rc
+ @if exist $(RUBY_SO_NAME).rc del $(RUBY_SO_NAME).rc
+ @if exist $(PROGRAM) del $(PROGRAM)
+ @if exist $(WPROGRAM) del $(WPROGRAM)
+ @if exist $(LIBRUBY_SO) del $(LIBRUBY_SO)
+ @if exist $(LIBRUBY) del $(LIBRUBY)
+ @if exist ext\nul if not exist ext\* rmdir ext
+ @if exist minirubyce$(EXEEXT) del minirubyce$(EXEEXT)
+
+distclean-ext:
+ @-$(MINIRUBY) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" distclean
+
+realclean: distclean
+ @if exist parse.c del parse.c
+ @if exist lex.c del lex.c
+
+test: miniruby$(EXEEXT)
+ @miniruby$(EXEEXT) $(srcdir)/rubytest.rb
+
+rbconfig.rb: minirubyce$(EXEEXT) config.status
+ miniruby$(EXEEXT) $(srcdir)/mkconfig.rb -srcdir=$(srcdir) \
+ -install_name=$(RUBY_INSTALL_NAME) \
+ -so_name=$(RUBY_SO_NAME) rbconfig.rb
+
+$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
+ miniruby$(EXEEXT) $(srcdir)/wince/resource.rb \
+ -ruby_name=$(RUBY_INSTALL_NAME) \
+ -rubyw_name=$(RUBYW_INSTALL_NAME) \
+ -so_name=$(RUBY_SO_NAME) \
+ . $(icondirs) $(srcdir)/wince
+
+{$(srcdir)/missing}.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+{$(srcdir)/win32}.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+{$(srcdir)/wince}.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+{$(srcdir)/wince/sys}.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+{$(srcdir)}.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) -c -Tc$(<:\=/)
+
+.rc.res:
+ $(RC) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
+
+{$(srcdir)}.y.c:
+ $(YACC) $(YFLAGS) $(<:\=/)
+ sed -e "s!^extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $@
+ @del y.tab.c
+
+{$(srcdir)}parse.c: parse.y
+
+ext/extinit.obj: ext/extinit.c $(SETUP)
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fo$@ -c ext/extinit.c
+
+acosh.obj: {$(srcdir)}missing/acosh.c
+alloca.obj: {$(srcdir)}missing/alloca.c
+crypt.obj: {$(srcdir)}missing/crypt.c
+dup2.obj: {$(srcdir)}missing/dup2.c
+finite.obj: {$(srcdir)}missing/finite.c
+flock.obj: {$(srcdir)}missing/flock.c
+isinf.obj: {$(srcdir)}missing/isinf.c
+isnan.obj: {$(srcdir)}missing/isnan.c
+memcmp.obj: {$(srcdir)}missing/memcmp.c
+memmove.obj: {$(srcdir)}missing/memmove.c
+mkdir.obj: {$(srcdir)}missing/mkdir.c
+vsnprintf.obj: {$(srcdir)}missing/vsnprintf.c
+strcasecmp.obj: {$(srcdir)}missing/strcasecmp.c
+strncasecmp.obj: {$(srcdir)}missing/strncasecmp.c
+strchr.obj: {$(srcdir)}missing/strchr.c
+strdup.obj: {$(srcdir)}missing/strdup.c
+strerror.obj: {$(srcdir)}missing/strerror.c
+strftime.obj: {$(srcdir)}missing/strftime.c
+strstr.obj: {$(srcdir)}missing/strstr.c
+strtod.obj: {$(srcdir)}missing/strtod.c
+strtol.obj: {$(srcdir)}missing/strtol.c
+strtoul.obj: {$(srcdir)}missing/strtoul.c
+nt.obj: {$(srcdir)}missing/nt.c
+x68.obj: {$(srcdir)}missing/x68.c
+os2.obj: {$(srcdir)}missing/os2.c
+dl_os2.obj: {$(srcdir)}missing/dl_os2.c
+
+# when I use -I., there is confliction at "OpenFile"
+# so, set . into environment varible "include"
+win32.obj: {$(srcdir)}win32/win32.c
+
+# Prevent GNU make v3 from overflowing arg limit on SysV.
+.NOEXPORT:
+###
+array.obj: {$(srcdir)}array.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}util.h {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
+bignum.obj: {$(srcdir)}bignum.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+class.obj: {$(srcdir)}class.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}rubysig.h {$(srcdir)}node.h {$(srcdir)}st.h \
+ {$(srcdir)}/win32/win32.h
+compar.obj: {$(srcdir)}compar.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+dir.obj: {$(srcdir)}dir.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}util.h {$(srcdir)}/win32/win32.h
+dln.obj: {$(srcdir)}dln.c config.h {$(srcdir)}defines.h \
+ {$(srcdir)}dln.h {$(srcdir)}/win32/win32.h
+dmyext.obj: {$(srcdir)}dmyext.c
+enum.obj: {$(srcdir)}enum.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}node.h {$(srcdir)}util.h {$(srcdir)}/win32/win32.h
+error.obj: {$(srcdir)}error.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}env.h {$(srcdir)}version.h {$(srcdir)}/win32/win32.h
+eval.obj: {$(srcdir)}eval.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}node.h {$(srcdir)}env.h {$(srcdir)}util.h \
+ {$(srcdir)}rubysig.h {$(srcdir)}st.h {$(srcdir)}dln.h \
+ {$(srcdir)}/win32/win32.h
+file.obj: {$(srcdir)}file.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}rubyio.h {$(srcdir)}rubysig.h {$(srcdir)}util.h \
+ {$(srcdir)}dln.h {$(srcdir)}/win32/win32.h
+gc.obj: {$(srcdir)}gc.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}rubysig.h {$(srcdir)}st.h {$(srcdir)}node.h \
+ {$(srcdir)}env.h {$(srcdir)}re.h {$(srcdir)}regex.h \
+ {$(srcdir)}/win32/win32.h
+hash.obj: {$(srcdir)}hash.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}st.h {$(srcdir)}util.h {$(srcdir)}rubysig.h \
+ {$(srcdir)}/win32/win32.h
+inits.obj: {$(srcdir)}inits.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+io.obj: {$(srcdir)}io.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}rubyio.h {$(srcdir)}rubysig.h {$(srcdir)}env.h \
+ {$(srcdir)}util.h {$(srcdir)}/win32/win32.h
+main.obj: {$(srcdir)}main.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+marshal.obj: {$(srcdir)}marshal.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}rubyio.h {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
+math.obj: {$(srcdir)}math.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+numeric.obj: {$(srcdir)}numeric.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+object.obj: {$(srcdir)}object.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
+pack.obj: {$(srcdir)}pack.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+parse.obj: {$(srcdir)}parse.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}env.h {$(srcdir)}node.h {$(srcdir)}st.h {$(srcdir)}regex.h \
+ {$(srcdir)}util.h {$(srcdir)}lex.c {$(srcdir)}/win32/win32.h
+prec.obj: {$(srcdir)}prec.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+process.obj: {$(srcdir)}process.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}rubysig.h {$(srcdir)}st.h {$(srcdir)}/win32/win32.h
+random.obj: {$(srcdir)}random.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+range.obj: {$(srcdir)}range.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+re.obj: {$(srcdir)}re.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}re.h {$(srcdir)}regex.h {$(srcdir)}/win32/win32.h
+regex.obj: {$(srcdir)}regex.c config.h {$(srcdir)}regex.h \
+ {$(srcdir)}/win32/win32.h
+ruby.obj: {$(srcdir)}ruby.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}dln.h {$(srcdir)}node.h {$(srcdir)}util.h \
+ {$(srcdir)}/win32/win32.h
+signal.obj: {$(srcdir)}signal.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}rubysig.h {$(srcdir)}/win32/win32.h
+sprintf.obj: {$(srcdir)}sprintf.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+st.obj: {$(srcdir)}st.c config.h {$(srcdir)}st.h \
+ {$(srcdir)}/win32/win32.h
+string.obj: {$(srcdir)}string.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}re.h {$(srcdir)}regex.h {$(srcdir)}/win32/win32.h
+struct.obj: {$(srcdir)}struct.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+time.obj: {$(srcdir)}time.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}/win32/win32.h
+util.obj: {$(srcdir)}util.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}util.h {$(srcdir)}/win32/win32.h
+variable.obj: {$(srcdir)}variable.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}env.h {$(srcdir)}node.h {$(srcdir)}st.h {$(srcdir)}util.h \
+ {$(srcdir)}/win32/win32.h
+version.obj: {$(srcdir)}version.c {$(srcdir)}ruby.h config.h \
+ {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
+ {$(srcdir)}version.h {$(srcdir)}/win32/win32.h
diff --git a/wince/README.wince b/wince/README.wince
index c4c67df378..795dc710e6 100644
--- a/wince/README.wince
+++ b/wince/README.wince
@@ -6,27 +6,48 @@
(1) eMbedded Visual C++ 3.0 or later.
-== How to compile and install
+(2) If you want to run `((%nmake clean%))' or `((%nmake distclean%))'
+ properly, you must install UNIX compatible `((%rm%))' command on
+ your ((|PATH|)) if you want to clean after compile.
+
+(3) Please set environment variable (({INCLUDE})), (({LIB})), (({PATH})),
+ (({CE_TOOLS_DIR})), (({EMBEDDED_TOOLS_DIR})) to run required commands
+ properly from the command line.
-(1) Move to ruby\wince directory.
+ Note: building ruby requires following commands.
+ * nmake
+ * clarm or clmips or shcl
+ * lib
+ * dumpbin
-(2) if you changed install directories of eMVC and SDK from default
- settings, please modify .\configure.bat in order to set
- environment valuables such as "PATH", "INCLUDE", and "LIB".
+== How to compile and install
-(2) Execute .\configure.bat on "ruby\wince" directory.
+(1) Execute wince\configure.bat on your build directory.
You can specify the target platform as an argument.
- For example, run:
- [CPU] [OS ver.]
- StrongARM HPC2000 : `configure ARM HPC2K'
- MIPS PocketPC : `configure MIPS PPC'
- SH3 PocketPC : `configure SH3 PPC'
- SH4 HPCPro : `configure SH4 HPCPRO'
- (caution: "HPCPro" is not supported yet.)
+ For example, run `((%configure arm-hpc2k-wince%))'
+
+(2) Change ((|RUBY_INSTALL_NAME|)) and ((|RUBY_SO_NAME|)) in (({Makefile}))
+ if you want to change the name of the executable files.
-(3) Execute `.\make.bat'.
+(3) Run `((%nmake%))'
-(4) Copy mswince-ruby17.dll, ruby.exe, and irb.exe to your WinCE machine.
+(4) Run `((%nmake DESTDIR=<install_directory> install%))'
+
+ This command will create following directories and copy (not install :-P)
+ files onto them.
+ * <install_directory>\bin
+ * <install_directory>\lib
+ * <install_directory>\lib\ruby
+ * <install_directory>\lib\ruby\<MAJOR>.<MINOR>
+ * <install_directory>\lib\ruby\<MAJOR>.<MINOR>\<PLATFORM>
+ * <install_directory>\lib\ruby\site_ruby
+ * <install_directory>\lib\ruby\site_ruby\<MAJOR>.<MINOR>
+ * <install_directory>\lib\ruby\site_ruby\<MAJOR>.<MINOR>\<PLATFORM>
+ * <install_directory>\man\man1
+ If Ruby's version is `x.y.z', the ((|<MAJOR>|)) is `x' and the ((|<MINOR>|)) is `y'.
+ In case of `mips-hpc2k-wince', The ((|<PLATFORM>|)) is `(({mips-mswince}))'.
+
+(5) Copy <install_directory> to your WindowsCE machine.
== Icons
@@ -49,14 +70,52 @@ in Japanese, but you can download at least.
== Build examples
+* Build on the ruby source directory.
+
ex.)
- current directory: C:\
ruby source directory: C:\ruby
- target CPU: StrongARM
- target OS version: PocketPC
+ build directory: C:\ruby
+ install directory: C:\usr\local
+
+ C:
+ cd \ruby
+ win32\configure
+ nmake
+ nmake DESTDIR=/usr/local install
- cd \ruby\wince
- .\configure ARM PPC
- .\make.bat
+* Build on the relative directory from the ruby source directory.
+
+ ex.)
+ ruby source directory: C:\ruby
+ build directory: C:\ruby\mswin32
+ install directory: C:\usr\local
+
+ C:
+ cd \ruby
+ mkdir mswin32
+ cd mswin32
+ ..\win32\configure
+ nmake
+ nmake DESTDIR=/usr/local install
+
+* Build on the different drive.
+
+ ex.)
+ ruby source directory: C:\src\ruby
+ build directory: D:\build\ruby
+ install directory: C:\usr\local
+
+ D:
+ cd D:\build\ruby
+ C:\src\ruby\win32\configure
+ nmake
+ nmake DESTDIR=C:/usr/local install
+
+== Bugs
+
+You can ((*NOT*)) use a path name contains any white space characters as
+the ruby source directory, this restriction comes from the behavior of
+(({!INCLUDE})) directives of (({NMAKE})).
+((- you may call it a bug. -))
=end
diff --git a/wince/assert.c b/wince/assert.c
new file mode 100644
index 0000000000..0f4be68497
--- /dev/null
+++ b/wince/assert.c
@@ -0,0 +1,11 @@
+#include <windows.h>
+#include <tchar.h>
+#include "assert.h"
+
+
+void assert( int expression )
+{
+ if( expression==0 )
+ exit(2);
+}
+
diff --git a/wince/assert.h b/wince/assert.h
index 04831e48f1..c2a4e3ebb7 100644
--- a/wince/assert.h
+++ b/wince/assert.h
@@ -1,4 +1,6 @@
#ifndef _ASSERT_H_
#define _ASSERT_H_
+void assert( int expression );
+
#endif
diff --git a/wince/config b/wince/config
deleted file mode 100644
index 910259a9e2..0000000000
--- a/wince/config
+++ /dev/null
@@ -1,135 +0,0 @@
-/* config.h */
-/* based on mswin32's. */
-#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 && !defined NORETURN
-#define NORETURN(x) __declspec(noreturn) x
-#else
-#define NORETURN(x) x
-#endif
-#define HAVE_DECL_SYS_NERR 1
-#define STDC_HEADERS 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_FCNTL_H 1
-#define HAVE_SYS_UTIME_H 1
-#define HAVE_MEMORY_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_FINITE 1
-#define HAVE_FMOD 1
-#define HAVE_FREXP 1
-#define HAVE_HYPOT 1
-#define HAVE_MODF 1
-#define HAVE_WAITPID 1
-#define HAVE_CHSIZE 1
-#define HAVE_TIMES 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_EXECVE 1
-#define HAVE_TZNAME 1
-#define HAVE_DAYLIGHT 1
-#define SETPGRP_VOID 1
-#define inline __inline
-#define RSHIFT(x,y) ((x)>>(int)y)
-#define DEFAULT_KCODE KCODE_NONE
-#define DLEXT ".so"
-#define DLEXT2 ".dll"
-#define RUBY_LIB "/lib/ruby/1.8"
-#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
-#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/1.8"
-
-
-/* below wince's original definition. */
-#define fdopen _fdopen
-#define dup _dup
-#define _dup2 dup2
-
-#ifdef FormatMessage
-#undef FormatMessage
-#define FormatMessage FormatMessageA
-#endif
-
-#ifdef GetModuleFileName
-#undef GetModuleFileName
-#define GetModuleFileName GetModuleFileNameA
-#endif
-
-#ifdef CharNext
-#undef CharNext
-#define CharNext CharNextA
-#endif
-
-#ifdef CharPrev
-#undef CharPrev
-#define CharPrev CharPrevA
-#endif
-
-#ifdef LoadLibrary
-#undef LoadLibrary
-#define LoadLibrary LoadLibraryA
-#endif
-
-#ifdef GetProcAddress
-#undef GetProcAddress
-#define GetProcAddress GetProcAddressA
-#endif
-
-#if _WIN32_WCE < 300
- /* for Handheld PC Pro. */
- #define isascii(c) ( (c>=0x00&&c<=0x7f)?1:0 )
- #define isspace(c) ( ((c>=0x09&&c<=0x0d)||c==0x20)?1:0 )
- #define isdigit(c) ( (c>=0x00&&c<=0x09)?1:0 )
- #define isupper(c) ( (c>='A'&&c<='Z')?1:0 )
- #define isalpha(c) ( ((c>='A'&&c<='Z')||(c>='a'&&c<='z'))?1:0 )
- #define isprint(c) ( (c>=0x20&&c<=0x7e)?1:0 )
- #define isalnum(c) ( (isalpha(c)||isdigit(c))?1:0 )
- #define iscntrl(c) ( ((c>=0x00&&c<=0x1f)||c==0x7f)?1:0 )
- #define islower(c) ( (c>='a'&&c<='z')?1:0 )
- #define ispunct(c) ( !(isalnum(c)||isspace(c))?1:0 )
- #define isxdigit(c) ( ((c>=0&&c<=9)||(c>='A'&&c<='F')||(c>='a'&&c<='f'))?1:0 )
-#endif
-
diff --git a/wince/configure.bat b/wince/configure.bat
index 9c0054a088..6240a3cee8 100644
--- a/wince/configure.bat
+++ b/wince/configure.bat
@@ -1,133 +1,57 @@
@echo off
-
-if "%1"=="" goto error
-if "%2"=="" goto error
-
-if exist make.bat @del make.bat
-
-if "%1"=="MIPS" goto mips
-if "%1"=="ARM" goto arm
-if "%1"=="SH3" goto sh3
-if "%1"=="SH4" goto sh4
-
-:mips
-
-copy config config.h
-echo #define RUBY_PLATFORM "mips-mswince" >> config.h
-echo #define RUBY_ARCHLIB "/lib/ruby/1.8/mips-mswince" >> config.h
-echo #define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/1.8/mips-mswince" >> config.h
-
-if "%2"=="HPC2K" goto mipshpc2k
-if "%2"=="PPC" goto mipsppc
-if "%2"=="HPCPRO" goto mipshpcpro
-
-:mipshpc2k
- echo nmake /f "dll.mak" CFG=MIPS >> make.bat
- echo nmake /f "exe.mak" CFG=MIPS >> make.bat
- set path=c:\program files\microsoft embedded tools\common\evc\bin;C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN
- set include=c:\windows ce tools\wce300\hpc2000\include
- set lib=C:\Windows CE Tools\wce300\hpc2000\lib\mips
- goto normalend
-:mipsppc
- echo nmake /f "dll.mak" CFG=MIPS >> make.bat
- echo nmake /f "exe.mak" CFG=MIPS >> make.bat
- set path=c:\program files\microsoft embedded tools\common\evc\bin;C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN
- set include=c:\windows ce tools\wce300\MS Pocket PC\include
- set lib=c:\windows ce tools\wce300\MS Pocket PC\lib\mips
- goto normalend
-:mipshpcpro
- echo nmake /f "dll.mak" CFG=MIPS CESubsystem=windowsce,2.11 CEVersion=211 >> make.bat
- echo nmake /f "exe.mak" CFG=MIPS CESubsystem=windowsce,2.11 CEVersion=211 >> make.bat
- set path=c:\program files\microsoft embedded tools\common\evc\bin;C:\Program Files\Microsoft eMbedded Tools\EVC\WCE211\BIN
- set include=C:\Windows CE Tools\wce211\MS HPC Pro\include
- set lib=C:\Windows CE Tools\wce211\MS HPC Pro\lib\mips
- goto normalend
-
-:arm
-
-copy config config.h
-echo #define RUBY_PLATFORM "arm-mswince" >> config.h
-echo #define RUBY_ARCHLIB "/lib/ruby/1.8/arm-mswince" >> config.h
-echo #define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/1.8/arm-mswince" >> config.h
-
-if "%2"=="HPC2K" goto armhpc2k
-if "%2"=="PPC" goto armppc
-if "%2"=="HPCPRO" goto armhpcpro
-
-:armhpc2k
- echo nmake /f "dll.mak" CFG=ARM >> make.bat
- echo nmake /f "exe.mak" CFG=ARM >> make.bat
- set path=c:\program files\microsoft embedded tools\common\evc\bin;C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN
- set include=c:\windows ce tools\wce300\hpc2000\include
- set lib=C:\Windows CE Tools\wce300\hpc2000\lib\arm
- goto normalend
-:armppc
- echo nmake /f "dll.mak" CFG=ARM >> make.bat
- echo nmake /f "exe.mak" CFG=ARM >> make.bat
- set path=c:\program files\microsoft embedded tools\common\evc\bin;C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN
- set include=c:\windows ce tools\wce300\MS Pocket PC\include
- set lib=c:\windows ce tools\wce300\MS Pocket PC\lib\arm
- goto normalend
-:armhpcpro
- echo nmake /f "dll.mak" CFG=ARM CESubsystem=windowsce,2.11 CEVersion=211 >> make.bat
- echo nmake /f "exe.mak" CFG=ARM CESubsystem=windowsce,2.11 CEVersion=211 >> make.bat
- set path=c:\program files\microsoft embedded tools\common\evc\bin;C:\Program Files\Microsoft eMbedded Tools\EVC\WCE211\BIN
- set include=C:\Windows CE Tools\wce211\MS HPC Pro\include
- set lib=C:\Windows CE Tools\wce211\MS HPC Pro\lib\arm
- goto normalend
-
-:sh3
-
-copy config config.h
-echo #define RUBY_PLATFORM "sh3-mswince" >> config.h
-echo #define RUBY_ARCHLIB "/lib/ruby/1.8/sh3-mswince" >> config.h
-echo #define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/1.8/sh3-mswince" >> config.h
-
-if "%2"=="HPC2K" goto error
-if "%2"=="PPC" goto sh3ppc
-if "%2"=="HPCPRO" goto sh3hpcpro
-
-:sh3ppc
- echo nmake /f "dll.mak" CFG=SH3 >> make.bat
- echo nmake /f "exe.mak" CFG=SH3 >> make.bat
- set path=c:\program files\microsoft embedded tools\common\evc\bin;C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN
- set include=c:\windows ce tools\wce300\MS Pocket PC\include
- set lib=c:\windows ce tools\wce300\MS Pocket PC\lib\sh3
- goto normalend
-:sh3hpcpro
- echo nmake /f "dll.mak" CFG=SH3 CESubsystem=windowsce,2.11 CEVersion=211 >> make.bat
- echo nmake /f "exe.mak" CFG=SH3 CESubsystem=windowsce,2.11 CEVersion=211 >> make.bat
- set path=c:\program files\microsoft embedded tools\common\evc\bin;C:\Program Files\Microsoft eMbedded Tools\EVC\WCE211\BIN
- set include=C:\Windows CE Tools\wce211\MS HPC Pro\include
- set lib=C:\Windows CE Tools\wce211\MS HPC Pro\lib\sh3
- goto normalend
-
-:sh4
-
-copy config config.h
-echo #define RUBY_PLATFORM "sh4-mswince" >> config.h
-echo #define RUBY_ARCHLIB "/lib/ruby/1.8/sh4-mswince" >> config.h
-echo #define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/1.8/sh4-mswince" >> config.h
-
-if "%2"=="HPC2K" goto error
-if "%2"=="PPC" goto error
-if "%2"=="HPCPRO" goto sh4hpcpro
-
-:sh4hpcpro
- echo nmake /f "dll.mak" CFG=SH4 CESubsystem=windowsce,2.11 CEVersion=211 >> make.bat
- echo nmake /f "exe.mak" CFG=SH4 CESubsystem=windowsce,2.11 CEVersion=211 >> make.bat
- set path=c:\program files\microsoft embedded tools\common\evc\bin;C:\Program Files\Microsoft eMbedded Tools\EVC\WCE211\BIN
- set include=C:\Windows CE Tools\wce211\MS HPC Pro\include
- set lib=C:\Windows CE Tools\wce211\MS HPC Pro\lib\sh4
- goto normalend
-
-
-:error
-echo ERROR. Please check arguments.
-goto end
-
-:normalend
-echo configure OK. Please type ".\make.bat".
-goto end
-
+::: Don't set environment variable in batch file other than autoexec.bat
+::: to avoid "Out of environment space" problem on Windows 95/98.
+::: set TMPMAKE=~tmp~.mak
+
+echo> ~tmp~.mak ####
+echo>> ~tmp~.mak conf = %0
+echo>> ~tmp~.mak $(conf:\=/): nul
+echo>> ~tmp~.mak @del ~tmp~.mak
+echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
+:loop
+if "%1" == "" goto :end
+if "%1" == "--srcdir" goto :srcdir
+if "%1" == "srcdir" goto :srcdir
+if "%1" == "--target" goto :target
+if "%1" == "target" goto :target
+if "%1" == "--program-suffix" goto :suffix
+if "%1" == "--program-name" goto :progname
+if "%1" == "CC" goto :define
+if "%1" == "EMBEDDED_TOOLS_DIR" goto :define
+if "%1" == "CE_TOOLS_DIR" goto :define
+ echo>> ~tmp~.mak "%1" \
+ shift
+goto :loop
+:srcdir
+ echo>> ~tmp~.mak "srcdir=%2" \
+ shift
+ shift
+goto :loop
+:suffix
+ echo>> ~tmp~.mak "RUBY_SUFFIX=%2" \
+ shift
+ shift
+goto :loop
+:installname
+ echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%2" \
+ shift
+ shift
+goto :loop
+:soname
+ echo>> ~tmp~.mak "RUBY_SO_NAME=%2" \
+ shift
+ shift
+goto :loop
+:define
+ echo>> ~tmp~.mak "%1=%2" \
+ shift
+ shift
+goto :loop
+:target
+ echo>> ~tmp~.mak "%2" \
+ shift
+ shift
+goto :loop
:end
+echo>> ~tmp~.mak WIN32DIR=$(@D)
+nmake -alf ~tmp~.mak
diff --git a/wince/direct.c b/wince/direct.c
index 4e1ff7a866..bf0d7cd224 100644
--- a/wince/direct.c
+++ b/wince/direct.c
@@ -8,7 +8,7 @@
#include "wince.h" /* for wce_mbtowc */
/* global for chdir, getcwd */
-static char _currentdir[MAX_PATH+1];
+char _currentdir[MAX_PATH+1];
char *getcwd(char* buffer, int maxlen)
diff --git a/wince/dll.mak b/wince/dll.mak
deleted file mode 100644
index 4fcc5292e9..0000000000
--- a/wince/dll.mak
+++ /dev/null
@@ -1,1531 +0,0 @@
-
-!IF "$(CFG)" == ""
-CFG=MIPS
-!MESSAGE CFG not specified. Use MIPS.
-!ENDIF
-
-!IF "$(CESubsystem)" == ""
-#CESubsystem=windowsce,2.0
-CESubsystem=windowsce,3.0
-#!MESSAGE CESubsystem not specified. Use windowsce,2.11.
-!MESSAGE CESubsystem not specified. Use windowsce,3.0.
-!ENDIF
-
-!IF "$(CEVersion)" == ""
-#CEVersion=200
-CEVersion=300
-#!MESSAGE CEVersion not specified. Use 211.
-!MESSAGE CEVersion not specified. Use 300.
-!ENDIF
-
-!IF $(CEVersion) < 201
-CECrt=L
-CECrtDebug=Ld
-CECrtMT=T
-CECrtMTDebug=Td
-CENoDefaultLib=corelibc.lib
-CEx86Corelibc=
-!ELSE
-CECrt=C
-CECrtDebug=C
-CECrtMT=C
-CECrtMTDebug=C
-CENoDefaultLib=libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib
-CEx86Corelibc=corelibc.lib
-!ENDIF
-
-!IF "$(CE_PLATFORM)"==""
-CePlatform=WIN32_PLATFORM_UNKNOWN
-!ELSE
-CePlatform=$(CE_PLATFORM)
-!ENDIF
-
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-!IF "$(CFG)" == "MIPS"
-
-OUTDIR=.\MIPSRel
-INTDIR=.\MIPSRel
-# Begin Custom Macros
-OutDir=.\MIPSRel
-# End Custom Macros
-
-ALL : "$(OUTDIR)\mswince_ruby17.dll"
-
-
-CLEAN :
- -@erase "$(INTDIR)\acosh.obj"
- -@erase "$(INTDIR)\array.obj"
- -@erase "$(INTDIR)\bignum.obj"
- -@erase "$(INTDIR)\class.obj"
- -@erase "$(INTDIR)\compar.obj"
- -@erase "$(INTDIR)\crypt.obj"
- -@erase "$(INTDIR)\dir.obj"
- -@erase "$(INTDIR)\dln.obj"
- -@erase "$(INTDIR)\dmyext.obj"
- -@erase "$(INTDIR)\enum.obj"
- -@erase "$(INTDIR)\error.obj"
- -@erase "$(INTDIR)\eval.obj"
- -@erase "$(INTDIR)\file.obj"
- -@erase "$(INTDIR)\gc.obj"
- -@erase "$(INTDIR)\hash.obj"
- -@erase "$(INTDIR)\hypot.obj"
- -@erase "$(INTDIR)\inits.obj"
- -@erase "$(INTDIR)\io.obj"
- -@erase "$(INTDIR)\isinf.obj"
- -@erase "$(INTDIR)\isnan.obj"
- -@erase "$(INTDIR)\marshal.obj"
- -@erase "$(INTDIR)\math.obj"
- -@erase "$(INTDIR)\numeric.obj"
- -@erase "$(INTDIR)\object.obj"
- -@erase "$(INTDIR)\pack.obj"
- -@erase "$(INTDIR)\prec.obj"
- -@erase "$(INTDIR)\process.obj"
- -@erase "$(INTDIR)\random.obj"
- -@erase "$(INTDIR)\range.obj"
- -@erase "$(INTDIR)\re.obj"
- -@erase "$(INTDIR)\regex.obj"
- -@erase "$(INTDIR)\ruby.obj"
- -@erase "$(INTDIR)\signal.obj"
- -@erase "$(INTDIR)\sprintf.obj"
- -@erase "$(INTDIR)\st.obj"
- -@erase "$(INTDIR)\strftime.obj"
- -@erase "$(INTDIR)\string.obj"
- -@erase "$(INTDIR)\struct.obj"
- -@erase "$(INTDIR)\time.obj"
- -@erase "$(INTDIR)\util.obj"
- -@erase "$(INTDIR)\variable.obj"
- -@erase "$(INTDIR)\version.obj"
- -@erase "$(INTDIR)\win32.obj"
- -@erase "$(OUTDIR)\mswince_ruby17.dll"
- -@erase "$(OUTDIR)\mswince_ruby17.exp"
- -@erase "$(OUTDIR)\mswince_ruby17.lib"
- -@erase "$(OUTDIR)\wce\direct.obj"
- -@erase "$(OUTDIR)\wce\errno.obj"
- -@erase "$(OUTDIR)\wce\io.obj"
- -@erase "$(OUTDIR)\wce\parse.obj"
- -@erase "$(OUTDIR)\wce\process.obj"
- -@erase "$(OUTDIR)\wce\signal.obj"
- -@erase "$(OUTDIR)\wce\stat.obj"
- -@erase "$(OUTDIR)\wce\stdio.obj"
- -@erase "$(OUTDIR)\wce\stdlib.obj"
- -@erase "$(OUTDIR)\wce\string.obj"
- -@erase "$(OUTDIR)\wce\time.obj"
- -@erase "$(OUTDIR)\wce\timeb.obj"
- -@erase "$(OUTDIR)\wce\utime.obj"
- -@erase "$(OUTDIR)\wce\wince.obj"
- -@erase "$(OUTDIR)\wce\winsock2.obj"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
- if not exist "$(OUTDIR)/wce" mkdir "$(OUTDIR)/wce"
- if not exist ".\parse.c" byacc ../parse.y
- if not exist ".\parse.c" sed -e "s!^extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > ".\parse.c"
- if exist "y.tab.c" @del y.tab.c
-
-RSC=rc.exe
-CPP=clmips.exe
-CPP_PROJ=/nologo /W1 /I ".." /I "..\missing" /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "MSWINCE_RUBY17_EXPORTS" /D BUFSIZ=512 /D FILENAME_MAX=260 /D TLS_OUT_OF_INDEXES=0xFFFFFFFF /Fp"$(INTDIR)\mswince_ruby17.pch" /YX /Fo"$(INTDIR)\\" /Oxs /M$(CECrtMT) /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\mswince_ruby17.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=commctrl.lib coredll.lib winsock.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /incremental:no /pdb:"$(OUTDIR)\mswince_ruby17.pdb" /nodefaultlib:"$(CENoDefaultLib)" /def:".\mswince-ruby17.def" /out:"$(OUTDIR)\mswince_ruby17.dll" /implib:"$(OUTDIR)\mswince_ruby17.lib" /subsystem:$(CESubsystem) /MACHINE:MIPS
-DEF_FILE= \
- ".\mswince-ruby17.def"
-LINK32_OBJS= \
- "$(INTDIR)\array.obj" \
- "$(INTDIR)\bignum.obj" \
- "$(INTDIR)\class.obj" \
- "$(INTDIR)\compar.obj" \
- "$(INTDIR)\dir.obj" \
- "$(INTDIR)\dln.obj" \
- "$(INTDIR)\dmyext.obj" \
- "$(INTDIR)\enum.obj" \
- "$(INTDIR)\error.obj" \
- "$(INTDIR)\eval.obj" \
- "$(INTDIR)\file.obj" \
- "$(INTDIR)\gc.obj" \
- "$(INTDIR)\hash.obj" \
- "$(INTDIR)\inits.obj" \
- "$(INTDIR)\io.obj" \
- "$(INTDIR)\marshal.obj" \
- "$(INTDIR)\math.obj" \
- "$(INTDIR)\numeric.obj" \
- "$(INTDIR)\object.obj" \
- "$(INTDIR)\pack.obj" \
- "$(INTDIR)\prec.obj" \
- "$(INTDIR)\process.obj" \
- "$(INTDIR)\random.obj" \
- "$(INTDIR)\range.obj" \
- "$(INTDIR)\re.obj" \
- "$(INTDIR)\regex.obj" \
- "$(INTDIR)\ruby.obj" \
- "$(INTDIR)\signal.obj" \
- "$(INTDIR)\sprintf.obj" \
- "$(INTDIR)\st.obj" \
- "$(INTDIR)\string.obj" \
- "$(INTDIR)\struct.obj" \
- "$(INTDIR)\time.obj" \
- "$(INTDIR)\util.obj" \
- "$(INTDIR)\variable.obj" \
- "$(INTDIR)\version.obj" \
- "$(INTDIR)\win32.obj" \
- "$(INTDIR)\acosh.obj" \
- "$(INTDIR)\crypt.obj" \
- "$(INTDIR)\hypot.obj" \
- "$(INTDIR)\isinf.obj" \
- "$(INTDIR)\isnan.obj" \
- "$(INTDIR)\strftime.obj" \
- "$(INTDIR)\wce\direct.obj" \
- "$(INTDIR)\wce\errno.obj" \
- "$(INTDIR)\wce\io.obj" \
- "$(INTDIR)\wce\process.obj" \
- "$(INTDIR)\wce\signal.obj" \
- "$(INTDIR)\wce\stat.obj" \
- "$(INTDIR)\wce\stdio.obj" \
- "$(INTDIR)\wce\stdlib.obj" \
- "$(INTDIR)\wce\string.obj" \
- "$(INTDIR)\wce\time.obj" \
- "$(INTDIR)\wce\timeb.obj" \
- "$(INTDIR)\wce\utime.obj" \
- "$(INTDIR)\wce\wince.obj" \
- "$(INTDIR)\wce\winsock2.obj" \
- "$(INTDIR)\wce\parse.obj"
-
-"$(OUTDIR)\mswince_ruby17.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "SH4"
-
-OUTDIR=.\SH4Rel
-INTDIR=.\SH4Rel
-# Begin Custom Macros
-OutDir=.\SH4Rel
-# End Custom Macros
-
-ALL : "$(OUTDIR)\mswince_ruby17.dll"
-
-
-CLEAN :
- -@erase "$(INTDIR)\acosh.obj"
- -@erase "$(INTDIR)\array.obj"
- -@erase "$(INTDIR)\bignum.obj"
- -@erase "$(INTDIR)\class.obj"
- -@erase "$(INTDIR)\compar.obj"
- -@erase "$(INTDIR)\crypt.obj"
- -@erase "$(INTDIR)\dir.obj"
- -@erase "$(INTDIR)\dln.obj"
- -@erase "$(INTDIR)\dmyext.obj"
- -@erase "$(INTDIR)\enum.obj"
- -@erase "$(INTDIR)\error.obj"
- -@erase "$(INTDIR)\eval.obj"
- -@erase "$(INTDIR)\file.obj"
- -@erase "$(INTDIR)\gc.obj"
- -@erase "$(INTDIR)\hash.obj"
- -@erase "$(INTDIR)\hypot.obj"
- -@erase "$(INTDIR)\inits.obj"
- -@erase "$(INTDIR)\io.obj"
- -@erase "$(INTDIR)\isinf.obj"
- -@erase "$(INTDIR)\isnan.obj"
- -@erase "$(INTDIR)\marshal.obj"
- -@erase "$(INTDIR)\math.obj"
- -@erase "$(INTDIR)\numeric.obj"
- -@erase "$(INTDIR)\object.obj"
- -@erase "$(INTDIR)\pack.obj"
- -@erase "$(INTDIR)\prec.obj"
- -@erase "$(INTDIR)\process.obj"
- -@erase "$(INTDIR)\random.obj"
- -@erase "$(INTDIR)\range.obj"
- -@erase "$(INTDIR)\re.obj"
- -@erase "$(INTDIR)\regex.obj"
- -@erase "$(INTDIR)\ruby.obj"
- -@erase "$(INTDIR)\signal.obj"
- -@erase "$(INTDIR)\sprintf.obj"
- -@erase "$(INTDIR)\st.obj"
- -@erase "$(INTDIR)\strftime.obj"
- -@erase "$(INTDIR)\string.obj"
- -@erase "$(INTDIR)\struct.obj"
- -@erase "$(INTDIR)\time.obj"
- -@erase "$(INTDIR)\util.obj"
- -@erase "$(INTDIR)\variable.obj"
- -@erase "$(INTDIR)\version.obj"
- -@erase "$(INTDIR)\win32.obj"
- -@erase "$(OUTDIR)\mswince_ruby17.dll"
- -@erase "$(OUTDIR)\mswince_ruby17.exp"
- -@erase "$(OUTDIR)\mswince_ruby17.lib"
- -@erase "$(INTDIR)\wce\direct.obj"
- -@erase "$(INTDIR)\wce\errno.obj"
- -@erase "$(INTDIR)\wce\io.obj"
- -@erase "$(INTDIR)\wce\parse.obj"
- -@erase "$(INTDIR)\wce\process.obj"
- -@erase "$(INTDIR)\wce\signal.obj"
- -@erase "$(INTDIR)\wce\stat.obj"
- -@erase "$(INTDIR)\wce\stdio.obj"
- -@erase "$(INTDIR)\wce\stdlib.obj"
- -@erase "$(INTDIR)\wce\string.obj"
- -@erase "$(INTDIR)\wce\time.obj"
- -@erase "$(INTDIR)\wce\timeb.obj"
- -@erase "$(INTDIR)\wce\utime.obj"
- -@erase "$(INTDIR)\wce\wince.obj"
- -@erase "$(INTDIR)\wce\winsock2.obj"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
- if not exist "$(OUTDIR)/wce" mkdir "$(OUTDIR)/wce"
- if not exist ".\parse.c" byacc ../parse.y
- if not exist ".\parse.c" sed -e "s!^extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > ".\parse.c"
- if exist "y.tab.c" @del y.tab.c
-
-RSC=rc.exe
-CPP=shcl.exe
-CPP_PROJ=/nologo /W1 /I ".." /I "..\missing" /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "MSWINCE_RUBY17_EXPORTS" /D BUFSIZ=512 /D FILENAME_MAX=260 /D TLS_OUT_OF_INDEXES=0xFFFFFFFF /Fp"$(INTDIR)\mswince_ruby17.pch" /YX /Fo"$(INTDIR)\\" /Qsh4 /Oxs /M$(CECrtMT) /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\mswince_ruby17.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=commctrl.lib coredll.lib winsock.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /incremental:no /pdb:"$(OUTDIR)\mswince_ruby17.pdb" /nodefaultlib:"$(CENoDefaultLib)" /def:".\mswince-ruby17.def" /out:"$(OUTDIR)\mswince_ruby17.dll" /implib:"$(OUTDIR)\mswince_ruby17.lib" /subsystem:$(CESubsystem) /MACHINE:SH4
-DEF_FILE= \
- ".\mswince-ruby17.def"
-LINK32_OBJS= \
- "$(INTDIR)\array.obj" \
- "$(INTDIR)\bignum.obj" \
- "$(INTDIR)\class.obj" \
- "$(INTDIR)\compar.obj" \
- "$(INTDIR)\dir.obj" \
- "$(INTDIR)\dln.obj" \
- "$(INTDIR)\dmyext.obj" \
- "$(INTDIR)\enum.obj" \
- "$(INTDIR)\error.obj" \
- "$(INTDIR)\eval.obj" \
- "$(INTDIR)\file.obj" \
- "$(INTDIR)\gc.obj" \
- "$(INTDIR)\hash.obj" \
- "$(INTDIR)\inits.obj" \
- "$(INTDIR)\io.obj" \
- "$(INTDIR)\marshal.obj" \
- "$(INTDIR)\math.obj" \
- "$(INTDIR)\numeric.obj" \
- "$(INTDIR)\object.obj" \
- "$(INTDIR)\pack.obj" \
- "$(INTDIR)\prec.obj" \
- "$(INTDIR)\process.obj" \
- "$(INTDIR)\random.obj" \
- "$(INTDIR)\range.obj" \
- "$(INTDIR)\re.obj" \
- "$(INTDIR)\regex.obj" \
- "$(INTDIR)\ruby.obj" \
- "$(INTDIR)\signal.obj" \
- "$(INTDIR)\sprintf.obj" \
- "$(INTDIR)\st.obj" \
- "$(INTDIR)\string.obj" \
- "$(INTDIR)\struct.obj" \
- "$(INTDIR)\time.obj" \
- "$(INTDIR)\util.obj" \
- "$(INTDIR)\variable.obj" \
- "$(INTDIR)\version.obj" \
- "$(INTDIR)\win32.obj" \
- "$(INTDIR)\acosh.obj" \
- "$(INTDIR)\crypt.obj" \
- "$(INTDIR)\hypot.obj" \
- "$(INTDIR)\isinf.obj" \
- "$(INTDIR)\isnan.obj" \
- "$(INTDIR)\strftime.obj" \
- "$(INTDIR)\wce\direct.obj" \
- "$(INTDIR)\wce\errno.obj" \
- "$(INTDIR)\wce\io.obj" \
- "$(INTDIR)\wce\process.obj" \
- "$(INTDIR)\wce\signal.obj" \
- "$(INTDIR)\wce\stat.obj" \
- "$(INTDIR)\wce\stdio.obj" \
- "$(INTDIR)\wce\stdlib.obj" \
- "$(INTDIR)\wce\string.obj" \
- "$(INTDIR)\wce\time.obj" \
- "$(INTDIR)\wce\timeb.obj" \
- "$(INTDIR)\wce\utime.obj" \
- "$(INTDIR)\wce\wince.obj" \
- "$(INTDIR)\wce\winsock2.obj" \
- "$(INTDIR)\wce\parse.obj"
-
-"$(OUTDIR)\mswince_ruby17.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "SH3"
-
-OUTDIR=.\SH3Rel
-INTDIR=.\SH3Rel
-# Begin Custom Macros
-OutDir=.\SH3Rel
-# End Custom Macros
-
-ALL : "$(OUTDIR)\mswince_ruby17.dll"
-
-
-CLEAN :
- -@erase "$(INTDIR)\acosh.obj"
- -@erase "$(INTDIR)\array.obj"
- -@erase "$(INTDIR)\bignum.obj"
- -@erase "$(INTDIR)\class.obj"
- -@erase "$(INTDIR)\compar.obj"
- -@erase "$(INTDIR)\crypt.obj"
- -@erase "$(INTDIR)\dir.obj"
- -@erase "$(INTDIR)\dln.obj"
- -@erase "$(INTDIR)\dmyext.obj"
- -@erase "$(INTDIR)\enum.obj"
- -@erase "$(INTDIR)\error.obj"
- -@erase "$(INTDIR)\eval.obj"
- -@erase "$(INTDIR)\file.obj"
- -@erase "$(INTDIR)\gc.obj"
- -@erase "$(INTDIR)\hash.obj"
- -@erase "$(INTDIR)\hypot.obj"
- -@erase "$(INTDIR)\inits.obj"
- -@erase "$(INTDIR)\io.obj"
- -@erase "$(INTDIR)\isinf.obj"
- -@erase "$(INTDIR)\isnan.obj"
- -@erase "$(INTDIR)\marshal.obj"
- -@erase "$(INTDIR)\math.obj"
- -@erase "$(INTDIR)\numeric.obj"
- -@erase "$(INTDIR)\object.obj"
- -@erase "$(INTDIR)\pack.obj"
- -@erase "$(INTDIR)\prec.obj"
- -@erase "$(INTDIR)\process.obj"
- -@erase "$(INTDIR)\random.obj"
- -@erase "$(INTDIR)\range.obj"
- -@erase "$(INTDIR)\re.obj"
- -@erase "$(INTDIR)\regex.obj"
- -@erase "$(INTDIR)\ruby.obj"
- -@erase "$(INTDIR)\signal.obj"
- -@erase "$(INTDIR)\sprintf.obj"
- -@erase "$(INTDIR)\st.obj"
- -@erase "$(INTDIR)\strftime.obj"
- -@erase "$(INTDIR)\string.obj"
- -@erase "$(INTDIR)\struct.obj"
- -@erase "$(INTDIR)\time.obj"
- -@erase "$(INTDIR)\util.obj"
- -@erase "$(INTDIR)\variable.obj"
- -@erase "$(INTDIR)\version.obj"
- -@erase "$(INTDIR)\win32.obj"
- -@erase "$(OUTDIR)\mswince_ruby17.dll"
- -@erase "$(OUTDIR)\mswince_ruby17.exp"
- -@erase "$(OUTDIR)\mswince_ruby17.lib"
- -@erase "$(INTDIR)\wce\direct.obj"
- -@erase "$(INTDIR)\wce\errno.obj"
- -@erase "$(INTDIR)\wce\io.obj"
- -@erase "$(INTDIR)\wce\parse.obj"
- -@erase "$(INTDIR)\wce\process.obj"
- -@erase "$(INTDIR)\wce\signal.obj"
- -@erase "$(INTDIR)\wce\stat.obj"
- -@erase "$(INTDIR)\wce\stdio.obj"
- -@erase "$(INTDIR)\wce\stdlib.obj"
- -@erase "$(INTDIR)\wce\string.obj"
- -@erase "$(INTDIR)\wce\time.obj"
- -@erase "$(INTDIR)\wce\timeb.obj"
- -@erase "$(INTDIR)\wce\utime.obj"
- -@erase "$(INTDIR)\wce\wince.obj"
- -@erase "$(INTDIR)\wce\winsock2.obj"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
- if not exist "$(OUTDIR)/wce" mkdir "$(OUTDIR)/wce"
- if not exist ".\parse.c" byacc ../parse.y
- if not exist ".\parse.c" sed -e "s!^extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > ".\parse.c"
- if exist "y.tab.c" @del y.tab.c
-
-RSC=rc.exe
-CPP=shcl.exe
-CPP_PROJ=/nologo /W1 /I ".." /I "..\missing" /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "MSWINCE_RUBY17_EXPORTS" /D BUFSIZ=512 /D FILENAME_MAX=260 /D TLS_OUT_OF_INDEXES=0xFFFFFFFF /Fp"$(INTDIR)\mswince_ruby17.pch" /YX /Fo"$(INTDIR)\\" /Oxs /M$(CECrtMT) /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\mswince_ruby17.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=commctrl.lib coredll.lib winsock.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /incremental:no /pdb:"$(OUTDIR)\mswince_ruby17.pdb" /nodefaultlib:"$(CENoDefaultLib)" /def:".\mswince-ruby17.def" /out:"$(OUTDIR)\mswince_ruby17.dll" /implib:"$(OUTDIR)\mswince_ruby17.lib" /subsystem:$(CESubsystem) /MACHINE:SH3
-DEF_FILE= \
- ".\mswince-ruby17.def"
-LINK32_OBJS= \
- "$(INTDIR)\array.obj" \
- "$(INTDIR)\bignum.obj" \
- "$(INTDIR)\class.obj" \
- "$(INTDIR)\compar.obj" \
- "$(INTDIR)\dir.obj" \
- "$(INTDIR)\dln.obj" \
- "$(INTDIR)\dmyext.obj" \
- "$(INTDIR)\enum.obj" \
- "$(INTDIR)\error.obj" \
- "$(INTDIR)\eval.obj" \
- "$(INTDIR)\file.obj" \
- "$(INTDIR)\gc.obj" \
- "$(INTDIR)\hash.obj" \
- "$(INTDIR)\inits.obj" \
- "$(INTDIR)\io.obj" \
- "$(INTDIR)\marshal.obj" \
- "$(INTDIR)\math.obj" \
- "$(INTDIR)\numeric.obj" \
- "$(INTDIR)\object.obj" \
- "$(INTDIR)\pack.obj" \
- "$(INTDIR)\prec.obj" \
- "$(INTDIR)\process.obj" \
- "$(INTDIR)\random.obj" \
- "$(INTDIR)\range.obj" \
- "$(INTDIR)\re.obj" \
- "$(INTDIR)\regex.obj" \
- "$(INTDIR)\ruby.obj" \
- "$(INTDIR)\signal.obj" \
- "$(INTDIR)\sprintf.obj" \
- "$(INTDIR)\st.obj" \
- "$(INTDIR)\string.obj" \
- "$(INTDIR)\struct.obj" \
- "$(INTDIR)\time.obj" \
- "$(INTDIR)\util.obj" \
- "$(INTDIR)\variable.obj" \
- "$(INTDIR)\version.obj" \
- "$(INTDIR)\win32.obj" \
- "$(INTDIR)\acosh.obj" \
- "$(INTDIR)\crypt.obj" \
- "$(INTDIR)\hypot.obj" \
- "$(INTDIR)\isinf.obj" \
- "$(INTDIR)\isnan.obj" \
- "$(INTDIR)\strftime.obj" \
- "$(INTDIR)\wce\direct.obj" \
- "$(INTDIR)\wce\errno.obj" \
- "$(INTDIR)\wce\io.obj" \
- "$(INTDIR)\wce\process.obj" \
- "$(INTDIR)\wce\signal.obj" \
- "$(INTDIR)\wce\stat.obj" \
- "$(INTDIR)\wce\stdio.obj" \
- "$(INTDIR)\wce\stdlib.obj" \
- "$(INTDIR)\wce\string.obj" \
- "$(INTDIR)\wce\time.obj" \
- "$(INTDIR)\wce\timeb.obj" \
- "$(INTDIR)\wce\utime.obj" \
- "$(INTDIR)\wce\wince.obj" \
- "$(INTDIR)\wce\winsock2.obj" \
- "$(INTDIR)\wce\parse.obj"
-
-"$(OUTDIR)\mswince_ruby17.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "ARM"
-
-OUTDIR=.\ARMRel
-INTDIR=.\ARMRel
-# Begin Custom Macros
-OutDir=.\ARMRel
-# End Custom Macros
-
-ALL : "$(OUTDIR)\mswince_ruby17.dll"
-
-
-CLEAN :
- -@erase "$(INTDIR)\acosh.obj"
- -@erase "$(INTDIR)\array.obj"
- -@erase "$(INTDIR)\bignum.obj"
- -@erase "$(INTDIR)\class.obj"
- -@erase "$(INTDIR)\compar.obj"
- -@erase "$(INTDIR)\crypt.obj"
- -@erase "$(INTDIR)\dir.obj"
- -@erase "$(INTDIR)\dln.obj"
- -@erase "$(INTDIR)\dmyext.obj"
- -@erase "$(INTDIR)\enum.obj"
- -@erase "$(INTDIR)\error.obj"
- -@erase "$(INTDIR)\eval.obj"
- -@erase "$(INTDIR)\file.obj"
- -@erase "$(INTDIR)\gc.obj"
- -@erase "$(INTDIR)\hash.obj"
- -@erase "$(INTDIR)\hypot.obj"
- -@erase "$(INTDIR)\inits.obj"
- -@erase "$(INTDIR)\io.obj"
- -@erase "$(INTDIR)\isinf.obj"
- -@erase "$(INTDIR)\isnan.obj"
- -@erase "$(INTDIR)\marshal.obj"
- -@erase "$(INTDIR)\math.obj"
- -@erase "$(INTDIR)\numeric.obj"
- -@erase "$(INTDIR)\object.obj"
- -@erase "$(INTDIR)\pack.obj"
- -@erase "$(INTDIR)\prec.obj"
- -@erase "$(INTDIR)\process.obj"
- -@erase "$(INTDIR)\random.obj"
- -@erase "$(INTDIR)\range.obj"
- -@erase "$(INTDIR)\re.obj"
- -@erase "$(INTDIR)\regex.obj"
- -@erase "$(INTDIR)\ruby.obj"
- -@erase "$(INTDIR)\signal.obj"
- -@erase "$(INTDIR)\sprintf.obj"
- -@erase "$(INTDIR)\st.obj"
- -@erase "$(INTDIR)\strftime.obj"
- -@erase "$(INTDIR)\string.obj"
- -@erase "$(INTDIR)\struct.obj"
- -@erase "$(INTDIR)\time.obj"
- -@erase "$(INTDIR)\util.obj"
- -@erase "$(INTDIR)\variable.obj"
- -@erase "$(INTDIR)\version.obj"
- -@erase "$(INTDIR)\win32.obj"
- -@erase "$(OUTDIR)\mswince_ruby17.dll"
- -@erase "$(OUTDIR)\mswince_ruby17.exp"
- -@erase "$(OUTDIR)\mswince_ruby17.lib"
- -@erase "$(INTDIR)\wce\direct.obj"
- -@erase "$(INTDIR)\wce\errno.obj"
- -@erase "$(INTDIR)\wce\io.obj"
- -@erase "$(INTDIR)\wce\parse.obj"
- -@erase "$(INTDIR)\wce\process.obj"
- -@erase "$(INTDIR)\wce\signal.obj"
- -@erase "$(INTDIR)\wce\stat.obj"
- -@erase "$(INTDIR)\wce\stdio.obj"
- -@erase "$(INTDIR)\wce\stdlib.obj"
- -@erase "$(INTDIR)\wce\string.obj"
- -@erase "$(INTDIR)\wce\time.obj"
- -@erase "$(INTDIR)\wce\timeb.obj"
- -@erase "$(INTDIR)\wce\utime.obj"
- -@erase "$(INTDIR)\wce\wince.obj"
- -@erase "$(INTDIR)\wce\winsock2.obj"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
- if not exist "$(OUTDIR)/wce" mkdir "$(OUTDIR)/wce"
- if not exist ".\parse.c" byacc ../parse.y
- if not exist ".\parse.c" sed -e "s!^extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > ".\parse.c"
- if exist "y.tab.c" @del y.tab.c
-
-RSC=rc.exe
-CPP=clarm.exe
-CPP_PROJ=/nologo /W1 /I ".." /I "..\missing" /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "MSWINCE_RUBY17_EXPORTS" /D BUFSIZ=512 /D FILENAME_MAX=260 /D TLS_OUT_OF_INDEXES=0xFFFFFFFF /Fp"$(INTDIR)\mswince_ruby17.pch" /YX /Fo"$(INTDIR)\\" /Oxs /M$(CECrtMT) /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\mswince_ruby17.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=commctrl.lib coredll.lib winsock.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /incremental:no /pdb:"$(OUTDIR)\mswince_ruby17.pdb" /nodefaultlib:"$(CENoDefaultLib)" /def:".\mswince-ruby17.def" /out:"$(OUTDIR)\mswince_ruby17.dll" /implib:"$(OUTDIR)\mswince_ruby17.lib" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
-DEF_FILE= \
- ".\mswince-ruby17.def"
-LINK32_OBJS= \
- "$(INTDIR)\array.obj" \
- "$(INTDIR)\bignum.obj" \
- "$(INTDIR)\class.obj" \
- "$(INTDIR)\compar.obj" \
- "$(INTDIR)\dir.obj" \
- "$(INTDIR)\dln.obj" \
- "$(INTDIR)\dmyext.obj" \
- "$(INTDIR)\enum.obj" \
- "$(INTDIR)\error.obj" \
- "$(INTDIR)\eval.obj" \
- "$(INTDIR)\file.obj" \
- "$(INTDIR)\gc.obj" \
- "$(INTDIR)\hash.obj" \
- "$(INTDIR)\inits.obj" \
- "$(INTDIR)\io.obj" \
- "$(INTDIR)\marshal.obj" \
- "$(INTDIR)\math.obj" \
- "$(INTDIR)\numeric.obj" \
- "$(INTDIR)\object.obj" \
- "$(INTDIR)\pack.obj" \
- "$(INTDIR)\prec.obj" \
- "$(INTDIR)\process.obj" \
- "$(INTDIR)\random.obj" \
- "$(INTDIR)\range.obj" \
- "$(INTDIR)\re.obj" \
- "$(INTDIR)\regex.obj" \
- "$(INTDIR)\ruby.obj" \
- "$(INTDIR)\signal.obj" \
- "$(INTDIR)\sprintf.obj" \
- "$(INTDIR)\st.obj" \
- "$(INTDIR)\string.obj" \
- "$(INTDIR)\struct.obj" \
- "$(INTDIR)\time.obj" \
- "$(INTDIR)\util.obj" \
- "$(INTDIR)\variable.obj" \
- "$(INTDIR)\version.obj" \
- "$(INTDIR)\win32.obj" \
- "$(INTDIR)\acosh.obj" \
- "$(INTDIR)\crypt.obj" \
- "$(INTDIR)\hypot.obj" \
- "$(INTDIR)\isinf.obj" \
- "$(INTDIR)\isnan.obj" \
- "$(INTDIR)\strftime.obj" \
- "$(INTDIR)\wce\direct.obj" \
- "$(INTDIR)\wce\errno.obj" \
- "$(INTDIR)\wce\io.obj" \
- "$(INTDIR)\wce\process.obj" \
- "$(INTDIR)\wce\signal.obj" \
- "$(INTDIR)\wce\stat.obj" \
- "$(INTDIR)\wce\stdio.obj" \
- "$(INTDIR)\wce\stdlib.obj" \
- "$(INTDIR)\wce\string.obj" \
- "$(INTDIR)\wce\time.obj" \
- "$(INTDIR)\wce\timeb.obj" \
- "$(INTDIR)\wce\utime.obj" \
- "$(INTDIR)\wce\wince.obj" \
- "$(INTDIR)\wce\winsock2.obj" \
- "$(INTDIR)\wce\parse.obj"
-
-"$(OUTDIR)\mswince_ruby17.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-
-
-..\array.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\bignum.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\class.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\node.h"\
- "..\ruby.h"\
- "..\rubysig.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\compar.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\dir.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\dir.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\dln.c : \
- "..\defines.h"\
- "..\dln.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\missing\file.h"\
- "..\ruby.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\enum.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\node.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\error.c : \
- "..\defines.h"\
- "..\env.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\eval.c : \
- "..\defines.h"\
- "..\dln.h"\
- "..\env.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\node.h"\
- "..\ruby.h"\
- "..\rubysig.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\file.c : \
- "..\defines.h"\
- "..\dln.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\missing\file.h"\
- "..\ruby.h"\
- "..\rubyio.h"\
- "..\rubysig.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\gc.c : \
- "..\defines.h"\
- "..\env.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\node.h"\
- "..\re.h"\
- "..\regex.h"\
- "..\ruby.h"\
- "..\rubysig.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\hash.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\rubysig.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\inits.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\io.c : \
- "..\defines.h"\
- "..\env.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\rubyio.h"\
- "..\rubysig.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\marshal.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\rubyio.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\math.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\numeric.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\object.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\pack.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\prec.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\process.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\rubysig.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\random.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\range.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\re.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\re.h"\
- "..\regex.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\regex.c : \
- "..\defines.h"\
- "..\regex.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\ruby.c : \
- "..\defines.h"\
- "..\dln.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\node.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\signal.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\rubysig.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\sprintf.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\st.c : \
- "..\st.h"\
- ".\config.h"\
-
-..\string.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\re.h"\
- "..\regex.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\struct.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\time.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\util.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\missing\file.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\variable.c : \
- "..\defines.h"\
- "..\env.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\node.h"\
- "..\ruby.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\version.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-..\win32\win32.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\rubysig.h"\
- "..\vms\vms.h"\
- "..\win32\dir.h"\
- "..\win32\win32.h"\
- ".\config.h"\
- ".\wince.h"\
-
-..\missing\isinf.c : \
- ".\config.h"\
-
-..\missing\strftime.c : \
- ".\config.h"\
-
-.\direct.c : \
- ".\wince.h"\
-
-.\io.c : \
- ".\wince.h"\
-
-.\sys\stat.c : \
- ".\wince.h"\
-
-.\stdio.c : \
- ".\wince.h"\
-
-.\sys\utime.c : \
- ".\wince.h"\
-
-.\wince.c : \
- ".\wince.h"\
-
-.\winsock2.c : \
- ".\wince.h"\
-
-..\ruby\wince\parse.c : \
- "..\defines.h"\
- "..\env.h"\
- "..\intern.h"\
- "..\lex.c"\
- "..\missing.h"\
- "..\node.h"\
- "..\regex.h"\
- "..\ruby.h"\
- "..\st.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
- ".\config.h"\
-
-
-
-SOURCE=..\array.c
-
-"$(INTDIR)\array.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\bignum.c
-
-"$(INTDIR)\bignum.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\class.c
-
-"$(INTDIR)\class.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\compar.c
-
-"$(INTDIR)\compar.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\dir.c
-
-"$(INTDIR)\dir.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\dln.c
-
-"$(INTDIR)\dln.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\dmyext.c
-
-"$(INTDIR)\dmyext.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\enum.c
-
-"$(INTDIR)\enum.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\error.c
-
-"$(INTDIR)\error.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\eval.c
-
-"$(INTDIR)\eval.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\file.c
-
-"$(INTDIR)\file.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\gc.c
-
-"$(INTDIR)\gc.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\hash.c
-
-"$(INTDIR)\hash.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\inits.c
-
-"$(INTDIR)\inits.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\io.c
-
-"$(INTDIR)\io.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\marshal.c
-
-"$(INTDIR)\marshal.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\math.c
-
-"$(INTDIR)\math.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\numeric.c
-
-"$(INTDIR)\numeric.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\object.c
-
-"$(INTDIR)\object.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\pack.c
-
-"$(INTDIR)\pack.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\prec.c
-
-"$(INTDIR)\prec.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\process.c
-
-"$(INTDIR)\process.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\random.c
-
-"$(INTDIR)\random.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\range.c
-
-"$(INTDIR)\range.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\re.c
-
-"$(INTDIR)\re.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\regex.c
-
-"$(INTDIR)\regex.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\ruby.c
-
-"$(INTDIR)\ruby.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\signal.c
-
-"$(INTDIR)\signal.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\sprintf.c
-
-"$(INTDIR)\sprintf.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\st.c
-
-"$(INTDIR)\st.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\string.c
-
-"$(INTDIR)\string.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\struct.c
-
-"$(INTDIR)\struct.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\time.c
-
-"$(INTDIR)\time.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\util.c
-
-"$(INTDIR)\util.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\variable.c
-
-"$(INTDIR)\variable.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\version.c
-
-"$(INTDIR)\version.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\win32\win32.c
-
-"$(INTDIR)\win32.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\missing\acosh.c
-
-"$(INTDIR)\acosh.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\missing\crypt.c
-
-"$(INTDIR)\crypt.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\missing\hypot.c
-
-"$(INTDIR)\hypot.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\missing\isinf.c
-
-"$(INTDIR)\isinf.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\missing\isnan.c
-
-"$(INTDIR)\isnan.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=..\missing\strftime.c
-
-"$(INTDIR)\strftime.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!IF "$(CFG)" == "MIPS"
-
-CPP_PROJ=/nologo /W1 /I ".." /I "..\missing" /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "MSWINCE_RUBY17_EXPORTS" /D BUFSIZ=512 /D FILENAME_MAX=260 /D TLS_OUT_OF_INDEXES=0xFFFFFFFF /Fp"$(INTDIR)\mswince_ruby17.pch" /YX /Fo"$(INTDIR)\wce\\" /Oxs /M$(CECrtMT) /c
-
-!ELSEIF "$(CFG)" == "SH4"
-
-CPP_PROJ=/nologo /W1 /I ".." /I "..\missing" /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "MSWINCE_RUBY17_EXPORTS" /D BUFSIZ=512 /D FILENAME_MAX=260 /D TLS_OUT_OF_INDEXES=0xFFFFFFFF /Fp"$(INTDIR)\mswince_ruby17.pch" /YX /Fo"$(INTDIR)\wce\\" /Qsh4 /Oxs /M$(CECrtMT) /c
-
-!ELSEIF "$(CFG)" == "SH3"
-
-CPP_PROJ=/nologo /W1 /I ".." /I "..\missing" /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "MSWINCE_RUBY17_EXPORTS" /D BUFSIZ=512 /D FILENAME_MAX=260 /D TLS_OUT_OF_INDEXES=0xFFFFFFFF /Fp"$(INTDIR)\mswince_ruby17.pch" /YX /Fo"$(INTDIR)\wce\\" /Oxs /M$(CECrtMT) /c
-
-!ELSEIF "$(CFG)" == "ARM"
-
-CPP_PROJ=/nologo /W1 /I ".." /I "..\missing" /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "MSWINCE_RUBY17_EXPORTS" /D BUFSIZ=512 /D FILENAME_MAX=260 /D TLS_OUT_OF_INDEXES=0xFFFFFFFF /Fp"$(INTDIR)\mswince_ruby17.pch" /YX /Fo"$(INTDIR)\wce\\" /Oxs /M$(CECrtMT) /c
-
-!ENDIF
-
-SOURCE=.\direct.c
-
-"$(INTDIR)\wce\direct.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\errno.c
-
-"$(INTDIR)\wce\errno.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\io.c
-
-"$(INTDIR)\wce\io.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\process.c
-
-"$(INTDIR)\wce\process.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\signal.c
-
-"$(INTDIR)\wce\signal.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\sys\stat.c
-
-"$(INTDIR)\wce\stat.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\stdio.c
-
-"$(INTDIR)\wce\stdio.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\stdlib.c
-
-"$(INTDIR)\wce\stdlib.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\string.c
-
-"$(INTDIR)\wce\string.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\time.c
-
-"$(INTDIR)\wce\time.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\sys\timeb.c
-
-"$(INTDIR)\wce\timeb.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\sys\utime.c
-
-"$(INTDIR)\wce\utime.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\wince.c
-
-"$(INTDIR)\wce\wince.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\winsock2.c
-
-"$(INTDIR)\wce\winsock2.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\parse.c
-
-"$(INTDIR)\wce\parse.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
diff --git a/wince/exe.mak b/wince/exe.mak
deleted file mode 100644
index c39c0f7bc6..0000000000
--- a/wince/exe.mak
+++ /dev/null
@@ -1,353 +0,0 @@
-
-!IF "$(CFG)" == ""
-CFG=MIPS
-!MESSAGE CFG not specified. use MIPS.
-!ENDIF
-
-!IF "$(CESubsystem)" == ""
-#CESubsystem=windowsce,2.0
-CESubsystem=windowsce,3.0
-#!MESSAGE CESubsystem not specified. use windowsce,2.11.
-!MESSAGE CESubsystem not specified. use windowsce,3.0.
-!ENDIF
-
-!IF "$(CEVersion)" == ""
-#CEVersion=200
-CEVersion=300
-#!MESSAGE CEVersion not specified. use 211.
-!MESSAGE CEVersion not specified. use 300.
-!ENDIF
-
-!IF $(CEVersion) < 201
-CECrt=L
-CECrtDebug=Ld
-CECrtMT=T
-CECrtMTDebug=Td
-CENoDefaultLib=corelibc.lib
-CEx86Corelibc=
-!ELSE
-CECrt=C
-CECrtDebug=C
-CECrtMT=C
-CECrtMTDebug=C
-CENoDefaultLib=libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib
-CEx86Corelibc=corelibc.lib
-!ENDIF
-
-!IF "$(CE_PLATFORM)"==""
-CePlatform=WIN32_PLATFORM_UNKNOWN
-!ELSE
-CePlatform=$(CE_PLATFORM)
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-!IF "$(CFG)" == "MIPS"
-
-OUTDIR=.\MIPSRel
-INTDIR=.\MIPSRel
-# Begin Custom Macros
-OutDir=.\MIPSRel
-# End Custom Macros
-
-ALL : "$(OUTDIR)\ruby.exe"
-
-
-CLEAN :
- -@erase "$(INTDIR)\main.obj"
- -@erase "$(INTDIR)\wincemain.obj"
- -@erase "$(OUTDIR)\ruby.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-RSC=rc.exe
-CPP=clmips.exe
-CPP_PROJ=/nologo /W3 /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Fp"$(INTDIR)\ruby.pch" /YX /Fo"$(INTDIR)\\" /Oxs /M$(CECrtMT) /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\ruby.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=commctrl.lib coredll.lib mswince_ruby17.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /incremental:no /pdb:"$(OUTDIR)\ruby.pdb" /nodefaultlib:"$(CENoDefaultLib)" /out:"$(OUTDIR)\ruby.exe" /libpath:"$(OUTDIR)" /subsystem:$(CESubsystem) /MACHINE:MIPS
-LINK32_OBJS= \
- "$(INTDIR)\main.obj" \
- "$(INTDIR)\wincemain.obj"
-
-"$(OUTDIR)\ruby.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "SH4"
-
-OUTDIR=.\SH4Rel
-INTDIR=.\SH4Rel
-# Begin Custom Macros
-OutDir=.\SH4Rel
-# End Custom Macros
-
-ALL : "$(OUTDIR)\ruby.exe"
-
-
-CLEAN :
- -@erase "$(INTDIR)\main.obj"
- -@erase "$(INTDIR)\wincemain.obj"
- -@erase "$(OUTDIR)\ruby.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-RSC=rc.exe
-CPP=shcl.exe
-CPP_PROJ=/nologo /W3 /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Fp"$(INTDIR)\ruby.pch" /YX /Fo"$(INTDIR)\\" /Qsh4 /Oxs /M$(CECrtMT) /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\ruby.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=commctrl.lib coredll.lib mswince_ruby17.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /incremental:no /pdb:"$(OUTDIR)\ruby.pdb" /nodefaultlib:"$(CENoDefaultLib)" /out:"$(OUTDIR)\ruby.exe" /libpath:"$(OUTDIR)" /subsystem:$(CESubsystem) /MACHINE:SH4
-LINK32_OBJS= \
- "$(INTDIR)\main.obj" \
- "$(INTDIR)\wincemain.obj"
-
-"$(OUTDIR)\ruby.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "SH3"
-
-OUTDIR=.\SH3Rel
-INTDIR=.\SH3Rel
-# Begin Custom Macros
-OutDir=.\SH3Rel
-# End Custom Macros
-
-ALL : "$(OUTDIR)\ruby.exe"
-
-
-CLEAN :
- -@erase "$(INTDIR)\main.obj"
- -@erase "$(INTDIR)\wincemain.obj"
- -@erase "$(OUTDIR)\ruby.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-RSC=rc.exe
-CPP=shcl.exe
-CPP_PROJ=/nologo /W3 /I "." /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Fp"$(INTDIR)\ruby.pch" /YX /Fo"$(INTDIR)\\" /Oxs /M$(CECrtMT) /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\ruby.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=commctrl.lib coredll.lib mswince_ruby17.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /incremental:no /pdb:"$(OUTDIR)\ruby.pdb" /nodefaultlib:"$(CENoDefaultLib)" /out:"$(OUTDIR)\ruby.exe" /libpath:"$(OUTDIR)" /subsystem:$(CESubsystem) /MACHINE:SH3
-LINK32_OBJS= \
- "$(INTDIR)\main.obj" \
- "$(INTDIR)\wincemain.obj"
-
-"$(OUTDIR)\ruby.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == ARM"
-
-OUTDIR=.\ARMRel
-INTDIR=.\ARMRel
-# Begin Custom Macros
-OutDir=.\ARMRel
-# End Custom Macros
-
-ALL : "$(OUTDIR)\ruby.exe"
-
-
-CLEAN :
- -@erase "$(INTDIR)\main.obj"
- -@erase "$(INTDIR)\wincemain.obj"
- -@erase "$(OUTDIR)\ruby.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-RSC=rc.exe
-CPP=clarm.exe
-CPP_PROJ=/nologo /W3 /I "C:\_develops\eMVT\ruby17\ruby\wince" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Fp"$(INTDIR)\ruby.pch" /YX /Fo"$(INTDIR)\\" /Oxs /M$(CECrtMT) /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\ruby.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=commctrl.lib coredll.lib mswince_ruby17.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /incremental:no /pdb:"$(OUTDIR)\ruby.pdb" /nodefaultlib:"$(CENoDefaultLib)" /out:"$(OUTDIR)\ruby.exe" /libpath:"$(OUTDIR)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
-LINK32_OBJS= \
- "$(INTDIR)\main.obj" \
- "$(INTDIR)\wincemain.obj"
-
-"$(OUTDIR)\ruby.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-
-..\main.c : \
- "..\defines.h"\
- "..\intern.h"\
- "..\missing.h"\
- "..\ruby.h"\
- "..\vms\vms.h"\
- "..\win32\win32.h"\
-
-.\wincemain.c : \
- ".\wince.h"\
-
-
-SOURCE=..\main.c
-
-"$(INTDIR)\main.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-SOURCE=.\wincemain.c
-
-"$(INTDIR)\wincemain.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
diff --git a/wince/io.h b/wince/io.h
index 5f80599bda..eb355a4916 100644
--- a/wince/io.h
+++ b/wince/io.h
@@ -1,6 +1,11 @@
-#ifndef _IO_H_
-#define _IO_H_
+#ifndef _IO_WINCE_H_
+#define _IO_WINCE_H_
+
+#ifndef _TIME_T_DEFINED
+typedef unsigned long time_t;
+#define _TIME_T_DEFINED
+#endif
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */
@@ -29,15 +34,15 @@ int _rename (const char *oldname, const char *newname);
int _unlink(const char *file);
int _umask(int cmask);
int _chmod(const char *path, int mode);
-int _dup( int handle );
-int dup2( int handle1, int handle2 );
+int dup( int handle );
+//int dup2( int handle1, int handle2 );
int _isatty(int fd);
int _pipe(int *phandles, unsigned int psize, int textmode);
int _access(const char *filename, int flags);
int _open_osfhandle ( long osfhandle, int flags);
long _get_osfhandle( int filehandle );
int _open(const char *file, int mode,...);
-int _close(int fd);
+int close(int fd);
int _read(int fd, void *buffer, int length);
int _write(int fd, const void *buffer, unsigned count);
long _lseek(int handle, long offset, int origin);
@@ -58,12 +63,14 @@ int _findclose( long handle );
#define read _read
#define write _write
#define umask _umask
-#define dup _dup
+//#define dup _dup
#define isatty _isatty
#define access _access
#define pipe _pipe
#define setmode _setmode
#define lseek _lseek
+#define _close close
+
#endif
diff --git a/wince/io.c b/wince/io_wce.c
index 4d2f21d604..613934aa66 100644
--- a/wince/io.c
+++ b/wince/io_wce.c
@@ -77,7 +77,7 @@ int _open(const char *file, int mode, va_list arg)
return (int)h;
}
-int _close(int fd)
+int close(int fd)
{
CloseHandle( (HANDLE)fd );
return 0;
@@ -185,18 +185,18 @@ int _chmod(const char *path, int mode)
/* WinCE doesn't have dup and dup2. */
/* so, we cannot use missing/dup2.c. */
-int _dup( int handle )
+int dup( int handle )
{
errno = EBADF;
return -1;
}
-
+/*
int dup2( int handle1, int handle2 )
{
errno = EBADF;
return -1;
}
-
+*/
int _isatty(int fd)
{
if( fd==(int)_fileno(stdin) ||
diff --git a/wince/mkexports.rb b/wince/mkexports.rb
new file mode 100644
index 0000000000..4e06eff625
--- /dev/null
+++ b/wince/mkexports.rb
@@ -0,0 +1,35 @@
+#!./miniruby -s
+
+SYM = {}
+
+objs = ARGV.collect {|s| p s+'\n'; s.tr('/', '\\') }
+IO.foreach("|dumpbin -symbols " + objs.join(' ')) do |l|
+ next if /^[0-9A-F]+ 0+ UNDEF / =~ l
+ next unless l.sub!(/.*\sExternal\s+\|\s+/, '')
+ if ARGV[1]=="sh3"
+ if l.sub!(/^_/, '') # _ ‚ÅŽn‚Ü‚é‚È‚çtrue
+ next if /@.*@/ =~ l || /@[0-9a-f]{16}$/ =~ l # ‚©‚ÂA@ ‚Æ‚©¬‚¶‚Á‚½‚ç next
+ elsif !l.sub!(/^(\S+) \([^@?\`\']*\)$/, '\1') # _ ‚Å‚Í‚¶‚Ü‚Á‚Ä‚¢‚È‚­‚ÄA@ ‚Æ‚©¬‚¶‚Á‚Ä‚¢‚½‚çnext
+ next
+ end
+ else
+ next if /@.*@/ =~ l || /@[0-9a-f]{16}$/ =~ l # ‚©‚ÂA@ ‚Æ‚©¬‚¶‚Á‚½‚ç next
+ end
+ SYM[l.strip] = true
+end
+
+
+exports = []
+if $name
+ exports << "Name " + $name
+elsif $library
+ exports << "Library " + $library
+end
+exports << "Description " + $description.dump if $description
+exports << "EXPORTS" << SYM.keys.sort
+
+if $output
+ open($output, 'w') {|f| f.puts exports.join("\n")}
+else
+ puts exports.join("\n")
+end
diff --git a/wince/mswince-ruby17.def b/wince/mswince-ruby17.def
deleted file mode 100644
index a5473496b1..0000000000
--- a/wince/mswince-ruby17.def
+++ /dev/null
@@ -1,813 +0,0 @@
-EXPORTS
-ChildRecord
-GetCurrentThreadHandle
-Init_Array
-Init_Bignum
-Init_Comparable
-Init_Dir
-Init_Enumerable
-Init_Exception
-Init_File
-Init_GC
-Init_Hash
-Init_IO
-Init_Math
-Init_Numeric
-Init_Object
-Init_Precision
-Init_Proc
-Init_Random
-Init_Range
-Init_Regexp
-Init_String
-Init_Struct
-Init_Thread
-Init_Time
-Init_eval
-Init_ext
-Init_heap
-Init_load
-Init_marshal
-Init_pack
-Init_process
-Init_signal
-Init_stack
-Init_sym
-Init_var_tables
-Init_version
-NTLoginName
-NtCmdGlob
-NtCmdHead
-NtCmdTail
-NtFreeCmdLine
-NtInitialize
-NtMakeCmdVector
-NtSyncProcess
-SafeFree
-acosh
-asinh
-atanh
-chown
-crypt
-definekey
-dln_find_exe
-dln_find_file
-dln_load
-do_spawn
-eaccess
-encrypt
-endhostent
-endnetent
-endprotoent
-endservent
-flock
-getegid
-geteuid
-getgid
-getlogin
-getnetbyaddr
-getnetbyname
-getnetent
-getprotoent
-getservent
-gettimeofday
-getuid
-ioctl
-isInternalCmd
-isinf
-isnan
-kill
-link
-pipe_exec
-rb_Array
-rb_Float
-rb_Integer
-rb_String
-rb_add_method
-rb_alias
-rb_alias_variable
-rb_any_to_s
-rb_apply
-rb_argv
-rb_argv0
-rb_ary_aref
-rb_ary_assoc
-rb_ary_clear
-rb_ary_cmp
-rb_ary_concat
-rb_ary_delete
-rb_ary_delete_at
-rb_ary_dup
-rb_ary_each
-rb_ary_entry
-rb_ary_freeze
-rb_ary_includes
-rb_ary_join
-rb_ary_new
-rb_ary_new2
-rb_ary_new3
-rb_ary_new4
-rb_ary_plus
-rb_ary_pop
-rb_ary_push
-rb_ary_rassoc
-rb_ary_reverse
-rb_ary_shift
-rb_ary_sort
-rb_ary_sort_bang
-rb_ary_store
-rb_ary_to_ary
-rb_ary_to_s
-rb_ary_unshift
-rb_assoc_new
-rb_attr
-rb_autoload
-rb_autoload_defined
-rb_autoload_load
-rb_backref_get
-rb_backref_set
-rb_backtrace
-rb_big2dbl
-rb_big2ll
-rb_big2long
-rb_big2str
-rb_big2ull
-rb_big2ulong
-rb_big_2comp
-rb_big_and
-rb_big_clone
-rb_big_divmod
-rb_big_lshift
-rb_big_minus
-rb_big_mul
-rb_big_norm
-rb_big_or
-rb_big_plus
-rb_big_pow
-rb_big_rand
-rb_big_xor
-rb_block_given_p
-rb_bug
-rb_cArray
-rb_cBignum
-rb_cClass
-rb_cData
-rb_cDir
-rb_cFalseClass
-rb_cFile
-rb_cFixnum
-rb_cFloat
-rb_cHash
-rb_cIO
-rb_cInteger
-rb_cModule
-rb_cNilClass
-rb_cNumeric
-rb_cObject
-rb_cProc
-rb_cRange
-rb_cRegexp
-rb_cString
-rb_cStruct
-rb_cSymbol
-rb_cThread
-rb_cTime
-rb_cTrueClass
-rb_call_inits
-rb_call_super
-rb_catch
-rb_check_convert_type
-rb_check_frozen
-rb_check_safe_str
-rb_check_type
-rb_class2name
-rb_class_boot
-rb_class_inherited
-rb_class_instance_methods
-rb_class_new
-rb_class_new_instance
-rb_class_path
-rb_class_private_instance_methods
-rb_class_protected_instance_methods
-rb_class_public_instance_methods
-rb_class_real
-rb_class_tbl
-rb_clear_cache
-rb_cmpint
-rb_compile_cstr
-rb_compile_error
-rb_compile_error_append
-rb_compile_file
-rb_compile_string
-rb_const_assign
-rb_const_defined
-rb_const_defined_at
-rb_const_get
-rb_const_get_at
-rb_const_list
-rb_const_set
-rb_convert_type
-rb_copy_generic_ivar
-rb_cstr2inum
-rb_cstr_to_dbl
-rb_cstr_to_inum
-rb_cv_get
-rb_cv_set
-rb_cvar_defined
-rb_cvar_get
-rb_cvar_set
-rb_data_object_alloc
-rb_dbl2big
-rb_dbl_cmp
-rb_default_rs
-rb_define_alias
-rb_define_attr
-rb_define_class
-rb_define_class_id
-rb_define_class_under
-rb_define_class_variable
-rb_define_const
-rb_define_global_const
-rb_define_global_function
-rb_define_hooked_variable
-rb_define_method
-rb_define_method_id
-rb_define_module
-rb_define_module_function
-rb_define_module_id
-rb_define_module_under
-rb_define_private_method
-rb_define_protected_method
-rb_define_readonly_variable
-rb_define_singleton_method
-rb_define_variable
-rb_define_virtual_variable
-rb_defout
-rb_disable_super
-rb_dvar_curr
-rb_dvar_defined
-rb_dvar_push
-rb_dvar_ref
-rb_eArgError
-rb_eEOFError
-rb_eException
-rb_eFatal
-rb_eFloatDomainError
-rb_eIOError
-rb_eIndexError
-rb_eInterrupt
-rb_eLoadError
-rb_eNameError
-rb_eNoMemError
-rb_eNoMethodError
-rb_eNotImpError
-rb_eRangeError
-rb_eRuntimeError
-rb_eScriptError
-rb_eSecurityError
-rb_eSignal
-rb_eStandardError
-rb_eSyntaxError
-rb_eSystemCallError
-rb_eSystemExit
-rb_eTypeError
-rb_eZeroDivError
-rb_each
-rb_enable_super
-rb_ensure
-rb_env_path_tainted
-rb_eof_error
-rb_eql
-rb_equal
-rb_error_frozen
-rb_eval_cmd
-rb_eval_string
-rb_eval_string_protect
-rb_eval_string_wrap
-rb_exc_fatal
-rb_exc_new
-rb_exc_new2
-rb_exc_new3
-rb_exc_raise
-rb_exec_end_proc
-rb_exit
-rb_extend_object
-rb_f_autoload
-rb_f_exec
-rb_f_global_variables
-rb_f_kill
-rb_f_lambda
-rb_f_require
-rb_f_sprintf
-rb_f_trace_var
-rb_f_untrace_var
-rb_fatal
-rb_fdopen
-rb_file_const
-rb_file_open
-rb_file_s_expand_path
-rb_file_sysopen
-rb_find_file
-rb_find_file_ext
-rb_fix2int
-rb_fix2str
-rb_float_new
-rb_fopen
-rb_frame_last_func
-rb_free_generic_ivar
-rb_frozen_class_p
-rb_fs
-rb_funcall
-rb_funcall2
-rb_funcall3
-rb_gc
-rb_gc_call_finalizer_at_exit
-rb_gc_disable
-rb_gc_enable
-rb_gc_force_recycle
-rb_gc_mark
-rb_gc_mark_frame
-rb_gc_mark_global_tbl
-rb_gc_mark_locations
-rb_gc_mark_maybe
-rb_gc_mark_parser
-rb_gc_mark_threads
-rb_gc_mark_trap_list
-rb_gc_register_address
-rb_gc_stack_start
-rb_gc_start
-rb_gc_unregister_address
-rb_generic_ivar_table
-rb_get_kcode
-rb_getc
-rb_gets
-rb_glob
-rb_global_entry
-rb_global_variable
-rb_globi
-rb_gv_get
-rb_gv_set
-rb_gvar_defined
-rb_gvar_get
-rb_gvar_set
-rb_hash
-rb_hash_aref
-rb_hash_aset
-rb_hash_delete
-rb_hash_delete_if
-rb_hash_freeze
-rb_hash_new
-rb_hash_reject_bang
-rb_hash_select
-rb_id2name
-rb_id_attrset
-rb_include_module
-rb_inspect
-rb_inspecting_p
-rb_int2big
-rb_int2inum
-rb_intern
-rb_interrupt
-rb_invalid_str
-rb_io_addstr
-rb_io_binmode
-rb_io_check_closed
-rb_io_check_readable
-rb_io_check_writable
-rb_io_close
-rb_io_eof
-rb_io_fptr_finalize
-rb_io_fread
-rb_io_getc
-rb_io_gets
-rb_io_mode_flags
-rb_io_print
-rb_io_printf
-rb_io_puts
-rb_io_synchronized
-rb_io_taint_check
-rb_io_unbuffered
-rb_io_ungetc
-rb_io_wait_readable
-rb_io_wait_writable
-rb_io_write
-rb_is_class_id
-rb_is_const_id
-rb_is_instance_id
-rb_is_junk_id
-rb_is_local_id
-rb_iter_break
-rb_iterate
-rb_iterator_p
-rb_iv_get
-rb_iv_set
-rb_ivar_defined
-rb_ivar_get
-rb_ivar_set
-rb_jump_tag
-rb_kcode
-rb_last_status
-rb_lastline_get
-rb_lastline_set
-rb_ll2big
-rb_ll2inum
-rb_load
-rb_load_fail
-rb_load_file
-rb_load_path
-rb_load_protect
-rb_loaderror
-rb_mComparable
-rb_mEnumerable
-rb_mErrno
-rb_mFileTest
-rb_mGC
-rb_mKernel
-rb_mMath
-rb_mPrecision
-rb_mProcess
-rb_make_metaclass
-rb_mark_end_proc
-rb_mark_generic_ivar
-rb_mark_generic_ivar_tbl
-rb_mark_hash
-rb_mark_tbl
-rb_marshal_dump
-rb_marshal_load
-rb_match_busy
-rb_mem_clear
-rb_memcicmp
-rb_memcmp
-rb_memerror
-rb_method_boundp
-rb_mod_ancestors
-rb_mod_class_variables
-rb_mod_clone
-rb_mod_const_at
-rb_mod_const_of
-rb_mod_constants
-rb_mod_dup
-rb_mod_include_p
-rb_mod_included_modules
-rb_mod_module_eval
-rb_mod_name
-rb_mod_remove_const
-rb_mod_remove_cvar
-rb_module_new
-rb_name_class
-rb_name_error
-rb_newobj
-rb_node_newnode
-rb_notimplement
-rb_num2dbl
-rb_num2fix
-rb_num2int
-rb_num2ll
-rb_num2long
-rb_num2ull
-rb_num2ulong
-rb_num_coerce_bin
-rb_num_zerodiv
-rb_obj_alloc
-rb_obj_as_string
-rb_obj_call_init
-rb_obj_class
-rb_obj_clone
-rb_obj_dup
-rb_obj_freeze
-rb_obj_id
-rb_obj_id_obsolete
-rb_obj_instance_eval
-rb_obj_instance_variables
-rb_obj_is_instance_of
-rb_obj_is_kind_of
-rb_obj_remove_instance_variable
-rb_obj_singleton_methods
-rb_obj_taint
-rb_obj_tainted
-rb_obj_type
-rb_obj_untaint
-rb_origenviron
-rb_output_fs
-rb_output_rs
-rb_p
-rb_parser_append_print
-rb_parser_while_loop
-rb_path2class
-rb_path_check
-rb_proc_exec
-rb_proc_new
-rb_proc_times
-rb_progname
-rb_prohibit_interrupt
-rb_protect
-rb_protect_inspect
-rb_provide
-rb_provided
-rb_quad_pack
-rb_quad_unpack
-rb_raise
-rb_range_beg_len
-rb_range_new
-rb_read_check
-rb_read_pending
-rb_reg_adjust_startpos
-rb_reg_last_match
-rb_reg_match
-rb_reg_match2
-rb_reg_match_last
-rb_reg_match_post
-rb_reg_match_pre
-rb_reg_mbclen2
-rb_reg_new
-rb_reg_nth_defined
-rb_reg_nth_match
-rb_reg_options
-rb_reg_quote
-rb_reg_regcomp
-rb_reg_regsub
-rb_reg_search
-rb_remove_method
-rb_require
-rb_rescue
-rb_rescue2
-rb_reserved_word
-rb_respond_to
-rb_rs
-rb_scan_args
-rb_secure
-rb_set_class_path
-rb_set_end_proc
-rb_set_kcode
-rb_set_safe_level
-rb_singleton_class
-rb_singleton_class_attached
-rb_singleton_class_clone
-rb_source_filename
-rb_stderr
-rb_stdin
-rb_stdout
-rb_str2cstr
-rb_str2inum
-rb_str_append
-rb_str_associate
-rb_str_associated
-rb_str_buf_append
-rb_str_buf_cat
-rb_str_buf_cat2
-rb_str_buf_new
-rb_str_buf_new2
-rb_str_cat
-rb_str_cat2
-rb_str_cmp
-rb_str_concat
-rb_str_dump
-rb_str_dup
-rb_str_dup_frozen
-rb_str_freeze
-rb_str_hash
-rb_str_inspect
-rb_str_intern
-rb_str_modify
-rb_str_new
-rb_str_new2
-rb_str_new3
-rb_str_new4
-rb_str_new5
-rb_str_plus
-rb_str_resize
-rb_str_setter
-rb_str_split
-rb_str_substr
-rb_str_times
-rb_str_to_dbl
-rb_str_to_inum
-rb_str_to_str
-rb_str_update
-rb_str_upto
-rb_string_value
-rb_string_value_ptr
-rb_struct_alloc
-rb_struct_aref
-rb_struct_aset
-rb_struct_define
-rb_struct_getmember
-rb_struct_iv_get
-rb_struct_new
-rb_svar
-rb_sym_all_symbols
-rb_sys_fail
-rb_sys_warning
-rb_syswait
-rb_tainted_str_new
-rb_tainted_str_new2
-rb_thread_alone
-rb_thread_atfork
-rb_thread_create
-rb_thread_critical
-rb_thread_current
-rb_thread_fd_close
-rb_thread_fd_writable
-rb_thread_interrupt
-rb_thread_list
-rb_thread_local_aref
-rb_thread_local_aset
-rb_thread_main
-rb_thread_pending
-rb_thread_polling
-rb_thread_run
-rb_thread_schedule
-rb_thread_select
-rb_thread_signal_raise
-rb_thread_sleep
-rb_thread_sleep_forever
-rb_thread_stop
-rb_thread_tick
-rb_thread_trap_eval
-rb_thread_wait_fd
-rb_thread_wait_for
-rb_thread_wakeup
-rb_throw
-rb_time_interval
-rb_time_new
-rb_time_timeval
-rb_to_id
-rb_to_int
-rb_trap_exec
-rb_trap_exit
-rb_trap_immediate
-rb_trap_pending
-rb_trap_restore_mask
-rb_uint2big
-rb_uint2inum
-rb_ull2big
-rb_ull2inum
-rb_undef
-rb_undef_method
-rb_w32_accept
-rb_w32_asynchronize
-rb_w32_bind
-rb_w32_close
-rb_w32_closedir
-rb_w32_connect
-rb_w32_enter_critical
-rb_w32_fclose
-rb_w32_fdclr
-rb_w32_fdisset
-rb_w32_fdset
-rb_w32_free_environ
-rb_w32_get_environ
-rb_w32_get_osfhandle
-rb_w32_getc
-rb_w32_getcwd
-rb_w32_getenv
-rb_w32_gethostbyaddr
-rb_w32_gethostbyname
-rb_w32_gethostname
-rb_w32_getpeername
-rb_w32_getpid
-rb_w32_getprotobyname
-rb_w32_getprotobynumber
-rb_w32_getservbyname
-rb_w32_getservbyport
-rb_w32_getsockname
-rb_w32_getsockopt
-rb_w32_ioctlsocket
-rb_w32_leave_critical
-rb_w32_listen
-rb_w32_main_context
-rb_w32_opendir
-rb_w32_putc
-rb_w32_readdir
-rb_w32_recv
-rb_w32_recvfrom
-rb_w32_rename
-rb_w32_rewinddir
-rb_w32_seekdir
-rb_w32_select
-rb_w32_send
-rb_w32_sendto
-rb_w32_setsockopt
-rb_w32_shutdown
-rb_w32_sleep
-rb_w32_socket
-rb_w32_stat
-rb_w32_strerror
-rb_w32_telldir
-rb_w32_times
-rb_waitpid
-rb_warn
-rb_warning
-rb_with_disable_interrupt
-rb_yield
-re_mbctab
-re_set_syntax
-ruby__end__seen
-ruby_add_suffix
-ruby_class
-ruby_cleanup
-ruby_current_node
-ruby_debug
-ruby_dln_librefs
-ruby_dyna_vars
-ruby_errinfo
-ruby_eval_tree
-ruby_eval_tree_begin
-ruby_exec
-ruby_finalize
-ruby_frame
-ruby_getcwd
-ruby_ignorecase
-ruby_in_compile
-ruby_in_eval
-ruby_incpush
-ruby_init
-ruby_init_loadpath
-ruby_inplace_mode
-ruby_nerrs
-ruby_options
-ruby_parser_stack_on_heap
-ruby_process_options
-ruby_prog_init
-ruby_qsort
-ruby_re_adjust_startpos
-ruby_re_compile_fastmap
-ruby_re_compile_pattern
-ruby_re_copy_registers
-ruby_re_free_pattern
-ruby_re_free_registers
-ruby_re_match
-ruby_re_mbcinit
-ruby_re_search
-ruby_re_set_casetable
-ruby_run
-ruby_safe_level
-ruby_scan_hex
-ruby_scan_oct
-ruby_scope
-ruby_script
-ruby_set_argv
-ruby_set_current_source
-ruby_setenv
-ruby_show_copyright
-ruby_show_version
-ruby_sourcefile
-ruby_sourceline
-ruby_stack_check
-ruby_stack_length
-ruby_stop
-ruby_strdup
-ruby_strtod
-ruby_top_self
-ruby_unsetenv
-ruby_verbose
-ruby_xcalloc
-ruby_xfree
-ruby_xmalloc
-ruby_xrealloc
-ruby_yychar
-ruby_yydebug
-ruby_yylval
-ruby_yyparse
-setgid
-sethostent
-setnetent
-setprotoent
-setservent
-setuid
-st_add_direct
-st_cleanup_safe
-st_copy
-st_delete
-st_delete_safe
-st_foreach
-st_free_table
-st_init_numtable
-st_init_numtable_with_size
-st_init_strtable
-st_init_strtable_with_size
-st_init_table
-st_init_table_with_size
-st_insert
-st_lookup
-wait
-waitpid
-yycheck
-yydefred
-yydgoto
-yyerrflag
-yygindex
-yylen
-yylhs
-yyname
-yynerrs
-yyrindex
-yyrule
-yysindex
-yyss
-yyssp
-yytable
-yyval
-yyvs
-yyvsp
-wce_SetCommandLine
diff --git a/wince/process.h b/wince/process.h
index e4e9a32d1a..2ef72a4ac1 100644
--- a/wince/process.h
+++ b/wince/process.h
@@ -4,11 +4,13 @@
#define _P_WAIT 0
#define _P_NOWAIT 1
+#define _P_OVERLAY 2
#define _P_DETACH 4
#define P_WAIT _P_WAIT
#define P_NOWAIT _P_NOWAIT
#define P_DETACH _P_DETACH
+#define P_OVERLAY _P_OVERLAY
#ifndef _INTPTR_T_DEFINED
typedef int intptr_t;
diff --git a/wince/process.c b/wince/process_wce.c
index 4415ad024e..4415ad024e 100644
--- a/wince/process.c
+++ b/wince/process_wce.c
diff --git a/wince/resource.rb b/wince/resource.rb
new file mode 100644
index 0000000000..81e94a8fbd
--- /dev/null
+++ b/wince/resource.rb
@@ -0,0 +1,97 @@
+#!./miniruby -sI.
+
+require 'rbconfig'
+
+CONFIG = Config::MAKEFILE_CONFIG
+
+fversion = "#{CONFIG['MAJOR']},#{CONFIG['MINOR']},#{CONFIG['TEENY']},0"
+
+$ruby_name ||= CONFIG["RUBY_INSTALL_NAME"]
+$rubyw_name ||= CONFIG["RUBYW_INSTALL_NAME"] || $ruby_name.sub(/ruby/, '\&w')
+$so_name ||= CONFIG["RUBY_SO_NAME"]
+
+icons = {}
+def icons.find(path)
+ if File.directory?(path)
+ Dir.open(File.expand_path(path)) do |d|
+ d.grep(/\.ico$/i) {|i| self[$`] = i}
+ end
+ else
+ self[File.basename(path, '.ico')] = path
+ end
+ self
+end
+
+if ARGV.empty?
+ icons.find('.')
+else
+ ARGV.each {|i| icons.find(i)}
+end
+
+ruby_icon = rubyw_icon = nil
+[$ruby_name, 'ruby'].each do |i|
+ if i = icons.delete(i)
+ ruby_icon = "1 ICON DISCARDABLE "+i.dump+"\n"
+ break
+ end
+end
+[$rubyw_name, 'rubyw'].each do |i|
+ if i = icons.delete(i)
+ rubyw_icon = "1 ICON DISCARDABLE "+i.dump+"\n"
+ break
+ end
+end
+dll_icons = []
+icons.keys.sort.each do |i|
+ dll_icons << "#{dll_icons.size + 1} ICON DISCARDABLE "+icons[i].dump+"\n"
+end
+
+[ # base name extension file type icons
+ [$ruby_name, CONFIG["EXEEXT"], 'VFT_APP', ruby_icon],
+ [$rubyw_name, CONFIG["EXEEXT"], 'VFT_APP', rubyw_icon],
+ [$so_name, '.dll', 'VFT_DLL', dll_icons],
+].each do |base, ext, type, icons|
+ open(base + '.rc', "w") { |f|
+ f.binmode if /mingw/ =~ RUBY_PLATFORM
+
+ f.print <<EOF
+#ifndef __BORLANDC__
+#include <windows.h>
+#include <winver.h>
+#endif
+
+#{icons}
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION #{fversion}
+ PRODUCTVERSION #{fversion}
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS 0x0L
+ FILEOS VOS__WINDOWS32
+ FILETYPE #{type}
+ FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "FileDescription", "Ruby interpreter\\0"
+ VALUE "FileVersion", "#{fversion}\\0"
+ VALUE "Home Page", "http://www.ruby-lang.org/\\0"
+ VALUE "InternalName", "#{base + ext}\\0"
+ VALUE "LegalCopyright", "Copyright (C) 1993-2003 Yukihiro Matsumoto\\0"
+ VALUE "OriginalFilename", "#{base + ext}\\0"
+ VALUE "Platform", "#{RUBY_PLATFORM}\\0"
+ VALUE "ProductVersion", "#{fversion}\\0"
+ VALUE "Release Date", "#{RUBY_RELEASE_DATE}\\0"
+ VALUE "Version", "#{RUBY_VERSION}\\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 0x4b0
+ END
+END
+EOF
+ }
+end
+
diff --git a/wince/setup.mak b/wince/setup.mak
new file mode 100644
index 0000000000..2d3f04be89
--- /dev/null
+++ b/wince/setup.mak
@@ -0,0 +1,184 @@
+# -*- makefile -*-
+
+!if "$(srcdir)" != ""
+WIN32DIR = $(srcdir)/win32
+!elseif "$(WIN32DIR)" == "win32"
+srcdir = .
+!elseif "$(WIN32DIR)" == "$(WIN32DIR:/win32=)/win32"
+srcdir = $(WIN32DIR:/win32=)
+!else
+srcdir = $(WIN32DIR)/..
+!endif
+OS = mswin32
+RT = msvcrt
+INCLUDE = !include
+APPEND = echo>>$(MAKEFILE)
+!ifdef MAKEFILE
+MAKE = $(MAKE) -f $(MAKEFILE)
+!else
+MAKEFILE = Makefile
+!endif
+ARCH = PROCESSOR_ARCHITECTURE
+CPU = PROCESSOR_LEVEL
+CPP = cl -nologo -EP
+
+all: -prologue- -generic- -epilogue-
+i386-$(OS): -prologue- -i386- -epilogue-
+i486-$(OS): -prologue- -i486- -epilogue-
+i586-$(OS): -prologue- -i586- -epilogue-
+i686-$(OS): -prologue- -i686- -epilogue-
+alpha-$(OS): -prologue- -alpha- -epilogue-
+
+# CE
+mips-hpc2k-wince: -prologue- -mips- -hpc2k- -epilogue-
+mips-ppc-wince: -prologue- -mips- -ppc- -epilogue-
+mips-hpcpro-wince: -prologue- -mips- -hpcpro- -epilogue-
+arm-hpc2k-wince: -prologue- -arm- -hpc2k- -epilogue-
+arm-ppc-wince: -prologue- -arm- -ppc- -epilogue-
+arm-hpcpro-wince: -prologue- -arm- -hpcpro- -epilogue-
+sh3-ppc-wince: -prologue- -sh3- -ppc- -epilogue-
+sh3-hpcpro-wince: -prologue- -sh3- -hpcpro2- -epilogue-
+sh4-hpcpro-wince: -prologue- -sh4- -hpcpro2- -epilogue-
+
+-prologue-: nul
+ @type << > $(MAKEFILE)
+### Makefile for ruby $(OS) ###
+srcdir = $(srcdir:\=/)
+<<
+ @$(CPP) -I$(srcdir) <<"Creating $(MAKEFILE)" >> $(MAKEFILE)
+#include "version.h"
+MAJOR = RUBY_VERSION_MAJOR
+MINOR = RUBY_VERSION_MINOR
+TEENY = RUBY_VERSION_TEENY
+<<
+
+-generic-: nul
+!if defined($(ARCH)) || defined($(CPU))
+ @type << >>$(MAKEFILE)
+!if defined($(ARCH))
+$(ARCH) = $(PROCESSOR_ARCHITECTURE)
+!endif
+!if defined($(CPU))
+$(CPU) = $(PROCESSOR_LEVEL)
+!endif
+
+<<
+!endif
+
+-alpha-: nul
+ @$(APPEND) $(ARCH) = alpha
+-ix86-: nul
+ @$(APPEND) $(ARCH) = x86
+
+-i386-: -ix86-
+ @$(APPEND) $(CPU) = 3
+-i486-: -ix86-
+ @$(APPEND) $(CPU) = 4
+-i586-: -ix86-
+ @$(APPEND) $(CPU) = 5
+-i686-: -ix86-
+ @$(APPEND) $(CPU) = 6
+
+# CE
+-mips- -arm- -sh3- -sh4-::
+ @$(APPEND) $(ARCH) = $(@:-=)
+-mips- -arm-::
+ @$(APPEND) CC = cl$(@:-=)
+-sh3- -sh4-::
+ @$(APPEND) CC = shcl
+
+-arm-::
+ @$(APPEND) CECPUDEF = -DARM -D_ARM_
+-mips-::
+ @$(APPEND) CECPUDEF = -DMIPS -D_MIPS_
+-sh3-::
+ @$(APPEND) CECPUDEF = -DSHx -DSH3 -D_SH3_
+-sh4-::
+ @$(APPEND) CECPUDEF = -DSHx -DSH4 -D_SH4_
+
+-hpc2k-: -hpc2000-
+-ppc-: "-MS Pocket PC-"
+-hpcpro2-: "-MS HPC Pro-"
+-hpcpro-: "-MS HPC Pro--"
+
+-mswin32-:
+ @type << >>$(MAKEFILE)
+OS = mswin32
+RT = msvcrt
+<<
+
+-mswince-:
+ @type << >>$(MAKEFILE)
+!ifdef CE_TOOLS_DIR
+CE_TOOLS_DIR = $(CE_TOOLS_DIR)
+!endif
+!ifdef EMBEDDED_TOOLS_DIR
+EMBEDDED_TOOLS_DIR = $(EMBEDDED_TOOLS_DIR)
+!endif
+
+OS = mswince
+RT = $$(OS)
+SUBSYSTEM = windowsce
+<<
+
+-mswince-3.00 -mswince-2.11: -mswince-
+ @type << >>$(MAKEFILE)
+SUBSYSVERSION = $(@:-mswince-=)
+PATH = $$(EMBEDDED_TOOLS_DIR)/common/evc/bin;$$(EMBEDDED_TOOLS_DIR)/EVC/WCE$$(SUBSYSVERSION:.=)/bin
+<<
+
+-hpc2000- "-MS Pocket PC-": -mswince-3.00
+"-MS HPC Pro-" "-MS HPC Pro--": -mswince-2.11
+
+#-hpc2000- -"MS Pocket PC"- "-MS HPC Pro-":
+# @type << >>$(MAKEFILE)
+#INCLUDE = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/$(@:-=)/include
+#LIB = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/$(@:-=)/lib/$$(PROCESSOR_ARCHITECTURE)
+#<<
+
+-hpc2000-:
+ @type << >>$(MAKEFILE)
+INCLUDE = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/$(@:-=)/include
+LIB = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/$(@:-=)/lib/$$(PROCESSOR_ARCHITECTURE)
+<<
+
+"-MS Pocket PC-":
+ @type << >>$(MAKEFILE)
+INCLUDE = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/MS Pocket PC/include
+LIB = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/MS Pocket PC/lib/$$(PROCESSOR_ARCHITECTURE)
+<<
+
+
+"-MS HPC Pro--":
+ @type << >>$(MAKEFILE)
+INCLUDE = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/$(@:-=)/include
+LIB = $$(CE_TOOLS_DIR)/wce$$(SUBSYSVERSION:.=)/$(@:-=)/lib
+<<
+
+-epilogue-: nul
+ @type << >>$(MAKEFILE)
+!ifdef RUBY_INSTALL_NAME
+RUBY_INSTALL_NAME = $(RUBY_INSTALL_NAME)
+!else ifdef RUBY_SUFFIX
+RUBY_INSTALL_NAME = ruby$(RUBY_SUFFIX)
+!endif
+!ifdef RUBY_SO_NAME
+RUBY_SO_NAME = $(RUBY_SO_NAME)
+!else
+# RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR)
+!endif
+# prefix = /usr
+# CFLAGS = -nologo $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG)
+CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -I$$(srcdir)/wince \
+ $$(CECPUDEF) -DUNDER_CE -D_WIN32_WCE=$$(SUBSYSVERSION:.=) \
+ -DFILENAME_MAX=MAX_PATH -DTLS_OUT_OF_INDEXES=0xFFFFFFFF \
+ -DBUFSIZ=512 -D_UNICODE -DUNICODE -DUNDER_CE
+# STACK = 0x10000,0x1000
+# LDFLAGS = $$(CFLAGS) -Fm
+# XLDFLAGS =
+# RFLAGS = -r
+# EXTLIBS =
+
+$(INCLUDE) $$(srcdir)/wince/Makefile.sub
+<<
+ @echo type `$(MAKE)' to make ruby for $(OS).
diff --git a/wince/signal.c b/wince/signal_wce.c
index 95f85e0ac8..95f85e0ac8 100644
--- a/wince/signal.c
+++ b/wince/signal_wce.c
diff --git a/wince/stdio.c b/wince/stdio.c
index 9047a9ab0f..877408d417 100644
--- a/wince/stdio.c
+++ b/wince/stdio.c
@@ -22,7 +22,7 @@ FILE *freopen(const char *filename, const char *mode, FILE *file)
return fp;
}
-FILE *_fdopen( int handle, const char *mode )
+FILE *fdopen( int handle, const char *mode )
{
wchar_t *wmode;
FILE* fp;
diff --git a/wince/stdlib.c b/wince/stdlib.c
deleted file mode 100644
index b3d5f3bb6e..0000000000
--- a/wince/stdlib.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/***************************************************************
- stdlib.c
-***************************************************************/
-
-#include <windows.h>
-
-char **environ;
-extern char * rb_w32_getenv(const char *);
-
-/* getenv should replace with rb_w32_getenv. */
-char *getenv(const char *env)
-{
- return rb_w32_getenv(env);
-}
-
-char *_fullpath(char *absPath, const char *relPath,
- size_t maxLength)
-{
- strcpy( absPath, relPath );
- return absPath;
-}
-
diff --git a/wince/string_wce.c b/wince/string_wce.c
new file mode 100644
index 0000000000..2a5514913d
--- /dev/null
+++ b/wince/string_wce.c
@@ -0,0 +1,69 @@
+/***************************************************************
+ string.c
+***************************************************************/
+
+#include <windows.h>
+#include "wince.h" /* for wce_mbtowc */
+
+/* _strdup already exists in stdlib.h? */
+char *strdup(const char * str)
+{
+ char *p;
+
+ p = malloc( strlen(str)+1 );
+ strcpy( p, str );
+ return p;
+}
+
+char* strerror(int errno)
+{
+ static char buf[32]="wince::strerror called.";
+ return buf;
+}
+
+/* strnicmp already exists in stdlib.h? */
+int strnicmp( const char *s1, const char *s2, size_t count )
+{
+ wchar_t *w1, *w2;
+ int n;
+
+ w1 = wce_mbtowc(s1);
+ w2 = wce_mbtowc(s2);
+
+ n = wcsnicmp(w1, w2, count);
+
+ free(w1);
+ free(w2);
+
+ return n;
+}
+
+#if _WIN32_WCE < 300
+#include "..\missing\strtoul.c"
+
+char *strrchr( const char *p, int c )
+{
+ char *pp;
+ for( pp=(char*)p+strlen(p); pp!=p; p-- )
+ {
+ if( *pp==c ) break;
+ }
+ return pp==p ? NULL : pp;
+}
+
+int stricmp( const char *s1, const char *s2 )
+{
+ wchar_t *w1, *w2;
+ int n;
+
+ w1 = wce_mbtowc(s1);
+ w2 = wce_mbtowc(s2);
+
+ n = wcsicmp(w1, w2);
+
+ free(w1);
+ free(w2);
+
+ return n;
+}
+#endif
diff --git a/wince/sys/stat.c b/wince/sys/stat.c
index f898a69f40..5d51dbf426 100644
--- a/wince/sys/stat.c
+++ b/wince/sys/stat.c
@@ -22,7 +22,8 @@ int _stat(const char *filename, struct _stat *st)
WIN32_FIND_DATAW fd;
wchar_t *wfilename;
- wfilename = wce_mbtowc(filename);
+// wfilename = wce_mbtowc(filename);
+ wfilename = wce_replaceRelativeDir(filename);
dwAttribute = GetFileAttributesW(wfilename);
if(dwAttribute==0xFFFFFFFF)
diff --git a/wince/sys/utime.c b/wince/sys/utime.c
index 02ce275e3e..0139c13828 100644
--- a/wince/sys/utime.c
+++ b/wince/sys/utime.c
@@ -14,7 +14,7 @@
#endif
#endif
-int _utime(const char *f, struct utimbuf *t)
+int utime(const char *f, struct utimbuf *t)
{
HANDLE h;
FILETIME atime={0}, mtime={0};
diff --git a/wince/sys/utime.h b/wince/sys/utime.h
index 46a4ddc1a1..b644f02a61 100644
--- a/wince/sys/utime.h
+++ b/wince/sys/utime.h
@@ -16,12 +16,12 @@ struct utimbuf
extern "C" {
#endif
-int _utime(const char *f, struct utimbuf *t);
+int utime(const char *f, struct utimbuf *t);
#ifdef __cplusplus
};
#endif
-#define utime _utime
+//#define utime _utime
#endif
diff --git a/wince/time.h b/wince/time.h
index 85f774cdca..531b2aacfd 100644
--- a/wince/time.h
+++ b/wince/time.h
@@ -1,5 +1,5 @@
-#ifndef TIME_H
-#define TIME_H 1
+#ifndef _TIME_WINCE_H
+#define _TIME_WINCE_H 1
#include <winbase.h>
#include <sys/types.h>
diff --git a/wince/time.c b/wince/time_wce.c
index 81afe5152f..81afe5152f 100644
--- a/wince/time.c
+++ b/wince/time_wce.c
diff --git a/wince/wince.c b/wince/wince.c
index e227fe528e..c1a950c1c1 100644
--- a/wince/wince.c
+++ b/wince/wince.c
@@ -15,6 +15,8 @@
/* global for GetCommandLineA */
char *_commandLine;
+extern char _currentdir[];
+
/* make up Win32API except wce_* functions. */
DWORD GetModuleFileNameA(
@@ -23,18 +25,18 @@ DWORD GetModuleFileNameA(
{
LPWSTR lpFileNameW;
LPSTR mb;
- size_t len;
+ size_t ret;
+
+ if( size==0 ) return 0;
lpFileNameW = (LPWSTR)malloc( size*sizeof(wchar_t) );
- GetModuleFileNameW( hModule, lpFileNameW, size );
+ ret = GetModuleFileNameW( hModule, lpFileNameW, size );
mb = wce_wctomb(lpFileNameW);
- len = min(strlen(mb),size);
- strncpy(lpFileName, mb, len);
- lpFileName[len-1] = '\0';
+ strcpy(lpFileName, mb);
free(mb);
free(lpFileNameW);
- return 0;
+ return ret;
}
#if _WIN32_WCE < 300
@@ -48,7 +50,7 @@ FARPROC GetProcAddressA(HMODULE hModule, LPCSTR lpProcName)
free( lpwProcName );
return p;
}
-#endif
+#endif
char * GetCommandLineA(void)
{
@@ -448,6 +450,9 @@ HINSTANCE LoadLibraryA(LPCSTR libname)
HINSTANCE h;
LPWSTR wlibname;
+ // if starts ".\", replace current directory.
+// wlibname = wce_replaceRelativeDir(libname);
+
wlibname = wce_mbtowc(libname);
h = LoadLibraryW(wlibname);
free(wlibname);
@@ -461,6 +466,8 @@ HINSTANCE LoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile,
LPWSTR wlibname;
wlibname = wce_mbtowc(lpLibFileName);
+// wlibname = wce_replaceRelativeDir(lpLibFileName);
+
#if _WIN32_WCE < 300
h = LoadLibraryW(wlibname);
#else
@@ -503,6 +510,47 @@ int ReadDataPending()
}
/*---------------- helper functions. ---------------------------- */
+FILE *wce_fopen( const char *fname, const char *mode )
+{
+ TCHAR* tfname = wce_replaceRelativeDir(fname);
+ TCHAR* tmode = wce_mbtowc(mode);
+ FILE* fp = _tfopen(tfname, tmode);
+ free(tfname); free(tmode);
+ return fp;
+}
+
+void wce_SetCurrentDir()
+{
+ WCHAR tbuf[MAX_PATH+1]={0};
+ WCHAR *tp;
+ char *buf;
+
+ GetModuleFileNameW( NULL, tbuf, MAX_PATH );
+ tp = _tcsrchr( tbuf, '\\' );
+ if( tp!=NULL ) *tp=_T('\0');
+ buf = wce_wctomb(tbuf);
+ strcpy( _currentdir, buf );
+ free(buf);
+}
+
+TCHAR *wce_replaceRelativeDir(const char* str)
+{
+ TCHAR *tbuf;
+
+ if( 2<=strlen(str) && str[0]=='.' &&
+ (str[1]=='/' || str[1]=='\\') )
+ {
+ char *buf;
+ int len = strlen(str) + strlen(_currentdir);
+ buf = malloc( len+1 );
+ sprintf(buf, "%s%s", _currentdir, &str[1]);
+ tbuf = wce_mbtowc(buf);
+ free(buf);
+ }
+ else
+ tbuf = wce_mbtowc(str);
+ return tbuf;
+}
/* char -> wchar_t */
wchar_t* wce_mbtowc(const char* a)
diff --git a/wince/wince.h b/wince/wince.h
index 4081042718..7a562f702a 100644
--- a/wince/wince.h
+++ b/wince/wince.h
@@ -56,81 +56,53 @@ extern "C" {
/* Win32 API redifinition. */
-#ifdef GetCommandLine
#undef GetCommandLine
#define GetCommandLine GetCommandLineA
-#endif
-#ifdef SetFileAttributes
#undef SetFileAttributes
#define SetFileAttributes SetFileAttributesA
-#endif
-#ifdef GetFileAttributes
#undef GetFileAttributes
#define GetFileAttributes GetFileAttributesA
-#endif
-#ifdef FormatMessage
#undef FormatMessage
#define FormatMessage FormatMessageA
-#endif
-#ifdef GetModuleFileName
#undef GetModuleFileName
#define GetModuleFileName GetModuleFileNameA
-#endif
-#ifdef CreateFile
#undef CreateFile
#define CreateFile CreateFileA
-#endif
-#ifdef MoveFile
#undef MoveFile
#define MoveFile MoveFileA
-#endif
-#ifdef DeleteFile
#undef DeleteFile
#define DeleteFile DeleteFileA
-#endif
-#ifdef CreateProcess
#undef CreateProcess
#define CreateProcess CreateProcessA
-#endif
-#ifdef CharNext
#undef CharNext
#define CharNext CharNextA
-#endif
-#ifdef CharPrev
#undef CharPrev
#define CharPrev CharPrevA
-#endif
-#ifdef WIN32_FIND_DATA
#undef WIN32_FIND_DATA
#define WIN32_FIND_DATA WIN32_FIND_DATAA
-#endif
-#ifdef FindFirstFile
#undef FindFirstFile
#define FindFirstFile FindFirstFileA
-#endif
-#ifdef FindNextFile
#undef FindNextFile
#define FindNextFile FindNextFileA
-#endif
/* stdio.c */
FILE *freopen(const char *filename, const char *mode, FILE *file);
-FILE *_fdopen( int handle, const char *mode );
+FILE *fdopen( int handle, const char *mode );
-#define fdopen _fdopen
+//#define fdopen _fdopen
/* stdlib.c */
char *getenv(const char *charstuff);
@@ -141,9 +113,12 @@ char *strdup(const char * str);
/* char *strerror(int errno); */
int strnicmp( const char *s1, const char *s2, size_t count );
-#define strnicmp _strnicmp
+//#define strnicmp _strnicmp
+#define stricmp _stricmp
/* for win32.c */
+FARPROC GetProcAddressX(HMODULE hModule, LPCSTR lpProcName);
+
BOOL MoveFileEx(LPCSTR oldname, LPCSTR newname, DWORD dwFlags);
BOOL DuplicateHandle(
HANDLE source_process, HANDLE source,
@@ -186,6 +161,8 @@ char* wce_wctomb(const wchar_t* w);
/* other helpers. */
void wce_SetCommandLine(LPCWSTR wcmd);
void wce_FreeCommandLine(void);
+TCHAR *wce_replaceRelativeDir(const char* str);
+void wce_SetCurrentDir();
#if _WIN32_WCE < 300
/* for Handheld PC Pro. */
diff --git a/wince/wincemain.c b/wince/wincemain.c
index 5fe5ebec2a..fb634a0eea 100644
--- a/wince/wincemain.c
+++ b/wince/wincemain.c
@@ -4,12 +4,15 @@
extern int main(int, char**, char**);
+
int WINAPI
WinMain(HINSTANCE current, HINSTANCE prev, LPWSTR wcmd, int showcmd)
{
/* wchar_t -> char */
wce_SetCommandLine(wcmd);
+ wce_SetCurrentDir();
+
/* main. */
return main(0, NULL, NULL);
}