Better separate the library dependencies into those required by libcurl
[platform/upstream/curl.git] / src / Makefile.am
1 #***************************************************************************
2 #                                  _   _ ____  _
3 #  Project                     ___| | | |  _ \| |
4 #                             / __| | | | |_) | |
5 #                            | (__| |_| |  _ <| |___
6 #                             \___|\___/|_| \_\_____|
7 #
8 # Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
9 #
10 # This software is licensed as described in the file COPYING, which
11 # you should have received as part of this distribution. The terms
12 # are also available at http://curl.haxx.se/docs/copyright.html.
13 #
14 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 # copies of the Software, and permit persons to whom the Software is
16 # furnished to do so, under the terms of the COPYING file.
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/src for "private" includes
26 # we use srcdir/include for the static global include files
27 # we use builddir/src for the generated include files to get found
28 # we use srcdir/lib for the header files we "borrow" from the lib
29
30 INCLUDES = -I$(top_srcdir)/include \
31            -I$(top_builddir)/lib   \
32            -I$(top_builddir)/src   \
33            -I$(top_srcdir)/lib     \
34            -I$(top_srcdir)/src
35
36 bin_PROGRAMS = curl
37
38 include Makefile.inc
39
40 curl_LDADD = ../lib/libcurl.la @CURL_LIBS@
41 curl_DEPENDENCIES = ../lib/libcurl.la
42 BUILT_SOURCES = hugehelp.c
43 CLEANFILES = hugehelp.c
44 NROFF=@NROFF@ @MANOPT@ # figured out by the configure script
45
46 EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 Makefile.m32 \
47         Makefile.riscos config.h.in macos/curl.mcp.xml.sit.hqx            \
48         macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp                \
49         macos/src/macos_main.cpp config-amigaos.h makefile.amiga curl.rc  \
50         Makefile.netware Makefile.inc Makefile.Watcom
51
52 MANPAGE=$(top_srcdir)/docs/curl.1
53 README=$(top_srcdir)/docs/MANUAL
54 MKHELP=$(top_srcdir)/src/mkhelp.pl
55 HUGE=hugehelp.c
56
57 if USE_MANUAL
58 # Here are the stuff to create a built-in manual
59
60 if HAVE_LIBZ
61 # This generates the hugehelp.c file in both uncompressed and compressed formats
62 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
63         echo '#include "setup.h"' > $(HUGE)
64         echo '#ifndef HAVE_LIBZ' >> $(HUGE)
65         $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
66         echo '#else' >> $(HUGE)
67         $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
68         echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
69 else # HAVE_LIBZ
70 # This generates the hugehelp.c file uncompressed only
71 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
72         echo '#include "setup.h"' > $(HUGE)
73         $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
74 endif
75
76 else # USE_MANUAL
77 # built-in manual has been disabled, make a blank file
78 $(HUGE):
79         echo "/* built-in manual is disabled, blank function */" > $(HUGE)
80         echo '#include "hugehelp.h"' >> $(HUGE)
81         echo "void hugehelp(void) {}" >>$(HUGE)
82 endif