Merge r21-4-11-chise-0_20-=ucs.
[chise/xemacs-chise.git.1] / netinstall / Makefile.in.in
index 59dfb83..694e145 100644 (file)
@@ -13,8 +13,6 @@
 ##
 ## Makefile for Cygwin installer
 
-## FIXME: integrate autoload.c so that wininet doesn't have to be linked.
-
 ## For performance and consistency, no built-in rules
 .SUFFIXES:
 .SUFFIXES: .c .cc .h .o
@@ -42,6 +40,9 @@ INSTALLABLES=setup
 vpath %.c @srcdir@
 vpath %.cc @srcdir@
 vpath %.h @srcdir@
+vpath %.l @srcdir@
+vpath %.y @srcdir@
+vpath %.rc @srcdir@
 #else
 VPATH=@srcdir@
 #endif
@@ -60,6 +61,8 @@ archlibdir=@archlibdir@
 configuration=@configuration@
 moduledir=@moduledir@
 sitemoduledir=@sitemoduledir@
+extra_includes=@extra_includes@
+blddir=@blddir@
 
 ## ==================== Utility Programs for the Build =================
 
@@ -78,7 +81,8 @@ program_transform_name = @program_transform_name@
 CC             = @CC@
 CC_FOR_TARGET  = $(CC)
 
-LOCALCFLAGS = $(CFLAGS) -DMINGW
+## -O3 has problems so fix this locally
+LOCALCFLAGS = $(CFLAGS) -O2 -DMINGW $(extra_includes)
 CXXFLAGS       = $(LOCALCFLAGS) -fno-exceptions -nostdinc++ -fno-rtti
 
 WINDRES                = windres
@@ -88,10 +92,16 @@ MINGW_CFLAGS        = $(LOCALCFLAGS) -mno-cygwin $(MINGW_INCLUDES) -mwindows
 MINGW_ZLIB_DIR = /usr/local/lib
 
 PROGS  = setup.exe
+XEMACS=${blddir}/src/${PROGNAME}
+
+CYGWIN_SIZE=0
+WIN32_SIZE=0
+KIT_VERSION=""
 
 CONFIG_H = ../src/config.h
 
 OBJS = \
+       autoload.o \
        choose.o \
        concat.o \
        desktop.o \
@@ -105,6 +115,7 @@ OBJS = \
        ini.o \
        inilex.o \
        iniparse.o \
+       init.o \
        install.o \
        localdir.o \
        log.o \
@@ -129,6 +140,7 @@ OBJS = \
        splash.o \
        state.o \
        tar.o \
+       uninstall.o \
        version.o
 
 .SUFFIXES:
@@ -141,10 +153,21 @@ all: Makefile $(PROGS)
 setup.exe: $(OBJS)
        $(CXX) $(MINGW_CXXFLAGS) -o $@ $(OBJS) \
                -lole32 -lwsock32 -lnetapi32 -ladvapi32 \
-               -luuid -lkernel32 -luser32 -lwininet \
+               -luuid -lkernel32 -luser32 \
                -L$(MINGW_ZLIB_DIR) -lz -lmingw32
        @chmod a-x $@
 
+setup-bin.ini:
+       V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
+       | sed -e 's/\$$Revision:* *//' -e 's/ *$$.*//'` ;\
+       $(XEMACS) -batch -vanilla \
+               -eval '(setq package-net-cygwin32-binary-size $(CYGWIN_SIZE) \
+                       package-net-win32-binary-size $(WIN32_SIZE) \
+                       package-net-kit-version "$(KIT_VERSION)" \
+                       package-net-setup-version "'$$V'")' \
+               -l ${srcdir}/../lisp/package-net.el \
+               -f package-net-batch-generate-bin-ini
+
 install:
        @echo; echo "Installing net setup."
        for file in ${INSTALLABLES} ; do \
@@ -163,10 +186,10 @@ version.c : $(srcdir)/ChangeLog Makefile
        $(WINDRES) --include-dir $(srcdir) -o $@ $<
 
 %.o: %.c
-       $(CC) $(MINGW_CFLAGS) -c -o $@ ${srcdir}/$<
+       $(CC) $(MINGW_CFLAGS) -c -o $@ $<
 
 %.o: %.cc
-       $(CC) $(MINGW_CXXFLAGS) -c -o $@ ${srcdir}/$<
+       $(CC) $(MINGW_CXXFLAGS) -c -o $@ $<
 
 iniparse.c iniparse.h : iniparse.y
        bison -d -o iniparse.c $(srcdir)/iniparse.y
@@ -178,7 +201,7 @@ inilex.c : inilex.l iniparse.h
 .PHONY: mostlyclean clean distclean realclean extraclean
 
 mostlyclean:
-       $(RM) *.o *.i core $(PROGS)
+       $(RM) *.o *.i *.ini core $(PROGS)
 
 clean: mostlyclean
 
@@ -194,7 +217,7 @@ choose.o: choose.cc win32.h dialog.h resource.h state.h ini.h concat.h \
  msg.h log.h find.h reginfo.h
 concat.o: concat.cc
 desktop.o: desktop.cc win32.h resource.h ini.h msg.h state.h concat.h \
- mkdir.h dialog.h version.h port.h
+ mkdir.h dialog.h version.h port.h reginfo.h desktop.h
 dialog.o: dialog.cc win32.h dialog.h msg.h log.h
 diskfull.o: diskfull.cc win32.h diskfull.h
 download.o: download.cc win32.h resource.h msg.h ini.h dialog.h \
@@ -215,7 +238,11 @@ iniparse.o: iniparse.c ini.h \
  port.h
 install.o: install.cc win32.h \
  resource.h ini.h dialog.h concat.h geturl.h mkdir.h state.h tar.h \
- diskfull.h msg.h regedit.h reginfo.h log.h hash.h port.h
+ diskfull.h msg.h regedit.h reginfo.h log.h hash.h port.h desktop.h
+init.o: init.cc win32.h resource.h dialog.h state.h msg.h log.h 
+uninstall.o: uninstall.cc win32.h \
+ resource.h ini.h dialog.h concat.h geturl.h mkdir.h state.h tar.h \
+ diskfull.h msg.h regedit.h reginfo.h log.h hash.h port.h desktop.h
 localdir.o: localdir.cc win32.h dialog.h resource.h state.h msg.h \
  concat.h log.h
 log.o: log.cc win32.h resource.h msg.h log.h dialog.h state.h concat.h \