]> sjero.net Git - wget/blob - src/Makefile.in
[svn] "Support DESTDIR when installing.
[wget] / src / Makefile.in
1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3
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.
8
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.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 #
19 # Version: @VERSION@
20 #
21
22 SHELL = /bin/sh
23
24 top_builddir = ..
25
26 top_srcdir = @top_srcdir@
27 srcdir     = @srcdir@
28 VPATH      = @srcdir@
29 ANSI2KNR = @ANSI2KNR@
30 o = .@U@o
31
32 prefix       = @prefix@
33 exec_prefix  = @exec_prefix@
34 bindir       = @bindir@
35 sysconfdir   = @sysconfdir@
36 localedir    = $(prefix)/share/locale
37
38 DESTDIR      =
39
40 CC       = @CC@
41 CPPFLAGS = @CPPFLAGS@
42 # The following line is losing on some versions of make!
43 DEFS     = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
44 CFLAGS   = @CFLAGS@
45 LDFLAGS  = @LDFLAGS@
46 LIBS     = @LIBS@
47 exeext   = @exeext@
48
49 INCLUDES = -I. -I$(srcdir) @SSL_INCLUDES@
50
51 COMPILE = $(CC) $(INCLUDES) $(CPPFLAGS)  $(DEFS) $(CFLAGS)
52 LINK    = @LIBTOOL@ $(CC) $(CFLAGS) $(LDFLAGS) -o $@
53 INSTALL = @INSTALL@
54 INSTALL_PROGRAM = @INSTALL_PROGRAM@
55 RM = rm -f
56 ETAGS = etags
57
58 # Conditional compiles
59 ALLOCA = @ALLOCA@
60 MD5_OBJ = @MD5_OBJ@
61 OPIE_OBJ = @OPIE_OBJ@
62 SSL_OBJ = @SSL_OBJ@
63
64 OBJ = $(ALLOCA) cmpt$o connect$o cookies$o fnmatch$o ftp$o        \
65       ftp-basic$o ftp-ls$o $(OPIE_OBJ) getopt$o hash$o            \
66       headers$o host$o html-parse$o html-url$o http$o init$o      \
67       log$o main$o $(MD5_OBJ) netrc$o rbuf$o recur$o retr$o       \
68       snprintf$o $(SSL_OBJ) url$o utils$o version$o safe-ctype$o
69
70 .SUFFIXES:
71 .SUFFIXES: .c .o ._c ._o
72
73 .c.o:
74         $(COMPILE) -c $<
75
76 .c._c: $(ANSI2KNR)
77         $(ANSI2KNR) $< > $*.tmp && mv $*.tmp $@
78
79 ._c._o:
80         @echo $(COMPILE) -c $<
81         @rm -f _$*.c
82         @ln $< _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
83
84 .c._o: $(ANSI2KNR)
85         $(ANSI2KNR) $< > $*.tmp && mv $*.tmp $*._c
86         @echo $(COMPILE) -c $*._c
87         @rm -f _$*.c
88         @ln $*._c _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
89
90 # Dependencies for building
91
92 wget$(exeext): $(OBJ)
93         $(LINK) $(OBJ) $(LIBS)
94
95 ansi2knr: ansi2knr.o
96         $(CC) -o ansi2knr ansi2knr.o $(LIBS)
97
98 $(OBJ): $(ANSI2KNR)
99
100 #
101 # Dependencies for installing
102 #
103
104 install: install.bin
105
106 uninstall: uninstall.bin
107
108 install.bin: wget$(exeext)
109         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
110         $(INSTALL_PROGRAM) wget$(exeext) $(DESTDIR)$(bindir)/wget$(exeext)
111
112 uninstall.bin:
113         $(RM) $(DESTDIR)$(bindir)/wget$(exeext)
114
115 #
116 # Dependencies for cleanup
117 #
118
119 clean:
120         $(RM) *.o wget$(exeext) *~ *.bak core $(ANSI2KNR) *._o *._c
121
122 distclean: clean
123         $(RM) Makefile config.h
124
125 realclean: distclean
126         $(RM) TAGS
127
128 #
129 # Dependencies for maintenance
130 #
131
132 subdir = src
133
134 Makefile: Makefile.in ../config.status
135         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
136
137 TAGS: *.c *.h
138         -$(ETAGS) *.c *.h
139
140 # DO NOT DELETE THIS LINE -- make depend depends on it.
141
142 cmpt$o: wget.h
143 connect$o: wget.h connect.h host.h
144 cookies$o: wget.h cookies.h hash.h url.h utils.h
145 fnmatch$o: wget.h fnmatch.h
146 ftp-basic$o: wget.h utils.h rbuf.h connect.h host.h
147 ftp-ls$o: wget.h utils.h ftp.h url.h
148 ftp-opie$o: wget.h md5.h
149 ftp$o: wget.h utils.h url.h rbuf.h retr.h ftp.h connect.h host.h fnmatch.h netrc.h
150 getopt$o: wget.h getopt.h
151 hash$o: wget.h utils.h hash.h
152 headers$o: wget.h connect.h rbuf.h headers.h
153 host$o: wget.h utils.h host.h url.h hash.h
154 html-parse$o: wget.h html-parse.h
155 html-url$o: wget.h html-parse.h url.h utils.h
156 html$o: wget.h url.h utils.h ftp.h
157 http$o: wget.h utils.h url.h host.h rbuf.h retr.h headers.h cookies.h connect.h fnmatch.h netrc.h md5.h
158 init$o: wget.h utils.h init.h host.h recur.h netrc.h
159 log$o: wget.h utils.h
160 main$o: wget.h utils.h getopt.h init.h retr.h recur.h host.h cookies.h
161 md5$o: wget.h md5.h
162 mswindows$o: wget.h url.h
163 netrc$o: wget.h utils.h netrc.h init.h
164 rbuf$o: wget.h rbuf.h connect.h
165 recur$o: wget.h url.h recur.h utils.h retr.h ftp.h fnmatch.h host.h hash.h
166 retr$o: wget.h utils.h retr.h url.h recur.h ftp.h host.h connect.h hash.h
167 snprintf$o:
168 safe-ctype$o: safe-ctype.h
169 url$o: wget.h utils.h url.h host.h
170 utils$o: wget.h utils.h fnmatch.h hash.h
171 version$o: