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@
|
4118
|
58 datarootdir=@datarootdir@
|
448
|
59 datadir=@datadir@
|
|
60 instvardir=@instvardir@
|
|
61 top_srcdir=@top_srcdir@
|
|
62 archlibdir=@archlibdir@
|
|
63 configuration=@configuration@
|
|
64 moduledir=@moduledir@
|
|
65 sitemoduledir=@sitemoduledir@
|
452
|
66 extra_includes=@extra_includes@
|
|
67 blddir=@blddir@
|
448
|
68
|
|
69 ## ==================== Utility Programs for the Build =================
|
|
70
|
|
71 INSTALL = @install_pp@ @INSTALL@
|
|
72 INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
73 INSTALL_DATA = @INSTALL_DATA@
|
|
74 SHELL = @SHELL@
|
|
75 ## ========================== Lists of Files ===========================
|
|
76
|
|
77 #define NO_SHORTNAMES
|
|
78 #define NOT_C_CODE
|
|
79 #include "../src/config.h"
|
|
80
|
|
81 program_transform_name = @program_transform_name@
|
|
82
|
|
83 CC = @CC@
|
|
84 CC_FOR_TARGET = $(CC)
|
|
85
|
452
|
86 ## -O3 has problems so fix this locally
|
|
87 LOCALCFLAGS = $(CFLAGS) -O2 -DMINGW $(extra_includes)
|
448
|
88 CXXFLAGS = $(LOCALCFLAGS) -fno-exceptions -nostdinc++ -fno-rtti
|
|
89
|
|
90 WINDRES = windres
|
|
91 MINGW_INCLUDES = -I. -I$(srcdir)
|
|
92 MINGW_CXXFLAGS = $(CXXFLAGS) -mno-cygwin $(MINGW_INCLUDES) -mwindows
|
|
93 MINGW_CFLAGS = $(LOCALCFLAGS) -mno-cygwin $(MINGW_INCLUDES) -mwindows
|
|
94 MINGW_ZLIB_DIR = /usr/local/lib
|
|
95
|
|
96 PROGS = setup.exe
|
452
|
97 XEMACS=${blddir}/src/${PROGNAME}
|
448
|
98
|
673
|
99 CYGWIN_SIZE=0
|
|
100 WIN32_SIZE=0
|
707
|
101 KIT_VERSION=""
|
673
|
102
|
448
|
103 CONFIG_H = ../src/config.h
|
|
104
|
|
105 OBJS = \
|
452
|
106 autoload.o \
|
448
|
107 choose.o \
|
|
108 concat.o \
|
|
109 desktop.o \
|
|
110 dialog.o \
|
|
111 diskfull.o \
|
|
112 download.o \
|
|
113 find.o \
|
|
114 fromcwd.o \
|
|
115 geturl.o \
|
|
116 hash.o \
|
|
117 ini.o \
|
|
118 inilex.o \
|
|
119 iniparse.o \
|
657
|
120 init.o \
|
448
|
121 install.o \
|
|
122 localdir.o \
|
|
123 log.o \
|
|
124 main.o \
|
|
125 mkdir.o \
|
|
126 mklink2.o \
|
|
127 regedit.o \
|
|
128 msg.o \
|
|
129 net.o \
|
|
130 netio.o \
|
|
131 nio-ie5.o \
|
|
132 nio-file.o \
|
|
133 nio-ftp.o \
|
|
134 nio-http.o \
|
|
135 other.o \
|
|
136 postinstall.o \
|
|
137 res.o \
|
|
138 root.o \
|
|
139 simpsock.o \
|
|
140 site.o \
|
|
141 source.o \
|
|
142 splash.o \
|
|
143 state.o \
|
|
144 tar.o \
|
657
|
145 uninstall.o \
|
448
|
146 version.o
|
|
147
|
|
148 .SUFFIXES:
|
|
149 .NOEXPORT:
|
|
150
|
|
151 .PHONY: all install
|
|
152
|
|
153 all: Makefile $(PROGS)
|
|
154
|
|
155 setup.exe: $(OBJS)
|
|
156 $(CXX) $(MINGW_CXXFLAGS) -o $@ $(OBJS) \
|
|
157 -lole32 -lwsock32 -lnetapi32 -ladvapi32 \
|
452
|
158 -luuid -lkernel32 -luser32 \
|
448
|
159 -L$(MINGW_ZLIB_DIR) -lz -lmingw32
|
|
160 @chmod a-x $@
|
|
161
|
673
|
162 setup-bin.ini:
|
452
|
163 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
|
673
|
164 | sed -e 's/\$$Revision:* *//' -e 's/ *$$.*//'` ;\
|
|
165 $(XEMACS) -batch -vanilla \
|
|
166 -eval '(setq package-net-cygwin32-binary-size $(CYGWIN_SIZE) \
|
|
167 package-net-win32-binary-size $(WIN32_SIZE) \
|
707
|
168 package-net-kit-version "$(KIT_VERSION)" \
|
673
|
169 package-net-setup-version "'$$V'")' \
|
|
170 -l ${srcdir}/../lisp/package-net.el \
|
|
171 -f package-net-batch-generate-bin-ini
|
452
|
172
|
448
|
173 install:
|
|
174 @echo; echo "Installing net setup."
|
|
175 for file in ${INSTALLABLES} ; do \
|
|
176 (cd .. && $(INSTALL_PROGRAM) netinstall/$${file} ${bindir}/$${file}) ; \
|
|
177 done
|
|
178
|
|
179 version.c : $(srcdir)/ChangeLog Makefile
|
|
180 V=`grep '^\$$Revision.*' $(srcdir)/ChangeLog \
|
|
181 | sed -e 's/\$$Revision:* *//' \
|
|
182 -e 's/ *$$.*//'` ;\
|
|
183 echo "char *version = \"$$V\";" > version.tmp ;\
|
|
184 echo "static char *id = \"\\n%%% setup-version $$V\\n\";" >> version.tmp
|
|
185 mv version.tmp version.c
|
|
186
|
|
187 %.o: %.rc
|
|
188 $(WINDRES) --include-dir $(srcdir) -o $@ $<
|
|
189
|
|
190 %.o: %.c
|
462
|
191 $(CC) $(MINGW_CFLAGS) -c -o $@ $<
|
448
|
192
|
|
193 %.o: %.cc
|
462
|
194 $(CC) $(MINGW_CXXFLAGS) -c -o $@ $<
|
448
|
195
|
|
196 iniparse.c iniparse.h : iniparse.y
|
|
197 bison -d -o iniparse.c $(srcdir)/iniparse.y
|
|
198
|
|
199 inilex.c : inilex.l iniparse.h
|
|
200 flex -8 $(srcdir)/inilex.l
|
|
201 mv lex.yy.c inilex.c
|
|
202
|
|
203 .PHONY: mostlyclean clean distclean realclean extraclean
|
3062
|
204 .PHONY: distclean-noconfig realclean-noconfig extraclean-noconfig
|
448
|
205 mostlyclean:
|
3083
|
206 -$(RM) *.o *.i *.ini core
|
448
|
207 clean: mostlyclean
|
3083
|
208 -$(RM) $(PROGS)
|
3062
|
209 distclean-noconfig: clean
|
3083
|
210 -$(RM) TAGS
|
3062
|
211 ## This is used in making a distribution.
|
|
212 ## Do not use it on development directories!
|
|
213 distclean: distclean-noconfig
|
3083
|
214 -$(RM) GNUmakefile Makefile Makefile.in
|
3062
|
215 realclean-noconfig: distclean-noconfig
|
448
|
216 realclean: distclean
|
3062
|
217 extraclean-noconfig: realclean-noconfig
|
3083
|
218 -$(RM) *~ \#*
|
3062
|
219 extraclean: realclean
|
3083
|
220 -$(RM) *~ \#*
|
448
|
221
|
|
222 choose.o: choose.cc win32.h dialog.h resource.h state.h ini.h concat.h \
|
|
223 msg.h log.h find.h reginfo.h
|
|
224 concat.o: concat.cc
|
|
225 desktop.o: desktop.cc win32.h resource.h ini.h msg.h state.h concat.h \
|
707
|
226 mkdir.h dialog.h version.h port.h reginfo.h desktop.h
|
448
|
227 dialog.o: dialog.cc win32.h dialog.h msg.h log.h
|
|
228 diskfull.o: diskfull.cc win32.h diskfull.h
|
|
229 download.o: download.cc win32.h resource.h msg.h ini.h dialog.h \
|
|
230 concat.h geturl.h state.h mkdir.h log.h
|
|
231 find.o: find.cc win32.h port.h
|
|
232 fromcwd.o: fromcwd.cc win32.h ini.h resource.h concat.h state.h \
|
|
233 dialog.h msg.h find.h version.h port.h
|
|
234 geturl.o: geturl.cc win32.h dialog.h \
|
|
235 geturl.h resource.h netio.h msg.h log.h
|
|
236 hash.o: hash.cc hash.h
|
|
237 ini.o: ini.cc win32.h ini.h resource.h concat.h state.h geturl.h \
|
|
238 dialog.h msg.h mkdir.h log.h reginfo.h version.h
|
|
239 inilex.o: inilex.c win32.h \
|
|
240 ini.h \
|
|
241 iniparse.h
|
|
242 iniparse.o: iniparse.c ini.h \
|
|
243 iniparse.h \
|
|
244 port.h
|
|
245 install.o: install.cc win32.h \
|
|
246 resource.h ini.h dialog.h concat.h geturl.h mkdir.h state.h tar.h \
|
707
|
247 diskfull.h msg.h regedit.h reginfo.h log.h hash.h port.h desktop.h
|
657
|
248 init.o: init.cc win32.h resource.h dialog.h state.h msg.h log.h
|
|
249 uninstall.o: uninstall.cc win32.h \
|
|
250 resource.h ini.h dialog.h concat.h geturl.h mkdir.h state.h tar.h \
|
707
|
251 diskfull.h msg.h regedit.h reginfo.h log.h hash.h port.h desktop.h
|
448
|
252 localdir.o: localdir.cc win32.h dialog.h resource.h state.h msg.h \
|
|
253 concat.h log.h
|
|
254 log.o: log.cc win32.h resource.h msg.h log.h dialog.h state.h concat.h \
|
|
255 mkdir.h
|
|
256 main.o: main.cc win32.h resource.h dialog.h state.h msg.h netio.h \
|
|
257 find.h log.h port.h
|
|
258 mkdir.o: mkdir.cc win32.h mkdir.h
|
|
259 mklink2.o: mklink2.c win32.h /usr/include/w32api/shlobj.h
|
|
260 msg.o: msg.cc win32.h dialog.h log.h
|
|
261 net.o: net.cc win32.h dialog.h resource.h state.h msg.h log.h
|
|
262 netio.o: netio.cc win32.h resource.h state.h msg.h netio.h nio-file.h \
|
|
263 nio-ie5.h nio-http.h nio-ftp.h dialog.h log.h port.h
|
|
264 nio-file.o: nio-file.cc win32.h netio.h nio-file.h resource.h msg.h
|
|
265 nio-ftp.o: nio-ftp.cc win32.h resource.h state.h simpsock.h log.h \
|
|
266 netio.h nio-ftp.h
|
|
267 nio-http.o: nio-http.cc win32.h resource.h state.h simpsock.h msg.h \
|
|
268 netio.h nio-http.h
|
|
269 nio-ie5.o: nio-ie5.cc win32.h resource.h state.h dialog.h msg.h \
|
|
270 netio.h nio-ie5.h
|
|
271 other.o: other.cc win32.h dialog.h resource.h state.h msg.h log.h
|
|
272 postinstall.o: postinstall.cc win32.h state.h dialog.h find.h concat.h \
|
|
273 port.h
|
|
274 regedit.o: regedit.cc win32.h reginfo.h regedit.h msg.h resource.h \
|
|
275 dialog.h
|
|
276 root.o: root.cc win32.h dialog.h resource.h state.h msg.h regedit.h \
|
|
277 reginfo.h concat.h log.h
|
|
278 simpsock.o: simpsock.cc win32.h simpsock.h msg.h
|
|
279 site.o: site.cc win32.h dialog.h resource.h state.h geturl.h msg.h \
|
|
280 concat.h regedit.h reginfo.h log.h port.h
|
|
281 source.o: source.cc win32.h dialog.h resource.h state.h msg.h log.h
|
|
282 splash.o: splash.cc win32.h dialog.h resource.h msg.h version.h
|
|
283 state.o: state.cc state.h
|
|
284 tar.o: tar.cc win32.h tar.h mkdir.h log.h port.h
|
|
285 version.o: version.c
|