1 # Makefile for `wget' utility for MSVC
2 # Copyright (C) 1995, 1996, 1997, 2004, 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 3 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, see <http://www.gnu.org/licenses/>.
17 # In addition, as a special exception, the Free Software Foundation
18 # gives permission to link the code of its release of Wget with the
19 # OpenSSL project's "OpenSSL" library (or with modified versions of it
20 # that use the same license as the "OpenSSL" library), and distribute
21 # the linked executables. You must obey the GNU General Public License
22 # in all respects for all of the code used other than "OpenSSL". If you
23 # modify this file, you may extend this exception to your version of the
24 # file, but you are not obligated to do so. If you do not wish to do
25 # so, delete this exception statement from your version.
28 # SSL (https) support requires the OpenSSL library (see http://www.openssl.org/).
29 # If you do not have OpenSSL installed or wish to build Wget without SSL
30 # support, either comment-out the following lines or define NO_SSL.
33 SSLLIBS = libeay32.lib ssleay32.lib
34 SSLOBJ = openssl$o http-ntlm$o
43 DEFS = /DWINDOWS /D_CONSOLE /DHAVE_CONFIG_H $(SSLDEFS)
44 LIBS = kernel32.lib advapi32.lib wsock32.lib user32.lib gdi32.lib $(SSLLIBS)
47 CFLAGS = /nologo /MTd /Od /Zi /I. $(DEFS)
50 CFLAGS = /nologo /MT /O2 /I. $(DEFS)
51 LDFLAGS = /opt:ref #/opt:nowin98
55 # The following enables security checks and is recommended if you are using
56 # MSVC 7.0 (or later) for 80x86.
57 !ifdef SECURITY_CHECKS
58 CFLAGS = $(CFLAGS) /GS
61 # The following enables link-time code generation (Cross-file
62 # interprocedural optimizations).
64 CFLAGS = $(CFLAGS) /GL
65 LDFLAGS = $(LDFLAGS) /ltcg:status
68 OBJ = cmpt$o safe-ctype$o convert$o connect$o host$o http$o netrc$o \
69 ftp-basic$o ftp$o ftp-ls$o ftp-opie$o getopt$o hash$o \
70 html-parse$o html-url$o progress$o retr$o recur$o res$o url$o \
71 cookies$o init$o utils$o main$o ptimer$o version$o xmalloc$o \
72 mswindows$o gen-md5$o gnu-md5$o log$o $(SSLOBJ) spider$o
76 # If this doesn't work for you, remove the second colon.
80 # Dependencies for building
83 $(LD) @<< $(LDFLAGS) /out:$@ $(OBJ) $(LIBS)
86 $(OBJ): config-post.h config.h connect.h convert.h cookies.h ftp.h \
87 gen-md5.h getopt.h gnu-md5.h hash.h host.h html-parse.h \
88 http-ntlm.h init.h log.h mswindows.h netrc.h options.h \
89 progress.h ptimer.h recur.h res.h retr.h safe-ctype.h \
90 spider.h ssl.h sysdep.h url.h utils.h wget.h xmalloc.h
93 # Dependencies for cleanup