use Makefile.inc and make it get included in dist archives
[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 # 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 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include -I$(top_builddir)/src \
30         -I$(top_srcdir)/lib
31
32 bin_PROGRAMS = curl
33
34 include Makefile.inc
35
36 curl_LDADD = ../lib/libcurl.la
37 curl_DEPENDENCIES = ../lib/libcurl.la
38 BUILT_SOURCES = hugehelp.c
39 CLEANFILES = hugehelp.c
40 NROFF=@NROFF@ @MANOPT@ # figured out by the configure script
41
42 EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 Makefile.m32 \
43         Makefile.riscos config.h.in macos/curl.mcp.xml.sit.hqx            \
44         macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp                \
45         macos/src/macos_main.cpp config-amigaos.h makefile.amiga curl.rc  \
46         Makefile.netware Makefile.inc
47
48 MANPAGE=$(top_srcdir)/docs/curl.1
49 README=$(top_srcdir)/docs/MANUAL
50 MKHELP=$(top_srcdir)/src/mkhelp.pl
51 HUGE=hugehelp.c
52
53 if USE_MANUAL
54 # Here are the stuff to create a built-in manual
55
56 if HAVE_LIBZ
57 # This generates the hugehelp.c file in both uncompressed and compressed formats
58 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
59         echo '#include "setup.h"' > $(HUGE)
60         echo '#ifndef HAVE_LIBZ' >> $(HUGE)
61         $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
62         echo '#else' >> $(HUGE)
63         $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
64         echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
65 else # HAVE_LIBZ
66 # This generates the hugehelp.c file uncompressed only
67 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
68         echo '#include "setup.h"' > $(HUGE)
69         $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
70 endif
71
72 else # USE_MANUAL
73 # built-in manual has been disabled, make a blank file
74 $(HUGE):
75         echo "/* built-in manual is disabled, blank function */" > $(HUGE)
76         echo '#include "hugehelp.h"' >> $(HUGE)
77         echo "void hugehelp(void) {}" >>$(HUGE)
78 endif