1 ## Copyright (c) 2000, Red Hat, Inc.
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2 of the License, or
6 ## (at your option) any later version.
8 ## A copy of the GNU General Public License can be found at
11 ## Written by Christopher Faylor <cgf@redhat.com>
12 ## Adapted for XEmacs by Andy Piper <andy@xemacs.org>
14 ## Makefile for Cygwin installer
16 ## For performance and consistency, no built-in rules
18 .SUFFIXES: .c .cc .h .o
19 ## ==================== Things "configure" will edit ====================
35 ## This will be the name of the generated binary and is set automatically
50 ## ==================== Where To Install Things ====================
53 exec_prefix=@exec_prefix@
58 instvardir=@instvardir@
59 top_srcdir=@top_srcdir@
60 archlibdir=@archlibdir@
61 configuration=@configuration@
63 sitemoduledir=@sitemoduledir@
64 extra_includes=@extra_includes@
67 ## ==================== Utility Programs for the Build =================
69 INSTALL = @install_pp@ @INSTALL@
70 INSTALL_PROGRAM = @INSTALL_PROGRAM@
71 INSTALL_DATA = @INSTALL_DATA@
73 ## ========================== Lists of Files ===========================
77 #include "../src/config.h"
79 program_transform_name = @program_transform_name@
84 ## -O3 has problems so fix this locally
85 LOCALCFLAGS = $(CFLAGS) -O2 -DMINGW $(extra_includes)
86 CXXFLAGS = $(LOCALCFLAGS) -fno-exceptions -nostdinc++ -fno-rtti
89 MINGW_INCLUDES = -I. -I$(srcdir)
90 MINGW_CXXFLAGS = $(CXXFLAGS) -mno-cygwin $(MINGW_INCLUDES) -mwindows
91 MINGW_CFLAGS = $(LOCALCFLAGS) -mno-cygwin $(MINGW_INCLUDES) -mwindows
92 MINGW_ZLIB_DIR = /usr/local/lib
95 XEMACS=${blddir}/src/${PROGNAME}
101 CONFIG_H = ../src/config.h
151 all: Makefile $(PROGS)
154 $(CXX) $(MINGW_CXXFLAGS) -o $@ $(OBJS) \
155 -lole32 -lwsock32 -lnetapi32 -ladvapi32 \
156 -luuid -lkernel32 -luser32 \
157 -L$(MINGW_ZLIB_DIR) -lz -lmingw32
161 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
162 | sed -e 's/\$$Revision:* *//' -e 's/ *$$.*//'` ;\
163 $(XEMACS) -batch -vanilla \
164 -eval '(setq package-net-cygwin32-binary-size $(CYGWIN_SIZE) \
165 package-net-win32-binary-size $(WIN32_SIZE) \
166 package-net-kit-version "$(KIT_VERSION)" \
167 package-net-setup-version "'$$V'")' \
168 -l ${srcdir}/../lisp/package-net.el \
169 -f package-net-batch-generate-bin-ini
172 @echo; echo "Installing net setup."
173 for file in ${INSTALLABLES} ; do \
174 (cd .. && $(INSTALL_PROGRAM) netinstall/$${file} ${bindir}/$${file}) ; \
177 version.c : $(srcdir)/ChangeLog Makefile
178 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
179 | sed -e 's/\$$Revision:* *//' \
181 echo "char *version = \"$$V\";" > version.tmp ;\
182 echo "static char *id = \"\\n%%% setup-version $$V\\n\";" >> version.tmp
183 mv version.tmp version.c
186 $(WINDRES) --include-dir $(srcdir) -o $@ $<
189 $(CC) $(MINGW_CFLAGS) -c -o $@ $<
192 $(CC) $(MINGW_CXXFLAGS) -c -o $@ $<
194 iniparse.c iniparse.h : iniparse.y
195 bison -d -o iniparse.c $(srcdir)/iniparse.y
197 inilex.c : inilex.l iniparse.h
198 flex -8 $(srcdir)/inilex.l
201 .PHONY: mostlyclean clean distclean realclean extraclean
204 $(RM) *.o *.i *.ini core $(PROGS)
209 $(RM) GNUmakefile Makefile Makefile.in TAGS
213 extraclean: distclean
216 choose.o: choose.cc win32.h dialog.h resource.h state.h ini.h concat.h \
217 msg.h log.h find.h reginfo.h
219 desktop.o: desktop.cc win32.h resource.h ini.h msg.h state.h concat.h \
220 mkdir.h dialog.h version.h port.h reginfo.h desktop.h
221 dialog.o: dialog.cc win32.h dialog.h msg.h log.h
222 diskfull.o: diskfull.cc win32.h diskfull.h
223 download.o: download.cc win32.h resource.h msg.h ini.h dialog.h \
224 concat.h geturl.h state.h mkdir.h log.h
225 find.o: find.cc win32.h port.h
226 fromcwd.o: fromcwd.cc win32.h ini.h resource.h concat.h state.h \
227 dialog.h msg.h find.h version.h port.h
228 geturl.o: geturl.cc win32.h dialog.h \
229 geturl.h resource.h netio.h msg.h log.h
230 hash.o: hash.cc hash.h
231 ini.o: ini.cc win32.h ini.h resource.h concat.h state.h geturl.h \
232 dialog.h msg.h mkdir.h log.h reginfo.h version.h
233 inilex.o: inilex.c win32.h \
236 iniparse.o: iniparse.c ini.h \
239 install.o: install.cc win32.h \
240 resource.h ini.h dialog.h concat.h geturl.h mkdir.h state.h tar.h \
241 diskfull.h msg.h regedit.h reginfo.h log.h hash.h port.h desktop.h
242 init.o: init.cc win32.h resource.h dialog.h state.h msg.h log.h
243 uninstall.o: uninstall.cc win32.h \
244 resource.h ini.h dialog.h concat.h geturl.h mkdir.h state.h tar.h \
245 diskfull.h msg.h regedit.h reginfo.h log.h hash.h port.h desktop.h
246 localdir.o: localdir.cc win32.h dialog.h resource.h state.h msg.h \
248 log.o: log.cc win32.h resource.h msg.h log.h dialog.h state.h concat.h \
250 main.o: main.cc win32.h resource.h dialog.h state.h msg.h netio.h \
252 mkdir.o: mkdir.cc win32.h mkdir.h
253 mklink2.o: mklink2.c win32.h /usr/include/w32api/shlobj.h
254 msg.o: msg.cc win32.h dialog.h log.h
255 net.o: net.cc win32.h dialog.h resource.h state.h msg.h log.h
256 netio.o: netio.cc win32.h resource.h state.h msg.h netio.h nio-file.h \
257 nio-ie5.h nio-http.h nio-ftp.h dialog.h log.h port.h
258 nio-file.o: nio-file.cc win32.h netio.h nio-file.h resource.h msg.h
259 nio-ftp.o: nio-ftp.cc win32.h resource.h state.h simpsock.h log.h \
261 nio-http.o: nio-http.cc win32.h resource.h state.h simpsock.h msg.h \
263 nio-ie5.o: nio-ie5.cc win32.h resource.h state.h dialog.h msg.h \
265 other.o: other.cc win32.h dialog.h resource.h state.h msg.h log.h
266 postinstall.o: postinstall.cc win32.h state.h dialog.h find.h concat.h \
268 regedit.o: regedit.cc win32.h reginfo.h regedit.h msg.h resource.h \
270 root.o: root.cc win32.h dialog.h resource.h state.h msg.h regedit.h \
271 reginfo.h concat.h log.h
272 simpsock.o: simpsock.cc win32.h simpsock.h msg.h
273 site.o: site.cc win32.h dialog.h resource.h state.h geturl.h msg.h \
274 concat.h regedit.h reginfo.h log.h port.h
275 source.o: source.cc win32.h dialog.h resource.h state.h msg.h log.h
276 splash.o: splash.cc win32.h dialog.h resource.h msg.h version.h
277 state.o: state.cc state.h
278 tar.o: tar.cc win32.h tar.h mkdir.h log.h port.h