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