2000-12-06 12:10:17 +03:00
|
|
|
SHELL = $(COMSPEC)
|
2000-08-03 13:55:54 +04:00
|
|
|
|
|
|
|
#### 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
|
|
|
|
!ifndef RUBY_SO_NAME
|
|
|
|
RUBY_SO_NAME = rubymw
|
|
|
|
!endif
|
|
|
|
###############
|
|
|
|
|
|
|
|
VPATH = $(srcdir):$(srcdir)/missing
|
2000-12-22 06:22:25 +03:00
|
|
|
.SUFFIXES: .y
|
2000-08-03 13:55:54 +04:00
|
|
|
|
|
|
|
CC = cl
|
|
|
|
YACC = byacc
|
|
|
|
PURIFY =
|
|
|
|
AUTOCONF = autoconf
|
|
|
|
|
|
|
|
|
|
|
|
prefix = /usr
|
2001-03-28 04:54:48 +04:00
|
|
|
CFLAGS = -nologo -DNT=1 -Zi -MD -O2b2xg- -G5
|
2000-08-03 13:55:54 +04:00
|
|
|
CPPFLAGS = -I$(srcdir) -I$(srcdir)/missing
|
|
|
|
LDFLAGS = $(CFLAGS) -Fm
|
|
|
|
XLDFLAGS =
|
|
|
|
#EXTLIBS =
|
2000-08-09 08:32:24 +04:00
|
|
|
LIBS = user32.lib advapi32.lib wsock32.lib $(EXTLIBS)
|
2001-04-14 08:38:19 +04:00
|
|
|
MISSING = crypt.obj win32.obj isinf.obj isnan.obj
|
2000-08-03 13:55:54 +04:00
|
|
|
LDSHARED =
|
|
|
|
DLDFLAGS =
|
|
|
|
SOLIBS =
|
|
|
|
RFLAGS = -r
|
|
|
|
|
|
|
|
EXEEXT = .exe
|
|
|
|
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
|
|
|
|
WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
|
|
|
|
RUBYDEF = $(RUBY_SO_NAME).def
|
|
|
|
|
|
|
|
STACK = 0x2000000
|
|
|
|
ORGLIBPATH = $(LIB)
|
|
|
|
|
|
|
|
#### End of system configuration section. ####
|
|
|
|
|
|
|
|
LIBRUBY_A = lib$(RUBY_INSTALL_NAME).lib
|
|
|
|
LIBRUBY_SO = $(RUBY_SO_NAME).dll
|
|
|
|
LIBRUBY = $(RUBY_SO_NAME).lib
|
|
|
|
LIBRUBYARG = $(LIBRUBY)
|
|
|
|
|
|
|
|
EXTOBJS = dmyext.obj
|
|
|
|
|
|
|
|
MAINOBJ = main.obj
|
|
|
|
WINMAINOBJ = winmain.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)
|
|
|
|
|
|
|
|
all: miniruby$(EXEEXT) rbconfig.rb ext/extmk.rb \
|
|
|
|
$(LIBRUBY) $(MISCLIBS)
|
2000-12-22 12:00:23 +03:00
|
|
|
set LIB=../..;$(ORGLIBPATH)
|
2000-10-06 10:13:52 +04:00
|
|
|
@.\miniruby$(EXEEXT) -Cext extmk.rb
|
2000-08-03 13:55:54 +04:00
|
|
|
|
|
|
|
ruby: $(PROGRAM)
|
|
|
|
rubyw: $(WPROGRAM)
|
|
|
|
lib: $(LIBRUBY)
|
|
|
|
dll: $(LIBRUBY_SO)
|
|
|
|
|
|
|
|
ext/extmk.rb: $(srcdir)/ext/extmk.rb.in config.status
|
|
|
|
@echo Creating ext/extmk.rb
|
|
|
|
@.\miniruby$(EXEEXT) $(srcdir)/ext/configsub.rb \
|
|
|
|
-srcdir=$(srcdir) \
|
|
|
|
-install_name=$(RUBY_INSTALL_NAME) \
|
|
|
|
-so_name=$(RUBY_SO_NAME) \
|
|
|
|
-output=$@ $(srcdir)/ext/extmk.rb.in
|
|
|
|
|
|
|
|
miniruby$(EXEEXT): $(OBJS) $(MAINOBJ) $(EXTOBJS)
|
|
|
|
@echo $(EXTOBJS)
|
|
|
|
@echo $(LIBS)
|
|
|
|
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(OBJS) $(LIBS) -o $@
|
|
|
|
|
|
|
|
$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $*.res
|
|
|
|
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $*.res \
|
|
|
|
-o $@ $(LIBRUBYARG) -link /STACK:$(STACK)
|
|
|
|
|
|
|
|
$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
|
|
|
|
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(WINMAINOBJ) $*.res \
|
|
|
|
-o $@ $(LIBRUBYARG) -link /STACK:$(STACK) /SUBSYSTEM:Windows
|
|
|
|
|
|
|
|
$(LIBRUBY_A): $(OBJS) dmyext.obj
|
|
|
|
lib -nologo /OUT:$@ $(OBJS) dmyext.obj
|
|
|
|
|
|
|
|
$(LIBRUBY): $(RUBYDEF)
|
|
|
|
lib -nologo /OUT:$@ /DEF:$(RUBYDEF)
|
|
|
|
|
|
|
|
$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS) $(RUBYDEF) $@.res
|
|
|
|
set LIB=./win32;$(ORGLIBPATH)
|
|
|
|
$(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY_A) $@.res $(LIBS) \
|
|
|
|
-o $@ -link /DLL /DEF:$(RUBYDEF)
|
|
|
|
|
|
|
|
!if "$(LIBRUBY_SO)" != "rubymw.dll"
|
|
|
|
rubymw.dll: $(LIBRUBY)
|
|
|
|
$(CC) -nologo $(EXTOBJS) $(LIBRUBY) -o $@ -link /DLL /DEF:$(RUBYDEF)
|
|
|
|
!endif
|
|
|
|
|
|
|
|
$(RUBYDEF): $(LIBRUBY_A) miniruby$(EXEEXT)
|
|
|
|
.\miniruby$(EXEEXT) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
|
|
|
|
|
|
|
|
install: rbconfig.rb
|
|
|
|
.\miniruby.exe $(srcdir)/instruby.rb $(DESTDIR)
|
|
|
|
|
|
|
|
clean:; @rm -f $(OBJS) $(LIBRUBY_A) $(MAINOBJ) rbconfig.rb
|
|
|
|
@rm -f ext/extinit.c ext/extinit.obj ext/vc*.pdb *.obj *.res
|
2000-10-06 10:13:52 +04:00
|
|
|
@-.\miniruby$(EXEEXT) -Cext extmk.rb clean
|
2000-08-03 13:55:54 +04:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
@rm -f Makefile ext/extmk.rb config.h
|
|
|
|
@rm -f ext/config.cache config.cache config.log config.status
|
|
|
|
@rm -f *~ core *.core gmon.out y.tab.c y.output ruby.imp
|
|
|
|
@rm -f *.map *.pdb *.ilk *.exp $(RUBYDEF)
|
|
|
|
@rm -f $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(LIBRUBY_SO).rc
|
|
|
|
@rm -f $(PROGRAM) $(WPROGRAM) $(LIBRUBY_SO) $(LIBRUBY) miniruby$(EXEEXT)
|
|
|
|
|
|
|
|
realclean: distclean
|
|
|
|
@rm -f parse.c
|
|
|
|
@rm -f lex.c
|
|
|
|
|
|
|
|
test: miniruby$(EXEEXT)
|
|
|
|
@.\miniruby$(EXEEXT) $(srcdir)/rubytest.rb
|
|
|
|
|
|
|
|
rbconfig.rb: miniruby$(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 $(LIBRUBY_SO).rc: rbconfig.rb
|
|
|
|
@.\miniruby$(EXEEXT) $(srcdir)/win32/resource.rb \
|
|
|
|
-ruby_name=$(RUBY_INSTALL_NAME) \
|
|
|
|
-rubyw_name=$(RUBYW_INSTALL_NAME) \
|
|
|
|
-so_name=$(LIBRUBY_SO) \
|
|
|
|
. $(icondirs) $(srcdir)/win32
|
|
|
|
|
|
|
|
#config.status: $(srcdir)/configure
|
|
|
|
# $(SHELL) ./config.status --recheck
|
|
|
|
|
2000-12-22 06:22:25 +03:00
|
|
|
{$(srcdir)/missing}.c.obj:
|
|
|
|
$(CC) $(CFLAGS) -I. -I$(<D) $(CPPFLAGS) -c $(<:/=\)
|
|
|
|
{$(srcdir)/win32}.c.obj:
|
|
|
|
$(CC) $(CFLAGS) -I. -I$(<D) $(CPPFLAGS) -c $(<:/=\)
|
|
|
|
{$(srcdir)}.c.obj:
|
|
|
|
$(CC) $(CFLAGS) -I. -I$(<D) $(CPPFLAGS) -c $(<:/=\)
|
2000-08-03 13:55:54 +04:00
|
|
|
.c.obj:
|
2000-12-22 06:22:25 +03:00
|
|
|
$(CC) $(CFLAGS) -I. $(CPPFLAGS) -c $(<:/=\)
|
2000-08-03 13:55:54 +04:00
|
|
|
|
|
|
|
.rc.res:
|
|
|
|
$(RC) -I. -I$(<D) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $<
|
|
|
|
|
2000-12-22 06:22:25 +03:00
|
|
|
{$(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
|
2000-08-03 13:55:54 +04:00
|
|
|
|
|
|
|
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:
|
|
|
|
###
|
2000-12-22 06:22:25 +03:00
|
|
|
parse.obj: {$(srcdir)}parse.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/env.h $(srcdir)/node.h $(srcdir)/st.h $(srcdir)/regex.h $(srcdir)/util.h $(srcdir)/lex.c
|
2000-08-03 13:55:54 +04:00
|
|
|
###
|
|
|
|
array.obj: $(srcdir)/array.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
bignum.obj: $(srcdir)/bignum.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
class.obj: $(srcdir)/class.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/node.h $(srcdir)/st.h
|
|
|
|
compar.obj: $(srcdir)/compar.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
dir.obj: $(srcdir)/dir.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
dln.obj: $(srcdir)/dln.c config.h $(srcdir)/defines.h $(srcdir)/dln.h
|
|
|
|
dmyext.obj: $(srcdir)/dmyext.c
|
|
|
|
enum.obj: $(srcdir)/enum.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
error.obj: $(srcdir)/error.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/env.h
|
|
|
|
eval.obj: $(srcdir)/eval.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/node.h $(srcdir)/env.h $(srcdir)/rubysig.h $(srcdir)/st.h $(srcdir)/dln.h
|
|
|
|
file.obj: $(srcdir)/file.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/rubyio.h $(srcdir)/rubysig.h
|
|
|
|
gc.obj: $(srcdir)/gc.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/rubysig.h $(srcdir)/st.h $(srcdir)/node.h $(srcdir)/env.h $(srcdir)/re.h $(srcdir)/regex.h
|
|
|
|
hash.obj: $(srcdir)/hash.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/st.h $(srcdir)/rubysig.h $(srcdir)/util.h
|
|
|
|
inits.obj: $(srcdir)/inits.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
io.obj: $(srcdir)/io.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/rubyio.h $(srcdir)/rubysig.h $(srcdir)/env.h
|
|
|
|
main.obj: $(srcdir)/main.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
marshal.obj: $(srcdir)/marshal.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/rubyio.h $(srcdir)/st.h
|
|
|
|
prec.obj: $(srcdir)/prec.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
math.obj: $(srcdir)/math.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
numeric.obj: $(srcdir)/numeric.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
object.obj: $(srcdir)/object.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/st.h
|
|
|
|
pack.obj: $(srcdir)/pack.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
process.obj: $(srcdir)/process.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/rubysig.h $(srcdir)/st.h
|
|
|
|
random.obj: $(srcdir)/random.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
range.obj: $(srcdir)/range.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
re.obj: $(srcdir)/re.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/re.h $(srcdir)/regex.h
|
|
|
|
regex.obj: $(srcdir)/regex.c config.h $(srcdir)/regex.h $(srcdir)/util.h
|
|
|
|
ruby.obj: $(srcdir)/ruby.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/dln.h $(srcdir)/util.h
|
|
|
|
signal.obj: $(srcdir)/signal.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/rubysig.h
|
|
|
|
sprintf.obj: $(srcdir)/sprintf.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.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)/re.h $(srcdir)/regex.h
|
|
|
|
struct.obj: $(srcdir)/struct.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
time.obj: $(srcdir)/time.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h
|
|
|
|
util.obj: $(srcdir)/util.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/util.h
|
|
|
|
variable.obj: $(srcdir)/variable.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/env.h $(srcdir)/node.h $(srcdir)/st.h
|
|
|
|
version.obj: $(srcdir)/version.c $(srcdir)/ruby.h config.h $(srcdir)/defines.h $(srcdir)/intern.h $(srcdir)/version.h
|