1 # Makefile for `wget' utility
2 # Copyright (C) 1995-2006 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 Wget; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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@
41 exec_prefix = @exec_prefix@
43 sysconfdir = @sysconfdir@
45 localedir = $(datadir)/locale
51 # The following line is losing on some versions of make!
52 DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
55 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 css-url.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 lex.yy.o log.o main.o $(MD5_OBJ) netrc.o progress.o ptimer.o \
80 recur.o res.o retr.o safe-ctype.o snprintf.o spider.o \
81 $(SSL_OBJ) url.o utils.o version.o xmalloc.o
89 # Dependencies for building
92 $(LINK) $(OBJ) $(LIBS)
97 # We make object files depend on every header. Rather than attempt to
98 # track dependencies, everything gets recompiled when a header
99 # changes. With a program of Wget's size this doesn't waste much
100 # time, and it's a lot safer than attempting to get all the
101 # dependencies right.
103 $(OBJ): config-post.h config.h connect.h convert.h cookies.h css-url.h \
104 ftp.h gen-md5.h getopt.h gnu-md5.h hash.h host.h html-parse.h \
105 http-ntlm.h init.h log.h mswindows.h netrc.h options.h \
106 progress.h ptimer.h recur.h res.h retr.h safe-ctype.h \
107 spider.h ssl.h sysdep.h url.h utils.h wget.h xmalloc.h
110 # Dependencies for installing
115 uninstall: uninstall.bin
117 install.bin: wget$(exeext)
118 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
119 $(INSTALL_PROGRAM) wget$(exeext) $(DESTDIR)$(bindir)/wget$(exeext)
122 $(RM) $(DESTDIR)$(bindir)/wget$(exeext)
125 # Dependencies for cleanup
129 $(RM) *.o wget$(exeext) *~ *.bak core core.[0-9]* lex.yy.c
132 $(RM) Makefile config.h
135 $(RM) TAGS config.h.in
138 # Dependencies for maintenance
143 Makefile: Makefile.in ../config.status
144 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status