1 # Makefile for `wget' utility
2 # Copyright (C) 1995, 1996, 1997 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 this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 top_srcdir = @top_srcdir@
31 exec_prefix = @exec_prefix@
33 sysconfdir = @sysconfdir@
34 localedir = $(prefix)/share/locale
38 # The following line is losing on some versions of make!
39 DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
45 INCLUDES = -I. -I$(srcdir)
47 COMPILE = $(CC) $(INCLUDES) $(CPPFLAGS) $(DEFS) $(CFLAGS)
48 LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
50 INSTALL_PROGRAM = @INSTALL_PROGRAM@
54 # Conditional compiles
59 OBJ = $(ALLOCA) cmpt$o connect$o fnmatch$o ftp$o ftp-basic$o \
60 ftp-ls$o $(OPIE_OBJ) getopt$o headers$o host$o html$o \
61 http$o init$o log$o main$o $(MD5_OBJ) netrc$o rbuf$o \
62 recur$o retr$o url$o utils$o version$o
65 .SUFFIXES: .c .o ._c ._o
71 $(ANSI2KNR) $< > $*.tmp && mv $*.tmp $@
74 @echo $(COMPILE) -c $<
76 @ln $< _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
79 $(ANSI2KNR) $< > $*.tmp && mv $*.tmp $*._c
80 @echo $(COMPILE) -c $*._c
82 @ln $*._c _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
84 # Dependencies for building
87 $(LINK) $(OBJ) $(LIBS)
90 $(CC) -o ansi2knr ansi2knr.o $(LIBS)
95 # Dependencies for installing
100 uninstall: uninstall.bin
102 install.bin: wget$(exeext)
103 $(top_srcdir)/mkinstalldirs $(bindir)
104 $(INSTALL_PROGRAM) wget$(exeext) $(bindir)/wget$(exeext)
107 $(RM) $(bindir)/wget$(exeext)
110 # Dependencies for cleanup
114 $(RM) *.o wget$(exeext) *~ *.bak core $(ANSI2KNR) *._o *._c
117 $(RM) Makefile config.h
123 # Dependencies for maintenance
128 Makefile: Makefile.in ../config.status
129 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
134 # DO NOT DELETE THIS LINE -- make depend depends on it.
136 cmpt$o: config.h wget.h sysdep.h options.h
137 connect$o: config.h wget.h sysdep.h options.h connect.h host.h
138 fnmatch$o: config.h wget.h sysdep.h options.h fnmatch.h
139 ftp-basic$o: config.h wget.h sysdep.h options.h utils.h rbuf.h connect.h host.h
140 ftp-ls$o: config.h wget.h sysdep.h options.h utils.h ftp.h rbuf.h
141 ftp-opie$o: config.h wget.h sysdep.h options.h md5.h
142 ftp$o: config.h wget.h sysdep.h options.h utils.h url.h rbuf.h retr.h ftp.h html.h connect.h host.h fnmatch.h netrc.h
143 getopt$o: wget.h sysdep.h options.h
144 headers$o: config.h wget.h sysdep.h options.h connect.h rbuf.h headers.h
145 host$o: config.h wget.h sysdep.h options.h utils.h host.h url.h
146 html$o: config.h wget.h sysdep.h options.h url.h utils.h ftp.h rbuf.h html.h
147 http$o: config.h wget.h sysdep.h options.h utils.h url.h host.h rbuf.h retr.h headers.h connect.h fnmatch.h netrc.h
148 init$o: config.h wget.h sysdep.h options.h utils.h init.h host.h recur.h netrc.h
149 log$o: config.h wget.h sysdep.h options.h utils.h
150 main$o: config.h wget.h sysdep.h options.h utils.h getopt.h init.h retr.h rbuf.h recur.h host.h
151 md5$o: wget.h sysdep.h options.h md5.h
152 mswindows$o: config.h winsock.h wget.h sysdep.h options.h url.h
153 netrc$o: wget.h sysdep.h options.h utils.h netrc.h init.h
154 rbuf$o: config.h wget.h sysdep.h options.h rbuf.h connect.h
155 recur$o: config.h wget.h sysdep.h options.h url.h recur.h utils.h retr.h rbuf.h ftp.h fnmatch.h host.h
156 retr$o: config.h wget.h sysdep.h options.h utils.h retr.h rbuf.h url.h recur.h ftp.h host.h connect.h
157 url$o: config.h wget.h sysdep.h options.h utils.h url.h host.h html.h
158 utils$o: config.h wget.h sysdep.h options.h utils.h fnmatch.h