summaryrefslogtreecommitdiff
path: root/win32/Makefile
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-13 05:45:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-13 05:45:20 +0000
commit65a5162550f58047974793cdc8067a970b2435c0 (patch)
tree082bb7d5568f3b2e36e3fe166e9f3039394fcf44 /win32/Makefile
parentfcd020c83028f5610d382e85a2df00223e12bd7e (diff)
1.4.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/Makefile')
-rw-r--r--win32/Makefile265
1 files changed, 154 insertions, 111 deletions
diff --git a/win32/Makefile b/win32/Makefile
index 152bdc8..5275069 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -7,34 +7,36 @@ VPATH = .:./missing
CC = cl
YACC = byacc
-RANLIB =
-AR =
-INSTALL = ginstall -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
PURIFY =
+AUTOCONF = autoconf
-CFLAGS = -nologo -DNT=1 -Ox -I. -I./missing
-LDFLAGS = $(CFLAGS) -Fm
-#CFLAGS = -nologo -DNT=1 -Zi -MD
-#LDFLAGS = $(CFLAGS) -Fm -MD
-LIBS = $(EXTLIBS) advapi32.lib wsock32.lib
-MISSING = crypt.obj alloca.obj win32.obj
-
prefix =
-binprefix =
-exec_prefix =
-bindir =
-libdir =
+CFLAGS = -nologo -DNT=1 -Ox -I. -I./missing
+LDFLAGS = $(CFLAGS) -Fm
+#CFLAGS = -nologo -DNT=1 -Zi -I. -I./missing
+#LDFLAGS = $(CFLAGS) -Fm
+XLDFLAGS =
+#EXTLIBS =
+LIBS = advapi32.lib wsock32.lib $(EXTLIBS)
+MISSING = crypt.obj alloca.obj win32.obj fnmatch.obj isinf.obj isnan.obj
+LDSHARED =
+DLDFLAGS =
+SOLIBS =
+
+RUBY_INSTALL_NAME=ruby
+EXEEXT = .exe
+PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
STACK = 0x200000
ORGLIBPATH = $(LIB)
#### End of system configuration section. ####
-
-LIBRUBY = libruby.lib
+LIBRUBY_A = libruby.lib
+LIBRUBY_SO = rubymw.dll
+LIBRUBY = $(LIBRUBY_SO)
+LIBRUBYARG = rubymw.lib
EXTOBJS = dmyext.obj
@@ -50,18 +52,17 @@ OBJS = array.obj \
error.obj \
eval.obj \
file.obj \
- fnmatch.obj \
gc.obj \
- glob.obj \
hash.obj \
inits.obj \
io.obj \
- math.obj \
marshal.obj \
+ math.obj \
numeric.obj \
object.obj \
pack.obj \
parse.obj \
+ prec.obj \
process.obj \
random.obj \
range.obj \
@@ -79,65 +80,71 @@ OBJS = array.obj \
version.obj \
$(MISSING)
-all: miniruby.exe ext/Setup $(MISCLIBS)
- cd ext
+all: miniruby$(EXEEXT) rbconfig.rb ext/extmk.rb ext/Setup.nt rubymw.lib $(MISCLIBS)
set LIB=..\..\win32;$(ORGLIBPATH)
- ..\miniruby .\extmk.rb static
-# ..\miniruby .\extmk.rb
- cd ..
+ @.\miniruby$(EXEEXT) -Xext extmk.rb
-miniruby.exe: $(OBJS) $(MAINOBJ) $(EXTOBJS)
+ext/extmk.rb: ext/extmk.rb.in rbconfig.rb
+ @echo Creating ext/extmk.rb
+ @.\miniruby$(EXEEXT) -Xext mswin32_extmk.rb
+
+miniruby$(EXEEXT): $(OBJS) $(MAINOBJ) $(EXTOBJS)
@echo $(EXTOBJS)
@echo $(LIBS)
- @rm -f miniruby.exe
- $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(LIBS) -o miniruby.exe
+ @rm -f $@
+ $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(OBJS) $(LIBS) -o $@
+
+$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(LIBRUBY_SO)
+ @rm -f $@
+ $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) -o $@ $(LIBRUBYARG) -link /STACK:$(STACK)
+
+$(LIBRUBY_A): $(OBJS)
+ lib -nologo /OUT:$@ $(OBJS)
-ruby.exe: $(LIBRUBY) $(MAINOBJ) $(EXTOBJS) rubymw.dll
- @rm -f ruby.exe
-# $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY) $(LIBS) -o ruby.exe
- $(CC) $(LDFLAGS) $(MAINOBJ) -o ruby.exe rubymw.lib -link /STACK:$(STACK)
+rubymw.lib: ruby.def
+ lib -nologo /OUT:$@ /DEF:ruby.def
-rubymw.dll: $(LIBRUBY) $(EXTOBJS)
+$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS)
set LIB=.\win32;$(ORGLIBPATH)
- @rm -f rubymw.dll
- $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY) $(LIBS) -o rubymw.dll -link /DLL /DEF:ruby.def
+ @rm -f $@
+ $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY_A) $(LIBS) -o $@ -link /DLL /DEF:ruby.def
@mv rubymw.map rubydll.map
-$(LIBRUBY): $(OBJS)
- lib /OUT:$(LIBRUBY) $(OBJS)
-
-install:; $(INSTALL_PROGRAM) ruby.exe $(bindir)/ruby.exe
- @-strip $(bindir)/ruby
- @test -d $(libdir) || mkdir $(libdir)
- cd ext; ../miniruby ./extmk.rb install
- @for rb in `grep '^lib/' MANIFEST`; do \
- $(INSTALL_DATA) $$rb $(libdir); \
- done
-
-clean:; @rm -f $(OBJS) $(LIBRUBY) main.obj dmyext.obj *.pdb *.map *.exp
- @rm -f ext/extinit.c ext/extinit.obj
- cd ext
- ..\miniruby .\extmk.rb clean
- cd ..
-
-realclean: clean
- @rm -f Makefile ext/extmk.rb
- @rm -f config.cache config.h config.log config.status
- @rm -f core ruby miniruby *~
-
-test:; @-./ruby sample/test.rb > ./ruby_test 2>&1; \
- if grep '^end of test' ./ruby_test > /dev/null; then \
- echo "test succeeded"; \
- else \
- grep '^sample/test.rb' ./ruby_test; \
- grep '^not' ./ruby_test; \
- echo "test failed";\
- fi;\
- rm -f ./ruby_test
+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
+ @-.\miniruby$(EXEEXT) -Xext extmk.rb clean
+
+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 rubymw.* ruby.def
+ @rm -f $(PROGRAM) miniruby$(EXEEXT)
+
+realclean: distclean
+ @rm -f parse.c
+ @rm -f lex.c
+
+test: miniruby$(EXEEXT)
+ @.\miniruby$(EXEEXT) $(srcdir)/rubytest.rb
+
+rbconfig.rb: miniruby$(EXEEXT)
+ @.\miniruby$(EXEEXT) $(srcdir)/mkconfig.rb rbconfig.rb
+
+config.status: $(srcdir)/configure
+# $(SHELL) ./config.status --recheck
.c.obj:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
+parse.c: parse.y
+ $(YACC) $(YFLAGS) parse.y
+ sed -e "s!^extern char \*getenv();!/* & */!" y.tab.c > parse.c
+ @rm y.tab.c
+
alloca.obj: missing/alloca.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/alloca.c
@@ -147,84 +154,120 @@ crypt.obj: missing/crypt.c
dup2.obj: missing/dup2.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/dup2.c
+finite.obj: missing/finite.c
+ $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/finite.c
+
flock.obj: missing/flock.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/flock.c
+isinf.obj: missing/isinf.c
+ $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/isinf.c
+
+isnan.obj: missing/isnan.c
+ $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/isnan.c
+
+fnmatch.obj: missing/fnmatch.c
+ $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/fnmatch.c
+
+memcmp.obj: missing/memcmp.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/memcmp.c
+
memmove.obj: missing/memmove.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/memmove.c
mkdir.obj: missing/mkdir.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/mkdir.c
-strerror.obj: missing/strerror.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strerror.c
+vsnprintf.obj: missing/vsnprintf.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/vsnprintf.c
+
+strcasecmp.obj: missing/strcasecmp.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strcasecmp.c
+
+strncasecmp.obj: missing/strncasecmp.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strncasecmp.c
+
+strchr.obj: missing/strchr.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strchr.c
strdup.obj: missing/strdup.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strdup.c
+strerror.obj: missing/strerror.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strerror.c
+
strftime.obj: missing/strftime.c
$(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/strftime.c
strstr.obj: missing/strstr.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strstr.c
+strtod.obj: missing/strtod.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtod.c
+
strtol.obj: missing/strtol.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtol.c
strtoul.obj: missing/strtoul.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtoul.c
+nt.obj: missing/nt.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/nt.c
+
+x68.obj: missing/x68.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/x68.c
+
+os2.obj: missing/os2.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/os2.c
+
+dl_os2.obj: missing/dl_os2.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/dl_os2.c
+
# when I use -I., there is confliction at "OpenFile"
# so, set . into environment varible "include"
win32.obj: win32/win32.c
@set include=$(INCLUDE);.
$(CC) $(CFLAGS) $(CPPFLAGS) -c win32/win32.c
-parse.c: parse.y
- $(YACC) $(YFLAGS) parse.y
- sed -e "s!^extern char \*getenv();!/* & */!" y.tab.c > parse.c
- @rm y.tab.c
-
# Prevent GNU make v3 from overflowing arg limit on SysV.
.NOEXPORT:
###
-parse.obj : parse.y ruby.h defines.h config.h env.h node.h st.h regex.h
+parse.obj: parse.y ruby.h config.h defines.h intern.h env.h node.h st.h regex.h util.h lex.c
###
-array.obj: array.c ruby.h config.h defines.h
-bignum.obj: bignum.c ruby.h config.h defines.h
-class.obj: class.c ruby.h config.h defines.h node.h st.h
-compar.obj: compar.c ruby.h config.h defines.h
-dir.obj: dir.c ruby.h config.h defines.h
-dln.obj: dln.c config.h defines.h dln.h st.h
+array.obj: array.c ruby.h config.h defines.h intern.h
+bignum.obj: bignum.c ruby.h config.h defines.h intern.h
+class.obj: class.c ruby.h config.h defines.h intern.h node.h st.h
+compar.obj: compar.c ruby.h config.h defines.h intern.h
+dir.obj: dir.c ruby.h config.h defines.h intern.h
+dln.obj: dln.c config.h defines.h dln.h
dmyext.obj: dmyext.c
-enum.obj: enum.c ruby.h config.h defines.h
-error.obj: error.c ruby.h config.h defines.h env.h
-eval.obj: eval.c ruby.h config.h defines.h env.h node.h rubysig.h st.h dln.h
-file.obj: file.c ruby.h config.h defines.h rubyio.h rubysig.h
-fnmatch.obj: fnmatch.c config.h fnmatch.h
-gc.obj: gc.c ruby.h config.h defines.h env.h rubysig.h st.h node.h re.h regex.h
-glob.obj: glob.c config.h fnmatch.h
-hash.obj: hash.c ruby.h config.h defines.h st.h
-inits.obj: inits.c ruby.h config.h defines.h
-io.obj: io.c ruby.h config.h defines.h rubyio.h rubysig.h
-main.obj: main.c
-math.obj: math.c ruby.h config.h defines.h
-numeric.obj: numeric.c ruby.h config.h defines.h
-object.obj: object.c ruby.h config.h defines.h st.h
-pack.obj: pack.c ruby.h config.h defines.h
-process.obj: process.c ruby.h config.h defines.h rubysig.h st.h
-random.obj: random.c ruby.h config.h defines.h
-range.obj: range.c ruby.h config.h defines.h
-re.obj: re.c ruby.h config.h defines.h re.h regex.h
-regex.obj: regex.c config.h defines.h regex.h util.h
-ruby.obj: ruby.c ruby.h config.h defines.h re.h regex.h dln.h
-signal.obj: signal.c ruby.h config.h defines.h rubysig.h
-sprintf.obj: sprintf.c ruby.h config.h defines.h
+enum.obj: enum.c ruby.h config.h defines.h intern.h
+error.obj: error.c ruby.h config.h defines.h intern.h env.h
+eval.obj: eval.c ruby.h config.h defines.h intern.h node.h env.h rubysig.h st.h dln.h
+file.obj: file.c ruby.h config.h defines.h intern.h rubyio.h rubysig.h
+gc.obj: gc.c ruby.h config.h defines.h intern.h rubysig.h st.h node.h env.h re.h regex.h
+hash.obj: hash.c ruby.h config.h defines.h intern.h st.h rubysig.h util.h
+inits.obj: inits.c ruby.h config.h defines.h intern.h
+io.obj: io.c ruby.h config.h defines.h intern.h rubyio.h rubysig.h
+main.obj: main.c ruby.h config.h defines.h intern.h
+marshal.obj: marshal.c ruby.h config.h defines.h intern.h rubyio.h st.h
+prec.obj: prec.c ruby.h config.h defines.h intern.h
+math.obj: math.c ruby.h config.h defines.h intern.h
+numeric.obj: numeric.c ruby.h config.h defines.h intern.h
+object.obj: object.c ruby.h config.h defines.h intern.h st.h
+pack.obj: pack.c ruby.h config.h defines.h intern.h
+process.obj: process.c ruby.h config.h defines.h intern.h rubysig.h st.h
+random.obj: random.c ruby.h config.h defines.h intern.h
+range.obj: range.c ruby.h config.h defines.h intern.h
+re.obj: re.c ruby.h config.h defines.h intern.h re.h regex.h
+regex.obj: regex.c config.h regex.h util.h
+ruby.obj: ruby.c ruby.h config.h defines.h intern.h dln.h util.h
+signal.obj: signal.c ruby.h config.h defines.h intern.h rubysig.h
+sprintf.obj: sprintf.c ruby.h config.h defines.h intern.h
st.obj: st.c config.h st.h
-string.obj: string.c ruby.h config.h defines.h re.h regex.h
-struct.obj: struct.c ruby.h config.h defines.h
-time.obj: time.c ruby.h config.h defines.h
-util.obj: util.c defines.h config.h util.h
-variable.obj: variable.c ruby.h config.h defines.h env.h st.h
-version.obj: version.c ruby.h config.h defines.h version.h
-director.obj : director.c dir.h
+string.obj: string.c ruby.h config.h defines.h intern.h re.h regex.h
+struct.obj: struct.c ruby.h config.h defines.h intern.h
+time.obj: time.c ruby.h config.h defines.h intern.h
+util.obj: util.c ruby.h config.h defines.h intern.h util.h
+variable.obj: variable.c ruby.h config.h defines.h intern.h env.h node.h st.h
+version.obj: version.c ruby.h config.h defines.h intern.h version.h