448
+ − 1 ## Copyright (c) 2000, Red Hat, Inc.
3062
+ − 2 ## Copyright (C) 2005 Ben Wing.
448
+ − 3 ##
+ − 4 ## This program is free software; you can redistribute it and/or modify
+ − 5 ## it under the terms of the GNU General Public License as published by
+ − 6 ## the Free Software Foundation; either version 2 of the License, or
+ − 7 ## (at your option) any later version.
+ − 8 ##
+ − 9 ## A copy of the GNU General Public License can be found at
+ − 10 ## http://www.gnu.org/
+ − 11 ##
+ − 12 ## Written by Christopher Faylor <cgf@redhat.com>
+ − 13 ## Adapted for XEmacs by Andy Piper <andy@xemacs.org>
+ − 14 ##
+ − 15 ## Makefile for Cygwin installer
+ − 16
+ − 17 ## For performance and consistency, no built-in rules
+ − 18 .SUFFIXES:
+ − 19 .SUFFIXES: .c .cc .h .o
+ − 20 ## ==================== Things "configure" will edit ====================
+ − 21
+ − 22 @SET_MAKE@
+ − 23 SHELL = /bin/sh
+ − 24 RM = rm -f
+ − 25 pwd = /bin/pwd
+ − 26
+ − 27 CC=@CC@
+ − 28 CPP=@CPP@
+ − 29 CFLAGS=@CFLAGS@
+ − 30 CPPFLAGS=@CPPFLAGS@
+ − 31 LDFLAGS=@LDFLAGS@
+ − 32 ALLOCA=@ALLOCA@
+ − 33 LN_S=@LN_S@
+ − 34 version=@version@
+ − 35
+ − 36 ## This will be the name of the generated binary and is set automatically
+ − 37 ## by configure.
+ − 38 PROGNAME=@PROGNAME@
+ − 39 INSTALLABLES=setup
+ − 40 #ifdef USE_GNU_MAKE
+ − 41 vpath %.c @srcdir@
+ − 42 vpath %.cc @srcdir@
+ − 43 vpath %.h @srcdir@
462
+ − 44 vpath %.l @srcdir@
+ − 45 vpath %.y @srcdir@
+ − 46 vpath %.rc @srcdir@
448
+ − 47 #else
+ − 48 VPATH=@srcdir@
+ − 49 #endif
+ − 50
+ − 51 ## ==================== Where To Install Things ====================
+ − 52
+ − 53 prefix=@prefix@
+ − 54 exec_prefix=@exec_prefix@
+ − 55 bindir=@bindir@
+ − 56 libdir=@libdir@
+ − 57 srcdir=@srcdir@
+ − 58 datadir=@datadir@
+ − 59 instvardir=@instvardir@
+ − 60 top_srcdir=@top_srcdir@
+ − 61 archlibdir=@archlibdir@
+ − 62 configuration=@configuration@
+ − 63 moduledir=@moduledir@
+ − 64 sitemoduledir=@sitemoduledir@
452
+ − 65 extra_includes=@extra_includes@
+ − 66 blddir=@blddir@
448
+ − 67
+ − 68 ## ==================== Utility Programs for the Build =================
+ − 69
+ − 70 INSTALL = @install_pp@ @INSTALL@
+ − 71 INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ − 72 INSTALL_DATA = @INSTALL_DATA@
+ − 73 SHELL = @SHELL@
+ − 74 ## ========================== Lists of Files ===========================
+ − 75
+ − 76 #define NO_SHORTNAMES
+ − 77 #define NOT_C_CODE
+ − 78 #include "../src/config.h"
+ − 79
+ − 80 program_transform_name = @program_transform_name@
+ − 81
+ − 82 CC = @CC@
+ − 83 CC_FOR_TARGET = $(CC)
+ − 84
452
+ − 85 ## -O3 has problems so fix this locally
+ − 86 LOCALCFLAGS = $(CFLAGS) -O2 -DMINGW $(extra_includes)
448
+ − 87 CXXFLAGS = $(LOCALCFLAGS) -fno-exceptions -nostdinc++ -fno-rtti
+ − 88
+ − 89 WINDRES = windres
+ − 90 MINGW_INCLUDES = -I. -I$(srcdir)
+ − 91 MINGW_CXXFLAGS = $(CXXFLAGS) -mno-cygwin $(MINGW_INCLUDES) -mwindows
+ − 92 MINGW_CFLAGS = $(LOCALCFLAGS) -mno-cygwin $(MINGW_INCLUDES) -mwindows
+ − 93 MINGW_ZLIB_DIR = /usr/local/lib
+ − 94
+ − 95 PROGS = setup.exe
452
+ − 96 XEMACS=${blddir}/src/${PROGNAME}
448
+ − 97
673
+ − 98 CYGWIN_SIZE=0
+ − 99 WIN32_SIZE=0
707
+ − 100 KIT_VERSION=""
673
+ − 101
448
+ − 102 CONFIG_H = ../src/config.h
+ − 103
+ − 104 OBJS = \
452
+ − 105 autoload.o \
448
+ − 106 choose.o \
+ − 107 concat.o \
+ − 108 desktop.o \
+ − 109 dialog.o \
+ − 110 diskfull.o \
+ − 111 download.o \
+ − 112 find.o \
+ − 113 fromcwd.o \
+ − 114 geturl.o \
+ − 115 hash.o \
+ − 116 ini.o \
+ − 117 inilex.o \
+ − 118 iniparse.o \
657
+ − 119 init.o \
448
+ − 120 install.o \
+ − 121 localdir.o \
+ − 122 log.o \
+ − 123 main.o \
+ − 124 mkdir.o \
+ − 125 mklink2.o \
+ − 126 regedit.o \
+ − 127 msg.o \
+ − 128 net.o \
+ − 129 netio.o \
+ − 130 nio-ie5.o \
+ − 131 nio-file.o \
+ − 132 nio-ftp.o \
+ − 133 nio-http.o \
+ − 134 other.o \
+ − 135 postinstall.o \
+ − 136 res.o \
+ − 137 root.o \
+ − 138 simpsock.o \
+ − 139 site.o \
+ − 140 source.o \
+ − 141 splash.o \
+ − 142 state.o \
+ − 143 tar.o \
657
+ − 144 uninstall.o \
448
+ − 145 version.o
+ − 146
+ − 147 .SUFFIXES:
+ − 148 .NOEXPORT:
+ − 149
+ − 150 .PHONY: all install
+ − 151
+ − 152 all: Makefile $(PROGS)
+ − 153
+ − 154 setup.exe: $(OBJS)
+ − 155 $(CXX) $(MINGW_CXXFLAGS) -o $@ $(OBJS) \
+ − 156 -lole32 -lwsock32 -lnetapi32 -ladvapi32 \
452
+ − 157 -luuid -lkernel32 -luser32 \
448
+ − 158 -L$(MINGW_ZLIB_DIR) -lz -lmingw32
+ − 159 @chmod a-x $@
+ − 160
673
+ − 161 setup-bin.ini:
452
+ − 162 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
673
+ − 163 | sed -e 's/\$$Revision:* *//' -e 's/ *$$.*//'` ;\
+ − 164 $(XEMACS) -batch -vanilla \
+ − 165 -eval '(setq package-net-cygwin32-binary-size $(CYGWIN_SIZE) \
+ − 166 package-net-win32-binary-size $(WIN32_SIZE) \
707
+ − 167 package-net-kit-version "$(KIT_VERSION)" \
673
+ − 168 package-net-setup-version "'$$V'")' \
+ − 169 -l ${srcdir}/../lisp/package-net.el \
+ − 170 -f package-net-batch-generate-bin-ini
452
+ − 171
448
+ − 172 install:
+ − 173 @echo; echo "Installing net setup."
+ − 174 for file in ${INSTALLABLES} ; do \
+ − 175 (cd .. && $(INSTALL_PROGRAM) netinstall/$${file} ${bindir}/$${file}) ; \
+ − 176 done
+ − 177
+ − 178 version.c : $(srcdir)/ChangeLog Makefile
+ − 179 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
+ − 180 | sed -e 's/\$$Revision:* *//' \
+ − 181 -e 's/ *$$.*//'` ;\
+ − 182 echo "char *version = \"$$V\";" > version.tmp ;\
+ − 183 echo "static char *id = \"\\n%%% setup-version $$V\\n\";" >> version.tmp
+ − 184 mv version.tmp version.c
+ − 185
+ − 186 %.o: %.rc
+ − 187 $(WINDRES) --include-dir $(srcdir) -o $@ $<
+ − 188
+ − 189 %.o: %.c
462
+ − 190 $(CC) $(MINGW_CFLAGS) -c -o $@ $<
448
+ − 191
+ − 192 %.o: %.cc
462
+ − 193 $(CC) $(MINGW_CXXFLAGS) -c -o $@ $<
448
+ − 194
+ − 195 iniparse.c iniparse.h : iniparse.y
+ − 196 bison -d -o iniparse.c $(srcdir)/iniparse.y
+ − 197
+ − 198 inilex.c : inilex.l iniparse.h
+ − 199 flex -8 $(srcdir)/inilex.l
+ − 200 mv lex.yy.c inilex.c
+ − 201
+ − 202 .PHONY: mostlyclean clean distclean realclean extraclean
3062
+ − 203 .PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
448
+ − 204 mostlyclean:
3083
+ − 205 -$(RM) *.o *.i *.ini core
448
+ − 206 clean: mostlyclean
3083
+ − 207 -$(RM) $(PROGS)
3062
+ − 208 distclean-noconfig: clean
3083
+ − 209 -$(RM) TAGS
3062
+ − 210 ## This is used in making a distribution.
+ − 211 ## Do not use it on development directories!
+ − 212 distclean: distclean-noconfig
3083
+ − 213 -$(RM) GNUmakefile Makefile Makefile.in
3062
+ − 214 realclean-noconfig: distclean-noconfig
448
+ − 215 realclean: distclean
3062
+ − 216 extraclean-noconfig: realclean-noconfig
3083
+ − 217 -$(RM) *~ \#*
3062
+ − 218 extraclean: realclean
3083
+ − 219 -$(RM) *~ \#*
448
+ − 220
+ − 221 choose.o: choose.cc win32.h dialog.h resource.h state.h ini.h concat.h \
+ − 222 msg.h log.h find.h reginfo.h
+ − 223 concat.o: concat.cc
+ − 224 desktop.o: desktop.cc win32.h resource.h ini.h msg.h state.h concat.h \
707
+ − 225 mkdir.h dialog.h version.h port.h reginfo.h desktop.h
448
+ − 226 dialog.o: dialog.cc win32.h dialog.h msg.h log.h
+ − 227 diskfull.o: diskfull.cc win32.h diskfull.h
+ − 228 download.o: download.cc win32.h resource.h msg.h ini.h dialog.h \
+ − 229 concat.h geturl.h state.h mkdir.h log.h
+ − 230 find.o: find.cc win32.h port.h
+ − 231 fromcwd.o: fromcwd.cc win32.h ini.h resource.h concat.h state.h \
+ − 232 dialog.h msg.h find.h version.h port.h
+ − 233 geturl.o: geturl.cc win32.h dialog.h \
+ − 234 geturl.h resource.h netio.h msg.h log.h
+ − 235 hash.o: hash.cc hash.h
+ − 236 ini.o: ini.cc win32.h ini.h resource.h concat.h state.h geturl.h \
+ − 237 dialog.h msg.h mkdir.h log.h reginfo.h version.h
+ − 238 inilex.o: inilex.c win32.h \
+ − 239 ini.h \
+ − 240 iniparse.h
+ − 241 iniparse.o: iniparse.c ini.h \
+ − 242 iniparse.h \
+ − 243 port.h
+ − 244 install.o: install.cc win32.h \
+ − 245 resource.h ini.h dialog.h concat.h geturl.h mkdir.h state.h tar.h \
707
+ − 246 diskfull.h msg.h regedit.h reginfo.h log.h hash.h port.h desktop.h
657
+ − 247 init.o: init.cc win32.h resource.h dialog.h state.h msg.h log.h
+ − 248 uninstall.o: uninstall.cc win32.h \
+ − 249 resource.h ini.h dialog.h concat.h geturl.h mkdir.h state.h tar.h \
707
+ − 250 diskfull.h msg.h regedit.h reginfo.h log.h hash.h port.h desktop.h
448
+ − 251 localdir.o: localdir.cc win32.h dialog.h resource.h state.h msg.h \
+ − 252 concat.h log.h
+ − 253 log.o: log.cc win32.h resource.h msg.h log.h dialog.h state.h concat.h \
+ − 254 mkdir.h
+ − 255 main.o: main.cc win32.h resource.h dialog.h state.h msg.h netio.h \
+ − 256 find.h log.h port.h
+ − 257 mkdir.o: mkdir.cc win32.h mkdir.h
+ − 258 mklink2.o: mklink2.c win32.h /usr/include/w32api/shlobj.h
+ − 259 msg.o: msg.cc win32.h dialog.h log.h
+ − 260 net.o: net.cc win32.h dialog.h resource.h state.h msg.h log.h
+ − 261 netio.o: netio.cc win32.h resource.h state.h msg.h netio.h nio-file.h \
+ − 262 nio-ie5.h nio-http.h nio-ftp.h dialog.h log.h port.h
+ − 263 nio-file.o: nio-file.cc win32.h netio.h nio-file.h resource.h msg.h
+ − 264 nio-ftp.o: nio-ftp.cc win32.h resource.h state.h simpsock.h log.h \
+ − 265 netio.h nio-ftp.h
+ − 266 nio-http.o: nio-http.cc win32.h resource.h state.h simpsock.h msg.h \
+ − 267 netio.h nio-http.h
+ − 268 nio-ie5.o: nio-ie5.cc win32.h resource.h state.h dialog.h msg.h \
+ − 269 netio.h nio-ie5.h
+ − 270 other.o: other.cc win32.h dialog.h resource.h state.h msg.h log.h
+ − 271 postinstall.o: postinstall.cc win32.h state.h dialog.h find.h concat.h \
+ − 272 port.h
+ − 273 regedit.o: regedit.cc win32.h reginfo.h regedit.h msg.h resource.h \
+ − 274 dialog.h
+ − 275 root.o: root.cc win32.h dialog.h resource.h state.h msg.h regedit.h \
+ − 276 reginfo.h concat.h log.h
+ − 277 simpsock.o: simpsock.cc win32.h simpsock.h msg.h
+ − 278 site.o: site.cc win32.h dialog.h resource.h state.h geturl.h msg.h \
+ − 279 concat.h regedit.h reginfo.h log.h port.h
+ − 280 source.o: source.cc win32.h dialog.h resource.h state.h msg.h log.h
+ − 281 splash.o: splash.cc win32.h dialog.h resource.h msg.h version.h
+ − 282 state.o: state.cc state.h
+ − 283 tar.o: tar.cc win32.h tar.h mkdir.h log.h port.h
+ − 284 version.o: version.c