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 # 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.
32 # The following line is losing on some versions of make!
33 DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
34 LIBS = @LIBS@ @LIBSSL@ @LIBGNUTLS@ @LIBINTL@
37 wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c ftp-basic.c \
38 ftp-ls.c hash.c host.c html-parse.c html-url.c http.c \
39 init.c log.c main.c netrc.c progress.c ptimer.c recur.c \
40 res.c retr.c safe-ctype.c snprintf.c spider.c url.c \
41 utils.c version.c xmalloc.c \
42 config-post.h connect.h convert.h cookies.h \
43 ftp.h gen-md5.h getopt.h gnu-md5.h hash.h host.h html-parse.h \
44 http.h http-ntlm.h init.h log.h mswindows.h netrc.h \
45 options.h progress.h ptimer.h recur.h res.h retr.h safe-ctype.h \
46 spider.h ssl.h sysdep.h url.h utils.h wget.h xmalloc.h
47 EXTRA_wget_SOURCES = mswindows.c
48 LDADD = $(ALLOCA) $(LIBOBJS)
51 printf '%s' 'const char *version_string = "@VERSION@' > $@
52 -HG_ID=$$(cat hg-id); [ "$$HG_ID" ] && printf '%s' " ($${HG_ID})" >> $@
53 printf '%s\n' '";' >> $@
57 hg-id: $(wget_SOURCES) $(LDADD)
58 -( hg id | cut -f 1 -d ' ' ) 2>/dev/null > $@
60 check_LIBRARIES = libunittest.a
61 libunittest_a_SOURCES = $(wget_SOURCES) test.c test.h
62 libunittest_a_CPPFLAGS = -DTESTING
63 libunittest_a_LIBADD = $(ALLOCA) $(LIBOBJS)
65 CLEANFILES = *~ *.bak core core.[0-9]*