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