2009-01-16 05:51:22 +03:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
setlocal
|
|
|
|
|
|
|
|
echo> ~tmp~.mak ####
|
|
|
|
echo> ~ver~.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" == "--with-static-linked-ext" goto :extstatic
|
|
|
|
if "%1" == "--extout" goto :extout
|
|
|
|
if "%1" == "--with-baseruby" goto :baseruby
|
|
|
|
if "%1" == "-h" goto :help
|
|
|
|
if "%1" == "--help" goto :help
|
|
|
|
shift
|
|
|
|
goto :loop
|
|
|
|
:srcdir
|
|
|
|
echo>> ~tmp~.mak srcdir=%2
|
|
|
|
echo> ~ver~.mak srcdir=%2
|
|
|
|
set srcdir=%2
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
goto :loop
|
|
|
|
:target
|
|
|
|
echo>> ~tmp~.mak arch=%2
|
|
|
|
set arch=%2
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
goto :loop
|
|
|
|
:extstatic
|
|
|
|
echo>> ~tmp~.mak EXTSTATIC=static
|
|
|
|
shift
|
|
|
|
goto :loop
|
|
|
|
:extout
|
|
|
|
echo>> ~tmp~.mak EXTOUT=%2
|
|
|
|
set EXTOUT=%2
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
goto :loop
|
|
|
|
:baseruby
|
|
|
|
echo>> ~tmp~.mak BASERUBY=%2
|
|
|
|
set BASERUBY=%2
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
goto :loop
|
|
|
|
:help
|
|
|
|
echo Configuration:
|
|
|
|
echo --help display this help
|
2009-02-04 20:31:01 +03:00
|
|
|
echo --srcdir=DIR find the sources in DIR [configure dir or ..]
|
2009-01-16 05:51:22 +03:00
|
|
|
echo System types:
|
|
|
|
echo --target=TARGET configure for TARGET [arm-symbianelf]
|
|
|
|
echo Optional Package:
|
|
|
|
echo --with-baseruby=RUBY use RUBY as baseruby [ruby]
|
|
|
|
echo --with-static-linked-ext link external modules statically
|
|
|
|
del ~tmp~.mak > nul
|
|
|
|
goto :exit
|
|
|
|
:end
|
|
|
|
|
|
|
|
echo>> ~ver~.mak CC = arm-none-symbianelf-gcc
|
|
|
|
echo>> ~ver~.mak CPP = $(CC) -E
|
|
|
|
if "%srcdir%" == "" echo>> ~ver~.mak srcdir=..
|
|
|
|
echo>> ~ver~.mak all:
|
|
|
|
echo>> ~ver~.mak ^ @echo^> ~tmp~.c #define RUBY_REVISION 0
|
2010-11-13 22:21:12 +03:00
|
|
|
echo>> ~ver~.mak ^ @echo^>^> ~tmp~.c #define RUBY_LIB_VERSION_STYLE 3
|
2009-01-16 05:51:22 +03:00
|
|
|
echo>> ~ver~.mak ^ @echo^>^> ~tmp~.c #include "version.h"
|
2010-11-13 22:21:12 +03:00
|
|
|
echo>> ~ver~.mak ^ @echo^>^> ~tmp~.c MAJOR = RUBY_API_VERSION_MAJOR
|
|
|
|
echo>> ~ver~.mak ^ @echo^>^> ~tmp~.c MINOR = RUBY_API_VERSION_MINOR
|
|
|
|
echo>> ~ver~.mak ^ @echo^>^> ~tmp~.c TEENY = RUBY_API_VERSION_TEENY
|
2009-09-13 21:36:44 +04:00
|
|
|
echo>> ~ver~.mak ^ @$(CPP) -I$(srcdir) -I$(srcdir)\include ~tmp~.c ^| find "=" ^>^>~tmp~.mak
|
2009-01-16 05:51:22 +03:00
|
|
|
echo>> ~ver~.mak ^ @del /Q ~tmp~.c
|
|
|
|
|
|
|
|
make -f ~ver~.mak
|
|
|
|
del /Q ~ver~.mak
|
|
|
|
|
|
|
|
:: Defaults
|
|
|
|
if "%srcdir%" == "" echo>> ~tmp~.mak srcdir=..
|
|
|
|
if "%arch%" == "" echo>> ~tmp~.mak arch=arm-symbianelf
|
|
|
|
if "%EXTOUT%" == "" echo>> ~tmp~.mak EXTOUT=$(srcdir)/.ext
|
|
|
|
if "%BASERUBY%" == "" echo>> ~tmp~.mak BASERUBY=ruby
|
|
|
|
::
|
|
|
|
|
|
|
|
echo>> ~tmp~.mak arch_hdrdir = $(EXTOUT)/include/$(arch)
|
|
|
|
echo>> ~tmp~.mak hdrdir = $(srcdir)/include
|
|
|
|
|
|
|
|
echo>> ~tmp~.mak ifndef EXTSTATIC
|
2009-02-04 20:31:01 +03:00
|
|
|
echo>> ~tmp~.mak EXT_LIST=stringio bigdecimal zlib
|
2009-01-16 05:51:22 +03:00
|
|
|
echo>> ~tmp~.mak endif
|
|
|
|
|
|
|
|
echo>> ~tmp~.mak all:
|
|
|
|
echo>> ~tmp~.mak ^ @if not exist $(subst /,\,$(arch_hdrdir))\ruby\nul md $(subst /,\,$(arch_hdrdir)\ruby)
|
|
|
|
echo>> ~tmp~.mak ^ $(call config_h,$(subst /,\,$(arch_hdrdir))\ruby\config.h)
|
2009-02-04 20:31:01 +03:00
|
|
|
echo>> ~tmp~.mak ^ @if not exist group\nul md group
|
|
|
|
echo>> ~tmp~.mak ^ $(call pre_build_mk,pre-build.mk)
|
|
|
|
echo>> ~tmp~.mak ^ $(call bld_inf,group\bld.inf)
|
|
|
|
echo>> ~tmp~.mak ^ $(call ruby_mmp,group\ruby.mmp,64000,2000000,16000000)
|
2009-01-16 05:51:22 +03:00
|
|
|
echo>> ~tmp~.mak ifndef EXTSTATIC
|
2009-02-04 20:31:01 +03:00
|
|
|
echo>> ~tmp~.mak ^ $(call ext_mmp,group\,stringio,$(STRINGIO_UID))
|
|
|
|
echo>> ~tmp~.mak ^ $(call ext_mmp,group\,bigdecimal,$(BIGDECIMAL_UID),,libm.lib)
|
|
|
|
echo>> ~tmp~.mak ^ $(call ext_mmp,group\,zlib,$(ZLIB_UID),,libz.lib)
|
|
|
|
echo>> ~tmp~.mak endif
|
|
|
|
echo>> ~tmp~.mak ^ @if not exist sis\nul md sis
|
|
|
|
echo>> ~tmp~.mak ^ $(call ruby_pkg,sis\ruby.pkg)
|
|
|
|
echo>> ~tmp~.mak ifndef EXTSTATIC
|
2010-03-14 19:27:02 +03:00
|
|
|
echo>> ~tmp~.mak ^ $(call core_ext_pkg,sis\ruby_core_ext.pkg)
|
|
|
|
echo>> ~tmp~.mak ^ $(call ext_bigdecimal,sis\ruby_core_ext.pkg)
|
|
|
|
echo>> ~tmp~.mak ^ $(call ext_pkg,sis\ruby_core_ext.pkg,stringio)
|
|
|
|
echo>> ~tmp~.mak ^ $(call ext_pkg,sis\ruby_core_ext.pkg,zlib)
|
2009-02-04 20:31:01 +03:00
|
|
|
echo>> ~tmp~.mak ^ @if not exist eabi\nul md eabi
|
|
|
|
echo>> ~tmp~.mak ^ $(call ext_def,eabi\,stringio)
|
|
|
|
echo>> ~tmp~.mak ^ $(call ext_def,eabi\,bigdecimal)
|
|
|
|
echo>> ~tmp~.mak ^ $(call ext_def,eabi\,zlib)
|
2009-01-16 05:51:22 +03:00
|
|
|
echo>> ~tmp~.mak endif
|
|
|
|
|
|
|
|
echo>> ~tmp~.mak include setup
|
|
|
|
|
|
|
|
make -f ~tmp~.mak
|
|
|
|
del /Q ~tmp~.mak
|
|
|
|
|
|
|
|
:exit
|