diff options
author | uema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-01 01:17:41 +0000 |
---|---|---|
committer | uema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-01 01:17:41 +0000 |
commit | 952e9b9fba7d1212f22b78d9281b6baf7e84ddd4 (patch) | |
tree | 5d8ab8a64aca333c79f32c7a057c9debe6c353fa /wince | |
parent | 3ea7376bca04278433e14894f00b64b67187494b (diff) |
* wince/setup.mak: add sigmarionIII SDK support.
* wince/Makefile.sub: ditto.
* wince/mkexports.rb: fix linker error in SH4.
* wince/mkconfig_wce.rb: camouflage RUBY_PLATFORM for compiling ext.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'wince')
-rw-r--r-- | wince/Makefile.sub | 32 | ||||
-rw-r--r-- | wince/mkexports.rb | 2 | ||||
-rw-r--r-- | wince/setup.mak | 25 |
3 files changed, 38 insertions, 21 deletions
diff --git a/wince/Makefile.sub b/wince/Makefile.sub index ffec23ad48..f8ed157f16 100644 --- a/wince/Makefile.sub +++ b/wince/Makefile.sub @@ -76,6 +76,10 @@ RT = msvcrt !ifndef RUBY_SO_NAME RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR) !endif +!ifndef RUBY_PLATFORM +RUBY_PLATFORM = $(ARCH)-$(OS) +!endif + !if !defined(prefix) prefix = /usr @@ -119,7 +123,7 @@ LDSHARED = $(LD) -LD XCFLAGS = LDFLAGS = -link -incremental:yes -pdb:none -MACHINE:$(MACHINE) -subsystem:$(SUBSYSTEM) DLDFLAGS = $(LDFLAGS) -dll -XLDFLAGS = -stack:$(STACK) +XLDFLAGS = -stack:$(STACK) -subsystem:$(SUBSYSTEM) SOLIBS = LIBRUBY_LDSHARED = $(LDSHARED) @@ -130,6 +134,7 @@ PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT) WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT) RUBYDEF = $(RUBY_SO_NAME).def MINIRUBY = .\minirubyce$(EXEEXT) +MINIRUBY_WIN = .\miniruby$(EXEEXT) !if !defined(STACK) STACK = 0x200000,0x10000 @@ -190,7 +195,7 @@ OBJS = array.obj \ all: ext minirubyce$(EXEEXT) rbconfig.rb \ $(LIBRUBY) $(MISCLIBS) - @miniruby$(EXEEXT) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" + @$(MINIRUBY_WIN) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" ext: @mkdir $@ @@ -410,9 +415,9 @@ 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_LIBS@,coredll winsock,;t t s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t -s,@COMMON_HEADERS@,winsock2.h windows.h,;t t +s,@COMMON_HEADERS@,winsock.h windows.h,;t t s,@EXPORT_PREFIX@, ,;t t s,@arch@,$(ARCH)-$(OS),;t t s,@sitearch@,$(ARCH)-$(RT),;t t @@ -421,6 +426,7 @@ 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 @@ -447,16 +453,16 @@ $(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS) $(RUBYDEF) $*.res -Fe$@ $(LDFLAGS) $(LIBRUBY_DLDFLAGS) $(RUBYDEF): $(LIBRUBY_A) minirubyce$(EXEEXT) - miniruby$(EXEEXT) $(srcdir)/wince/mkexports.rb \ + $(MINIRUBY_WIN) $(srcdir)/wince/mkexports.rb \ -output=$@ $(LIBRUBY_A) $(ARCH) {$(srcdir)/wince}.def.lib: $(AR) $(ARFLAGS)$@ -def:$< install: rbconfig.rb - miniruby$(EXEEXT) $(srcdir)/instruby.rb \ + $(MINIRUBY_WIN) $(srcdir)/instruby.rb \ "--dest-dir=$(DESTDIR)" "--make=nmake" - miniruby$(EXEEXT) $(srcdir)/ext/extmk.rb \ + $(MINIRUBY_WIN) $(srcdir)/ext/extmk.rb \ --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install clean: clean-ext clean-local @@ -472,8 +478,7 @@ clean-local: @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 + @-$(MINIRUBY_WIN) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" clean distclean: distclean-ext distclean-local @@ -507,7 +512,7 @@ distclean-local: clean-local @if exist minirubyce$(EXEEXT) del minirubyce$(EXEEXT) distclean-ext: - @-$(MINIRUBY) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" distclean + @-$(MINIRUBY_WIN) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" distclean realclean: distclean @if exist parse.c del parse.c @@ -516,13 +521,14 @@ realclean: distclean test: miniruby$(EXEEXT) @miniruby$(EXEEXT) $(srcdir)/rubytest.rb -rbconfig.rb: minirubyce$(EXEEXT) config.status - miniruby$(EXEEXT) $(srcdir)/mkconfig.rb -srcdir=$(srcdir) \ +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$(EXEEXT) $(srcdir)/wince/resource.rb \ + $(MINIRUBY_WIN) $(srcdir)/wince/resource.rb \ -ruby_name=$(RUBY_INSTALL_NAME) \ -rubyw_name=$(RUBYW_INSTALL_NAME) \ -so_name=$(RUBY_SO_NAME) \ diff --git a/wince/mkexports.rb b/wince/mkexports.rb index 2508920c67..8e96649276 100644 --- a/wince/mkexports.rb +++ b/wince/mkexports.rb @@ -6,7 +6,7 @@ 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 ARGV[1]=~/sh/ if l.sub!(/^_/, '') next if /@.*@/ =~ l || /@[0-9a-f]{16}$/ =~ l elsif !l.sub!(/^(\S+) \([^@?\`\']*\)$/, '\1') diff --git a/wince/setup.mak b/wince/setup.mak index 59382c3a20..ea997834fd 100644 --- a/wince/setup.mak +++ b/wince/setup.mak @@ -37,10 +37,11 @@ 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- +sh3-hpcpro-wince: -prologue- -sh3- -hpcpro- -epilogue- +sh4-hpcpro-wince: -prologue- -sh4- -hpcpro- -epilogue- armv4-.net41-wince: -prologue- -armv4- -.net41- -epilogue- armv4t-.net41-wince: -prologue- -armv4t- -.net41- -epilogue- +armv4i-sig3-wince: -prologue- -armv4i- -sig3- -epilogue- -prologue-: nul @type << > $(MAKEFILE) @@ -88,10 +89,12 @@ $(CPU) = $(PROCESSOR_LEVEL) @$(APPEND) CC = cl$(@:-=) -sh3- -sh4-:: @$(APPEND) CC = shcl --armv4- -armv4t-:: +-armv4- -armv4i-:: @$(APPEND) CC = clarm @$(APPEND) ARCHFOLDER = $(@:-=) - +-armv4t-:: + @$(APPEND) CC = clthumb + @$(APPEND) ARCHFOLDER = $(@:-=) -arm-:: @$(APPEND) CECPUDEF = -DARM -D_ARM_ @@ -101,10 +104,11 @@ $(CPU) = $(PROCESSOR_LEVEL) @$(APPEND) CECPUDEF = -DSHx -DSH3 -D_SH3_ -sh4-:: @$(APPEND) CECPUDEF = -DSHx -DSH4 -D_SH4_ + @$(APPEND) QSH4 = -Qsh4 -armv4-:: @$(APPEND) CECPUDEF = -DARM -D_ARM_ -DARMV4 @$(APPEND) $(ARCH) = ARM --armv4t-:: +-armv4t- -armv4i-:: @$(APPEND) CECPUDEF = -DARM -D_ARM_ -DARMV4T -DTHUMB -D_THUMB_ @$(APPEND) $(ARCH) = THUMB @@ -156,12 +160,13 @@ PATH = $$(EMBEDDED_TOOLS_DIR)/common/evc/bin;$$(EMBEDDED_TOOLS_DIR)/EVC/WCE$$(SU -mswince-4.10: -mswince4- @type << >>$(MAKEFILE) SUBSYSVERSION = $(@:-mswince-=) +EXTLIBS = ws2.lib PATH = $$(EMBEDDED_TOOLS4_DIR)/common/evc/bin;$$(EMBEDDED_TOOLS4_DIR)/EVC/WCE$$(SUBSYSVERSION:.=)/bin << -hpc2000- "-MS Pocket PC-": -mswince-3.00 "-MS HPC Pro-" "-MS HPC Pro--": -mswince-2.11 --.net41-: -mswince-4.10 +-.net41- -sig3-: -mswince-4.10 -hpc2000-: @type << >>$(MAKEFILE) @@ -192,6 +197,12 @@ INCLUDE = $$(CE_TOOLS4_DIR)/wce400/STANDARDSDK/include/$$(ARCHFOLDER) LIB = $$(CE_TOOLS4_DIR)/wce400/STANDARDSDK/lib/$$(ARCHFOLDER) << +-sig3-: + @type << >>$(MAKEFILE) +SUBSYSTEM = windowsce,4.1 +INCLUDE = $$(CE_TOOLS4_DIR)/wce410/sigmarionIII SDK/include/$$(ARCHFOLDER) +LIB = $$(CE_TOOLS4_DIR)/wce410/sigmarionIII SDK/lib/$$(ARCHFOLDER) +<< -epilogue-: nul @type << >>$(MAKEFILE) @@ -210,7 +221,7 @@ RUBY_SO_NAME = $(RUBY_SO_NAME) 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 + -DBUFSIZ=512 -D_UNICODE -DUNICODE $$(QSH4) # STACK = 0x10000,0x1000 # LDFLAGS = $$(CFLAGS) -Fm # XLDFLAGS = |