1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
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.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 # In addition, as a special exception, the Free Software Foundation
19 # gives permission to link the code of its release of Wget with the
20 # OpenSSL project's "OpenSSL" library (or with modified versions of it
21 # that use the same license as the "OpenSSL" library), and distribute
22 # the linked executables. You must obey the GNU General Public License
23 # in all respects for all of the code used other than "OpenSSL". If you
24 # modify this file, you may extend this exception to your version of the
25 # file, but you are not obligated to do so. If you do not wish to do
26 # so, delete this exception statement from your version.
36 top_srcdir = @top_srcdir@
43 exec_prefix = @exec_prefix@
45 sysconfdir = @sysconfdir@
46 localedir = $(prefix)/share/locale
52 # The following line is losing on some versions of make!
53 DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
59 INCLUDES = -I. -I$(srcdir) @SSL_INCLUDES@
61 COMPILE = $(CC) $(INCLUDES) $(CPPFLAGS) $(DEFS) $(CFLAGS)
62 LINK = @LIBTOOL@ --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
64 INSTALL_PROGRAM = @INSTALL_PROGRAM@
68 # Conditional compiles
74 GETOPT_OBJ = @GETOPT_OBJ@
76 OBJ = $(ALLOCA) cmpt$o connect$o convert$o cookies$o \
77 ftp$o ftp-basic$o ftp-ls$o $(OPIE_OBJ) $(GETOPT_OBJ) hash$o \
78 host$o html-parse$o html-url$o http$o $(NTLM_OBJ) init$o \
79 log$o main$o $(MD5_OBJ) netrc$o progress$o ptimer$o recur$o \
80 res$o retr$o safe-ctype$o snprintf$o $(SSL_OBJ) url$o \
81 utils$o version$o xmalloc$o
84 .SUFFIXES: .c .o ._c ._o
90 $(ANSI2KNR) $< > $*.tmp && mv $*.tmp $@
93 @echo $(COMPILE) -c $<
95 @ln $< _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
98 $(ANSI2KNR) $< > $*.tmp && mv $*.tmp $*._c
99 @echo $(COMPILE) -c $*._c
101 @ln $*._c _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
103 # Dependencies for building
105 wget$(exeext): $(OBJ)
106 $(LINK) $(OBJ) $(LIBS)
109 $(CC) -o ansi2knr ansi2knr.o $(LIBS)
114 # Dependencies for installing
119 uninstall: uninstall.bin
121 install.bin: wget$(exeext)
122 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
123 $(INSTALL_PROGRAM) wget$(exeext) $(DESTDIR)$(bindir)/wget$(exeext)
126 $(RM) $(DESTDIR)$(bindir)/wget$(exeext)
129 # Dependencies for cleanup
133 $(RM) *.o wget$(exeext) *~ *.bak core core.[0-9]* $(ANSI2KNR) *._o *._c
137 $(RM) Makefile config.h
140 $(RM) TAGS config.h.in
143 # Dependencies for maintenance
148 Makefile: Makefile.in ../config.status
149 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
154 # DO NOT DELETE THIS LINE -- make depend depends on it.
157 cmpt$o: wget.h sysdep.h options.h safe-ctype.h
158 connect$o: wget.h sysdep.h options.h safe-ctype.h utils.h connect.h host.h
159 convert$o: wget.h convert.h url.h recur.h utils.h hash.h
160 cookies$o: wget.h sysdep.h options.h safe-ctype.h cookies.h hash.h url.h utils.h
161 ftp-basic$o: wget.h sysdep.h options.h safe-ctype.h utils.h connect.h \
163 ftp-ls$o: wget.h sysdep.h options.h safe-ctype.h utils.h ftp.h host.h \
165 ftp-opie$o: wget.h sysdep.h options.h safe-ctype.h gen-md5.h
166 ftp$o: wget.h sysdep.h options.h safe-ctype.h utils.h url.h retr.h \
167 ftp.h host.h connect.h netrc.h
168 gen-md5$o: wget.h sysdep.h options.h safe-ctype.h gen-md5.h
169 openssl$o: wget.h sysdep.h options.h safe-ctype.h utils.h connect.h host.h \
171 getopt$o: wget.h sysdep.h options.h safe-ctype.h getopt.h
172 gnu-md5$o: wget.h sysdep.h options.h safe-ctype.h gnu-md5.h
173 hash$o: wget.h sysdep.h options.h safe-ctype.h utils.h hash.h
174 host$o: wget.h sysdep.h options.h safe-ctype.h utils.h host.h url.h hash.h
175 html-parse$o: wget.h sysdep.h options.h safe-ctype.h html-parse.h
176 html-url$o: wget.h sysdep.h options.h safe-ctype.h html-parse.h url.h utils.h
177 http$o: wget.h sysdep.h options.h safe-ctype.h utils.h url.h host.h \
178 retr.h connect.h host.h netrc.h ssl.h \
180 init$o: wget.h sysdep.h options.h safe-ctype.h utils.h init.h host.h recur.h \
181 netrc.h cookies.h progress.h
182 log$o: wget.h sysdep.h options.h safe-ctype.h utils.h
183 main$o: wget.h sysdep.h options.h safe-ctype.h utils.h init.h retr.h \
184 recur.h host.h cookies.h url.h progress.h ssl.h getopt.h
185 gnu-md5$o: wget.h sysdep.h options.h safe-ctype.h gnu-md5.h
186 mswindows$o: wget.h sysdep.h options.h safe-ctype.h utils.h url.h
187 netrc$o: wget.h sysdep.h options.h safe-ctype.h utils.h netrc.h init.h
188 progress$o: wget.h sysdep.h options.h safe-ctype.h progress.h utils.h retr.h
189 recur$o: wget.h sysdep.h options.h safe-ctype.h url.h recur.h utils.h retr.h \
191 res$o: wget.h sysdep.h options.h safe-ctype.h utils.h hash.h url.h retr.h res.h
192 retr$o: wget.h sysdep.h options.h safe-ctype.h utils.h retr.h url.h \
193 recur.h ftp.h host.h connect.h hash.h
194 safe-ctype$o: safe-ctype.h
195 snprintf$o: safe-ctype.h
196 url$o: wget.h sysdep.h options.h safe-ctype.h utils.h url.h host.h hash.h
197 utils$o: wget.h sysdep.h options.h safe-ctype.h utils.h hash.h
199 xmalloc$o: wget.h xmalloc.h