1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3 # 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with Wget. If not, see <http://www.gnu.org/licenses/>.
18 # Additional permission under GNU GPL version 3 section 7
20 # If you modify this program, or any covered work, by linking or
21 # combining it with the OpenSSL project's OpenSSL library (or a
22 # modified version of that library), containing parts covered by the
23 # terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
24 # grants you additional permission to convey the resulting work.
25 # Corresponding Source for a non-source form of such a combination
26 # shall include the source code for the parts of OpenSSL used as well
27 # as that of the covered work.
37 top_srcdir = @top_srcdir@
42 exec_prefix = @exec_prefix@
44 sysconfdir = @sysconfdir@
46 localedir = $(datadir)/locale
52 # The following line is losing on some versions of make!
53 DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
56 LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@
59 INCLUDES = -I. -I$(srcdir)
61 COMPILE = $(CC) $(INCLUDES) $(CPPFLAGS) $(DEFS) $(CFLAGS)
62 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 spider.o $(SSL_OBJ) \
81 url.o utils.o version.o xmalloc.o
89 # Dependencies for building
92 $(LINK) $(OBJ) $(LIBS)
94 # We make object files depend on every header. Rather than attempt to
95 # track dependencies, everything gets recompiled when a header
96 # changes. With a program of Wget's size this doesn't waste much
97 # time, and it's a lot safer than attempting to get all the
100 $(OBJ): config-post.h config.h connect.h convert.h cookies.h ftp.h \
101 gen-md5.h getopt.h gnu-md5.h hash.h host.h html-parse.h \
102 http-ntlm.h init.h log.h mswindows.h netrc.h options.h \
103 progress.h ptimer.h recur.h res.h retr.h safe-ctype.h \
104 spider.h ssl.h sysdep.h url.h utils.h wget.h xmalloc.h
107 # Dependencies for installing
112 uninstall: uninstall.bin
114 install.bin: wget$(exeext)
115 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
116 $(INSTALL_PROGRAM) wget$(exeext) $(DESTDIR)$(bindir)/wget$(exeext)
119 $(RM) $(DESTDIR)$(bindir)/wget$(exeext)
122 # Dependencies for cleanup
126 $(RM) *.o wget$(exeext) *~ *.bak core core.[0-9]*
129 $(RM) Makefile config.h
132 $(RM) TAGS config.h.in
135 # Dependencies for maintenance
140 Makefile: Makefile.in ../config.status
141 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status