Dan Fandrich made the hugehelp.c contain both compressed and uncompressed
[platform/upstream/curl.git] / src / Makefile.am
1 #############################################################################
2 #                                  _   _ ____  _     
3 #  Project                     ___| | | |  _ \| |    
4 #                             / __| | | | |_) | |    
5 #                            | (__| |_| |  _ <| |___ 
6 #                             \___|\___/|_| \_\_____|
7 #
8 # Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
9 #
10 # In order to be useful for every potential user, curl and libcurl are
11 # dual-licensed under the MPL and the MIT/X-derivate licenses.
12 #
13 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
14 # copies of the Software, and permit persons to whom the Software is
15 # furnished to do so, under the terms of the MPL or the MIT/X-derivate
16 # licenses. You may pick one of these licenses.
17 #
18 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 # KIND, either express or implied.
20 #
21 # $Id$
22 #############################################################################
23 AUTOMAKE_OPTIONS = foreign nostdinc
24
25 # we use srcdir/include for the static global include files
26 # we use builddir/src for the generated src/config.h file to get found
27 # we use srcdir/lib for the client-private header files
28 INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/src -I$(top_srcdir)/src
29
30 bin_PROGRAMS = curl #memtest
31
32 curl_SOURCES = main.c hugehelp.c urlglob.c writeout.c setup.h \
33         config-win32.h config-mac.h config-vms.h config-riscos.h \
34         urlglob.h version.h writeout.h writeenv.c writeenv.h \
35         getpass.c getpass.h homedir.c homedir.h
36
37 curl_LDADD = ../lib/libcurl.la
38 curl_DEPENDENCIES = ../lib/libcurl.la
39 BUILT_SOURCES = hugehelp.c
40 CLEANFILES = hugehelp.c
41 NROFF=@NROFF@
42
43 EXTRA_DIST = mkhelp.pl curlmsg.msg makefile.dj \
44         Makefile.vc6 Makefile.b32 Makefile.m32 Makefile.riscos config.h.in \
45         macos/curl.mcp.xml.sit.hqx \
46         macos/MACINSTALL.TXT \
47         macos/src/curl_GUSIConfig.cpp \
48         macos/src/macos_main.cpp curlmsg.h curlmsg.sdl curlmsg_vms.h \
49         config-amigaos.h makefile.amiga
50
51 MANPAGE=$(top_srcdir)/docs/curl.1
52 README=$(top_srcdir)/docs/MANUAL
53 MKHELP=$(top_srcdir)/src/mkhelp.pl
54
55 if HAVE_LIBZ
56 # This generates the hugehelp.c file in both uncompressed and compressed formats
57 hugehelp.c: $(README) $(MANPAGE)  mkhelp.pl
58         echo '#include "config.h"' > hugehelp.c
59         echo '#ifndef HAVE_LIBZ' >> hugehelp.c
60         $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> hugehelp.c
61         echo '#else' >> hugehelp.c
62         $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> hugehelp.c
63         echo '#endif /* HAVE_LIBZ */' >> hugehelp.c
64 else
65 # This generates the hugehelp.c file uncompressed only
66 hugehelp.c: $(README) $(MANPAGE)  mkhelp.pl
67         $(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) > hugehelp.c
68 endif
69