summaryrefslogtreecommitdiff
path: root/win32/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'win32/Makefile')
-rw-r--r--win32/Makefile180
1 files changed, 111 insertions, 69 deletions
diff --git a/win32/Makefile b/win32/Makefile
index 4bf3d9b..6477476 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -14,10 +14,10 @@ AUTOCONF = autoconf
prefix =
CFLAGS = -nologo -DNT=1 -Ox -I. -I./missing
LDFLAGS = $(CFLAGS) -Fm
-#CFLAGS = -nologo -DNT=1 -Zi -MD
-#LDFLAGS = $(CFLAGS) -Fm -MD
+#CFLAGS = -nologo -DNT=1 -Zi -I. -I./missing
+#LDFLAGS = $(CFLAGS) -Fm
XLDFLAGS =
-EXTLIBS =
+#EXTLIBS =
LIBS = advapi32.lib wsock32.lib $(EXTLIBS)
MISSING = crypt.obj alloca.obj win32.obj fnmatch.obj isinf.obj isnan.obj
LDSHARED =
@@ -33,8 +33,10 @@ 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
@@ -54,8 +56,8 @@ OBJS = array.obj \
hash.obj \
inits.obj \
io.obj \
- math.obj \
marshal.obj \
+ math.obj \
numeric.obj \
object.obj \
pack.obj \
@@ -78,41 +80,48 @@ OBJS = array.obj \
version.obj \
$(MISSING)
-all: miniruby$(EXEEXT) rbconfig.rb ext/Setup $(MISCLIBS)
+all: miniruby$(EXEEXT) rbconfig.rb ext/extmk.rb ext/Setup.nt rubymw.lib $(MISCLIBS)
set LIB=..\..\win32;$(ORGLIBPATH)
@.\miniruby$(EXEEXT) -Xext extmk.rb static
+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$(EXEEXT)
+ @rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(OBJS) $(LIBS) -o $@
-$(PROGRAM): $(LIBRUBY) $(MAINOBJ) rubymw.dll
- @rm -f $(PROGRAM)
- $(CC) $(LDFLAGS) $(MAINOBJ) -o $(PROGRAM) rubymw.lib -link /STACK:$(STACK)
+$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(LIBRUBY_SO)
+ @rm -f $@
+ $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) -o $@ $(LIBRUBYARG) -link /STACK:$(STACK)
+
+$(LIBRUBY_A): $(OBJS)
+ lib -nologo /OUT:$@ $(OBJS)
-rubymw.dll: $(LIBRUBY) $(EXTOBJS)
+rubymw.lib: ruby.def
+ lib -nologo /OUT:$@ /DEF:ruby.def
+
+$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS)
set LIB=.\win32;$(ORGLIBPATH)
- @rm -f rubymw.dll
- $(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: rbconfig.rb
.\miniruby.exe $(srcdir)/instruby.rb $(DESTDIR)
-clean:; @rm -f $(OBJS) $(LIBRUBY) rbconfig.rb
+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
+ @-.\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 rubymw.* ruby.def
+ @rm -f *.map *.pdb *.ilk rubymw.* ruby.def
@rm -f $(PROGRAM) miniruby$(EXEEXT)
realclean: distclean
@@ -131,6 +140,11 @@ config.status: $(srcdir)/configure
.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
@@ -140,41 +154,74 @@ 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
-fnmatch.obj: missing/fnmatch.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/fnmatch.c
+nt.obj: missing/nt.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/nt.c
-isinf.obj: missing/isinf.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/isinf.c
+x68.obj: missing/x68.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/x68.c
-isnan.obj: missing/isnan.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/isnan.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"
@@ -182,50 +229,45 @@ 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
-gc.obj: gc.c ruby.h config.h defines.h env.h rubysig.h st.h node.h re.h regex.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
-prec.obj: prec.c ruby.h config.h defines.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