new "version resource" file for windows builds
[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 curl_SOURCES = main.c hugehelp.c hugehelp.h urlglob.c writeout.c setup.h \
35         config-win32.h config-mac.h config-vms.h config-riscos.h \
36         urlglob.h version.h writeout.h writeenv.c writeenv.h \
37         getpass.c getpass.h homedir.c homedir.h $(top_srcdir)/lib/strtoofft.c
38
39 curl_LDADD = ../lib/libcurl.la
40 curl_DEPENDENCIES = ../lib/libcurl.la
41 BUILT_SOURCES = hugehelp.c
42 CLEANFILES = hugehelp.c
43 NROFF=@NROFF@ @MANOPT@ # figured out by the configure script
44
45 EXTRA_DIST = mkhelp.pl curlmsg.msg makefile.dj \
46         Makefile.vc6 Makefile.b32 Makefile.m32 Makefile.riscos config.h.in \
47         macos/curl.mcp.xml.sit.hqx \
48         macos/MACINSTALL.TXT \
49         macos/src/curl_GUSIConfig.cpp \
50         macos/src/macos_main.cpp curlmsg.h curlmsg.sdl curlmsg_vms.h \
51         config-amigaos.h makefile.amiga curl.rc
52
53 MANPAGE=$(top_srcdir)/docs/curl.1
54 README=$(top_srcdir)/docs/MANUAL
55 MKHELP=$(top_srcdir)/src/mkhelp.pl
56 HUGE=hugehelp.c
57
58 if USE_MANUAL
59 # Here are the stuff to create a built-in manual
60
61 if HAVE_LIBZ
62 # This generates the hugehelp.c file in both uncompressed and compressed formats
63 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
64         echo '#ifdef HAVE_CONFIG_H' > $(HUGE)
65         echo '#include "config.h"' >> $(HUGE)
66         echo '#endif' >> $(HUGE)
67         echo '#ifndef HAVE_LIBZ' >> $(HUGE)
68         $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
69         echo '#else' >> $(HUGE)
70         $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
71         echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
72 else # HAVE_LIBZ
73 # This generates the hugehelp.c file uncompressed only
74 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
75         $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) > $(HUGE)
76 endif
77
78 else # USE_MANUAL
79 # built-in manual has been disabled, make a blank file
80 $(HUGE):
81         echo "/* built-in manual is disabled, blank function */" > $(HUGE)
82         echo '#include "hugehelp.h"' >> $(HUGE)
83         echo "void hugehelp(void) {}" >>$(HUGE)
84 endif