summaryrefslogtreecommitdiff
path: root/wince
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-30 14:45:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-30 14:45:05 +0000
commit162b04061133c92f3b703c245eecfd0e0b6c5636 (patch)
tree30d8208d70ccf3f63aeda44c37ff22814c0de597 /wince
parentd6024d60551f484ad71fc9f4a2935bf880b4c5b5 (diff)
* Makefile.in, */Makefile.sub, */configure.bat, cygwin/GNUmakefile.in,
common.mk, configure.in, ext/extmk.rb, lib/mkmf.rb, instruby.rb, runruby.rb: backport extout. [ruby-dev:25963] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'wince')
-rw-r--r--wince/Makefile.sub463
-rw-r--r--wince/configure.bat155
2 files changed, 219 insertions, 399 deletions
diff --git a/wince/Makefile.sub b/wince/Makefile.sub
index 3d5eed13ae..1dfa07de1c 100644
--- a/wince/Makefile.sub
+++ b/wince/Makefile.sub
@@ -1,6 +1,8 @@
# -*- makefile -*-
SHELL = $(COMSPEC)
+MKFILES = Makefile
+NULL = nul
#### Start of system configuration section. ####
@@ -26,7 +28,7 @@ iconinc=-I$(icondirs: = -I)
!endif
###############
-VPATH = $(srcdir):$(srcdir)/missing
+VPATH = $(srcdir);$(srcdir)/missing;$(srcdir)/wince
.SUFFIXES: .y .def .lib
!if !defined(CC)
@@ -41,6 +43,7 @@ YACC = byacc
AR = lib -nologo
PURIFY =
AUTOCONF = autoconf
+RM = $(srcdir)\win32\rm.bat
!if !defined(PROCESSOR_ARCHITECTURE)
PROCESSOR_ARCHITECTURE = x86
@@ -66,11 +69,9 @@ DEBUGFLAGS = -Zi
!if !defined(OPTFLAGS)
OPTFLAGS = -w -O2b2xg-
!endif
-!ifndef OS
-OS = mswin32
-!endif
-!ifndef RT
-RT = msvcrt
+!if !defined(OS) || !defined(RT)
+OS = mswince
+RT = $(OS)
!endif
!ifndef RUBY_SO_NAME
@@ -80,7 +81,6 @@ RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)
RUBY_PLATFORM = $(ARCH)-$(OS)
!endif
-
!if !defined(prefix)
prefix = /usr
!endif
@@ -90,17 +90,34 @@ exec_prefix = $(prefix)
!if !defined(libdir)
libdir = $(exec_prefix)/lib
!endif
-!if !defined(DESTDIR)
-DESTDIR = $(prefix)
+!if !defined(datadir)
+datadir = $(prefix)/share
+!endif
+!ifndef EXTOUT
+EXTOUT = .ext
+!endif
+!ifndef RIDATADIR
+RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system
!endif
+!ifndef RDOCTARGET
+RDOCTARGET = install-doc
+!endif
+
+OUTFLAG = -Fe
!if !defined(CFLAGS)
CFLAGS = $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
!endif
!if !defined(CPPFLAGS)
-CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -I$(srcdir)/wince
+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
+!endif
+!if !defined(LDFLAGS)
+LDFLAGS = -link -incremental:yes -pdb:none -machine:$(MACHINE) -subsystem:$(SUBSYSTEM)
!endif
!if !defined(XLDFLAGS)
-XLDFLAGS =
+XLDFLAGS = -stack:$(STACK) -subsystem:$(SUBSYSTEM)
!endif
!if !defined(RFLAGS)
RFLAGS = -r
@@ -108,22 +125,20 @@ RFLAGS = -r
!if !defined(EXTLIBS)
EXTLIBS =
!endif
-LIBS = coredll.lib winsock.lib $(EXTLIBS)
+LIBS = coredll.lib ceshell.lib winsock.lib $(EXTLIBS)
MISSING = acosh.obj crypt.obj dup2.obj erf.obj hypot.obj \
- isinf.obj isnan.obj strftime.obj win32.obj
-WINCEOBJ= assert.obj direct.obj errno.obj io_wce.obj process_wce.obj \
+ isinf.obj isnan.obj strftime.obj win32.obj \
+ 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
+ time_wce.obj wince.obj winsock2.obj \
+ 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) -subsystem:$(SUBSYSTEM)
+XCFLAGS = -DRUBY_EXPORT
DLDFLAGS = $(LDFLAGS) -dll
-XLDFLAGS = -stack:$(STACK) -subsystem:$(SUBSYSTEM)
SOLIBS =
LIBRUBY_LDSHARED = $(LDSHARED)
@@ -131,10 +146,12 @@ 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)
-MINIRUBY_WIN = .\miniruby$(EXEEXT)
+MINIRUBY = $(RUBY) -I$(MAKEDIR) -rfake
+RUNRUBY = $(MINIRUBY) "$(srcdir)/runruby.rb" --extout="$(EXTOUT)" --
+!ifndef RUBY
+RUBY = ruby
+!endif
!if !defined(STACK)
STACK = 0x200000,0x10000
@@ -148,64 +165,27 @@ LIBRUBY_SO = $(RUBY_SO_NAME).dll
LIBRUBY = $(RUBY_SO_NAME).lib
LIBRUBYARG = $(LIBRUBY)
+PREP = fake.rb
+
+!if !defined(EXTSTATIC)
+EXTSTATIC =
+!endif
+
+OBJEXT = obj
+
EXTOBJS =
+DLDOBJS =
-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_WIN) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)"
-
-ext:
- @mkdir $@
+WINMAINOBJ = wincemain.$(OBJEXT)
+all: $(srcdir)/wince/Makefile.sub $(srcdir)/common.mk
ruby: $(PROGRAM)
-rubyw: $(WPROGRAM)
-lib: $(LIBRUBY)
-dll: $(LIBRUBY_SO)
-config: config.h config.status
+CONFIG_H = ./.config.h.time
+
+config: config.status
+
+config.status: $(CONFIG_H)
BANG = !
@@ -213,8 +193,9 @@ BANG = !
!include config.h
!endif
-config.h:
- @echo Creating <<$@
+$(CONFIG_H): $(MKFILES) $(srcdir)/wince/Makefile.sub
+ @echo Creating config.h
+ @$(srcdir:/=\)\win32\ifchange.bat config.h <<
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
@@ -286,7 +267,6 @@ config.h:
#define NEED_IO_SEEK_BETWEEN_RW 1
#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)"
@@ -320,12 +300,15 @@ $(BANG)endif
#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
-<<KEEP
+<<
+ @exit > $(@:/=\)
-config.status: Makefile $(srcdir)/wince/Makefile.sub
- @echo Creating <<$@
+config.status: $(MKFILES) $(srcdir)/wince/Makefile.sub $(srcdir)/common.mk
+ @echo Creating $@
+ @exit <<$@
# Generated automatically by Makefile.sub.
s,@SHELL@,$$(COMSPEC),;t t
+s,@PATH_SEPARATOR@,;,;t t
s,@CFLAGS@,$(CFLAGS),;t t
s,@CPPFLAGS@,$(CPPFLAGS),;t t
s,@CXXFLAGS@,$(CXXFLAGS),;t t
@@ -333,7 +316,7 @@ 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,@prefix@,$(prefix),;t t
s,@program_transform_name@,s,,,,;t t
s,@bindir@,$${exec_prefix}/bin,;t t
s,@sbindir@,$${exec_prefix}/sbin,;t t
@@ -374,21 +357,25 @@ s,@LIBOBJS@, acosh.obj crypt.obj erf.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,@OBJEXT@,$(OBJEXT),;t t
s,@XCFLAGS@,$(XCFLAGS),;t t
s,@XLDFLAGS@,$(XLDFLAGS),;t t
-s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH) -def:$$(DEFFILE),;t t
+s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH) -def:$$(DEFFILE) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb,;t t
s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
s,@STATIC@,$(STATIC),;t t
-s,@CCDLFLAGS@,-DIMPORT,;t t
+s,@CCDLFLAGS@,,;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,@PREP@,miniruby$(EXEEXT),;t t
+s,@RUNRUBY@,$(RUNRUBY),;t t
+s,@EXTOUT@,$(EXTOUT),;t t
+s,@ARCHFILE@,,;t t
+s,@RDOCTARGET@,,;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
@@ -405,7 +392,7 @@ 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,@OUTFLAG@,$(OUTFLAG),;t t
s,@CPPOUTFILE@,-P,;t t
s,@LIBPATHFLAG@, -libpath:"%s",;t t
s,@RPATHFLAG@,,;t t
@@ -413,7 +400,8 @@ 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,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t
+s,@RULE_SUBST@,{.;$$(srcdir);$$(topdir);$$(hdrdir)}%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@,coredll winsock,;t t
s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t
@@ -426,127 +414,75 @@ 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
-s,@RUBY_PLATFORM@,$(RUBY_PLATFORM),;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)
-$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
- $(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) $*.res \
- -Fe$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS)
-
-$(LIBRUBY_A): $(OBJS) dmyext.obj
- $(AR) $(ARFLAGS)$@ $(OBJS) dmyext.obj
+$(LIBRUBY_A): $(OBJS) $(DMYEXT)
+ $(AR) $(ARFLAGS)$@ $(OBJS) $(DMYEXT)
$(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)
+$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
+ @echo. $(DLDOBJS)
+ $(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
+ $(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \
+ $(LIBRUBY_DLDFLAGS)
-$(RUBYDEF): $(LIBRUBY_A) minirubyce$(EXEEXT)
- $(MINIRUBY_WIN) $(srcdir)/wince/mkexports.rb \
- -output=$@ $(LIBRUBY_A) $(ARCH)
+$(RUBYDEF): $(LIBRUBY_A) $(PREP)
+ $(MINIRUBY) $(srcdir)/win32/mkexports.rb \
+ -output=$@ -arch=$(ARCH) $(LIBRUBY_A)
{$(srcdir)/wince}.def.lib:
$(AR) $(ARFLAGS)$@ -def:$<
-install: rbconfig.rb
- $(MINIRUBY_WIN) $(srcdir)/instruby.rb \
- "--dest-dir=$(DESTDIR)" "--make=nmake"
- $(MINIRUBY_WIN) $(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_WIN) $(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_WIN) $(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) rbconfig.rb $(PROGRAM) NUL
- @miniruby$(EXEEXT) $(srcdir)/rubytest.rb
-
-rbconfig.rb: miniruby$(EXEEXT) config.status
- $(MINIRUBY_WIN) $(srcdir)/mkconfig.rb -srcdir=$(srcdir) \
- -install_name=$(RUBY_INSTALL_NAME) \
- -so_name=$(RUBY_SO_NAME) rbconfig.rb
- $(MINIRUBY_WIN) $(srcdir)/wince/mkconfig_wce.rb rbconfig.rb
-
-$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
- $(MINIRUBY_WIN) $(srcdir)/win32/resource.rb \
+clean-local::
+ @$(RM) ext\extinit.c ext\extinit.$(OBJEXT) ext\vc*.pdb
+ @$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res
+
+distclean-local::
+ @$(RM) ext\config.cache $(RBCONFIG:/=\)
+ @$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF)
+ @$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
+
+$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: $(RBCONFIG)
+ @$(MINIRUBY) $(srcdir)/win32/resource.rb \
-ruby_name=$(RUBY_INSTALL_NAME) \
-rubyw_name=$(RUBYW_INSTALL_NAME) \
-so_name=$(RUBY_SO_NAME) \
-wce_ver=$(SUBSYSVERSION) \
. $(icondirs) $(srcdir)/wince
+fake.rb: $(MKFILES)
+ @echo Creating <<$@
+class Object
+ CROSS_COMPILING = RUBY_PLATFORM
+ remove_const :RUBY_PLATFORM
+ remove_const :RUBY_VERSION
+ RUBY_PLATFORM = "$(ARCH)"
+ RUBY_VERSION = "$(MAJOR).$(MINOR).$(TEENY)"
+end
+class File
+ remove_const :ALT_SEPARATOR
+ ALT_SEPARATOR = "\\"
+end
+<<KEEP
+
{$(srcdir)/missing}.c.obj:
- $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
{$(srcdir)/win32}.c.obj:
- $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
{$(srcdir)/wince}.c.obj:
- $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
{$(srcdir)/wince/sys}.c.obj:
- $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
{$(srcdir)}.c.obj:
- $(CC) $(CFLAGS) $(XCFLAGS) -I. -I$(<D) $(CPPFLAGS) -c -Tc$(<:\=/)
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
.c.obj:
- $(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) -c -Tc$(<:\=/)
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
.rc.res:
$(RC) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
@@ -556,164 +492,11 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $@
@del y.tab.c
-{$(srcdir)}parse.c: parse.y
+!include $(srcdir)/common.mk
+
+$(OBJS): {$(srcdir)}win32/win32.h
+
+dir.$(OBJEXT): {$(srcdir)}win32/dir.h
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
-erf.obj: {$(srcdir)}missing/erf.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 {$(srcdir)}ruby.h config.h \
- {$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.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)}st.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)}util.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)}util.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
-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/configure.bat b/wince/configure.bat
index 5e7b1b6b93..3ec2757294 100644
--- a/wince/configure.bat
+++ b/wince/configure.bat
@@ -1,59 +1,96 @@
-@echo off
-::: 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
-if "%1" == "EMBEDDED_TOOLS4_DIR" goto :define
-if "%1" == "CE_TOOLS4_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
+@echo off
+::: 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" == "--prefix" goto :prefix
+if "%1" == "--srcdir" goto :srcdir
+if "%1" == "srcdir" goto :srcdir
+if "%1" == "--target" goto :target
+if "%1" == "target" goto :target
+if "%1" == "--with-static-linked-ext" goto :extstatic
+if "%1" == "--program-suffix" goto :suffix
+if "%1" == "--program-name" goto :progname
+if "%1" == "--enable-install-doc" goto :enable-rdoc
+if "%1" == "--disable-install-doc" goto :disable-rdoc
+if "%1" == "-h" goto :help
+if "%1" == "--help" goto :help
+if "%1" == "CC" goto :define
+if "%1" == "EMBEDDED_TOOLS_DIR" goto :define
+if "%1" == "CE_TOOLS_DIR" goto :define
+if "%1" == "EMBEDDED_TOOLS4_DIR" goto :define
+if "%1" == "CE_TOOLS4_DIR" goto :define
+ echo>> ~tmp~.mak "%1" \
+ shift
+goto :loop
+:srcdir
+ echo>> ~tmp~.mak "srcdir=%2" \
+ shift
+ shift
+goto :loop
+:prefix
+ echo>> ~tmp~.mak "prefix=%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
+:extstatic
+ echo>> ~tmp~.mak "EXTSTATIC=static" \
+ shift
+goto :loop
+:enable-rdoc
+ echo>> ~tmp~.mak "RDOCTARGET=install-doc" \
+ shift
+goto :loop
+:disable-rdoc
+ echo>> ~tmp~.mak "RDOCTARGET=install-nodoc" \
+ shift
+goto :loop
+:help
+ echo Configuration:
+ echo --help display this help
+ echo --srcdir=DIR find the sources in DIR [configure dir or `..']
+ echo Installation directories:
+ echo --prefix=PREFIX install files in PREFIX [/usr]
+ echo System types:
+ echo --target=TARGET configure for TARGET [i386-mswin32]
+ echo Optional Package:
+ echo --with-static-linked-ext link external modules statically
+ echo --enable-install-doc install rdoc indexes during install
+ del ~tmp~.mak
+goto :exit
+:end
+echo>> ~tmp~.mak WIN32DIR=$(@D)
+nmake -alf ~tmp~.mak
+:exit