]> sjero.net Git - wget/blob - src/Makefile.am
Automated merge.
[wget] / src / Makefile.am
1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3 # 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4
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.
9
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.
14
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/>.
17
18 # Additional permission under GNU GPL version 3 section 7
19
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.
28
29 #
30 # Version: @VERSION@
31 #
32
33 # The following line is losing on some versions of make!
34 DEFS     = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
35 LIBS     = @LIBSSL@ @LIBGNUTLS@ @LIBINTL@ @LIBS@
36
37 bin_PROGRAMS = wget
38 wget_SOURCES = build_info.c cmpt.c connect.c convert.c cookies.c ftp.c    \
39                css.l css-url.c \
40                ftp-basic.c ftp-ls.c hash.c host.c html-parse.c html-url.c \
41                http.c init.c log.c main.c netrc.c progress.c ptimer.c     \
42                recur.c res.c retr.c snprintf.c spider.c url.c             \
43                utils.c                                    \
44                css-url.h connect.h convert.h cookies.h \
45                ftp.h gen-md5.h hash.h host.h html-parse.h html-url.h      \
46                http.h http-ntlm.h init.h log.h mswindows.h netrc.h        \
47                options.h progress.h ptimer.h recur.h res.h retr.h         \
48                spider.h ssl.h sysdep.h url.h utils.h wget.h
49 nodist_wget_SOURCES = version.c
50 EXTRA_wget_SOURCES = mswindows.c
51 LDADD = $(LIBOBJS) ../lib/libgnu.a @MD5_LDADD@
52 AM_CPPFLAGS = -I$(top_srcdir)/lib @MD5_CPPFLAGS@
53
54 ../lib/libgnu.a:
55         cd ../lib && $(MAKE) $(AM_MAKEFLAGS)
56
57 ../md5/libmd5.a:
58         cd ../lib && $(MAKE) $(AM_MAKEFLAGS)
59
60 ESCAPEQUOTE = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
61 version.c:  $(wget_SOURCES) $(LDADD) $(srcdir)/Makefile.am
62         echo '/* version.c */' > $@
63         echo '/* Autogenerated by Makefile - DO NOT EDIT */' >> $@
64         echo '' >> $@
65         echo 'const char *version_string = "@VERSION@"' >> $@
66         -hg log -r . --template='" ({node|short})"\n' 2>/dev/null >> $@
67         echo ';' >> $@
68         echo 'const char *compilation_string = "'$(COMPILE)'";' \
69             | $(ESCAPEQUOTE) >> $@
70         echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
71         $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \
72             | $(ESCAPEQUOTE) >> $@
73
74 check_LIBRARIES = libunittest.a
75 libunittest_a_SOURCES = $(wget_SOURCES) test.c test.h
76 nodist_libunittest_a_SOURCES = version.c
77 libunittest_a_CPPFLAGS = -DTESTING -I$(top_srcdir)/lib
78 libunittest_a_LIBADD = $(LIBOBJS)
79
80 CLEANFILES = *~ *.bak core core.[0-9]* version.c