]> sjero.net Git - wget/blob - src/Makefile.in
Merge with mainline
[wget] / src / Makefile.in
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.
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 # 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.
27
28 #
29 # Version: @VERSION@
30 #
31
32 SHELL = /bin/sh
33
34 top_builddir = ..
35
36 top_srcdir = @top_srcdir@
37 srcdir     = @srcdir@
38 VPATH      = @srcdir@
39
40 prefix       = @prefix@
41 exec_prefix  = @exec_prefix@
42 bindir       = @bindir@
43 sysconfdir   = @sysconfdir@
44 datadir      = @datadir@
45 localedir    = $(datadir)/locale
46
47 DESTDIR      =
48
49 CC       = @CC@
50 CPPFLAGS = @CPPFLAGS@
51 # The following line is losing on some versions of make!
52 DEFS     = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
53 CFLAGS   = @CFLAGS@
54 LDFLAGS  = @LDFLAGS@ 
55 LIBS     = @LIBS@ @LIBSSL@ @LIBGNUTLS@
56 exeext   = @EXEEXT@
57
58 INCLUDES = -I. -I$(srcdir)
59
60 COMPILE = $(CC) $(INCLUDES) $(CPPFLAGS)  $(DEFS) $(CFLAGS)
61 LINK    = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
62 INSTALL = @INSTALL@
63 INSTALL_PROGRAM = @INSTALL_PROGRAM@
64 RM = rm -f
65 ETAGS = etags
66
67 # Conditional compiles
68 ALLOCA     = @ALLOCA@
69 MD5_OBJ    = @MD5_OBJ@
70 OPIE_OBJ   = @OPIE_OBJ@
71 NTLM_OBJ   = @NTLM_OBJ@
72 SSL_OBJ    = @SSL_OBJ@
73 GETOPT_OBJ = @GETOPT_OBJ@
74
75 OBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o              \
76       ftp.o ftp-basic.o ftp-ls.o $(OPIE_OBJ) $(GETOPT_OBJ) hash.o \
77       host.o html-parse.o html-url.o http.o $(NTLM_OBJ) init.o    \
78       log.o main.o $(MD5_OBJ) netrc.o progress.o ptimer.o recur.o \
79       res.o retr.o safe-ctype.o snprintf.o spider.o $(SSL_OBJ)    \
80       url.o utils.o version.o xmalloc.o
81
82 .SUFFIXES:
83 .SUFFIXES: .c .o
84
85 .c.o:
86         $(COMPILE) -c $<
87
88 # Dependencies for building
89
90 wget$(exeext): $(OBJ)
91         $(LINK) $(OBJ) $(LIBS)
92
93 # We make object files depend on every header.  Rather than attempt to
94 # track dependencies, everything gets recompiled when a header
95 # changes.  With a program of Wget's size this doesn't waste much
96 # time, and it's a lot safer than attempting to get all the
97 # dependencies right.
98
99 $(OBJ): config-post.h config.h connect.h convert.h cookies.h ftp.h \
100         gen-md5.h getopt.h gnu-md5.h hash.h host.h html-parse.h    \
101         http-ntlm.h init.h log.h mswindows.h netrc.h options.h     \
102         progress.h ptimer.h recur.h res.h retr.h safe-ctype.h      \
103         spider.h ssl.h sysdep.h url.h utils.h wget.h xmalloc.h
104
105 #
106 # Dependencies for installing
107 #
108
109 install: install.bin
110
111 uninstall: uninstall.bin
112
113 install.bin: wget$(exeext)
114         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
115         $(INSTALL_PROGRAM) wget$(exeext) $(DESTDIR)$(bindir)/wget$(exeext)
116
117 uninstall.bin:
118         $(RM) $(DESTDIR)$(bindir)/wget$(exeext)
119
120 #
121 # Dependencies for cleanup
122 #
123
124 clean:
125         $(RM) *.o wget$(exeext) *~ *.bak core core.[0-9]*
126
127 distclean: clean
128         $(RM) Makefile config.h
129
130 realclean: distclean
131         $(RM) TAGS config.h.in
132
133 #
134 # Dependencies for maintenance
135 #
136
137 subdir = src
138
139 Makefile: Makefile.in ../config.status
140         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
141
142 TAGS: *.c *.h
143         -$(ETAGS) *.c *.h