2
# $Id: Makefile.am,v 1.20 2002/03/06 22:19:16 bagder Exp $
1
#***************************************************************************
3
# Project ___| | | | _ \| |
5
# | (__| |_| | _ <| |___
6
# \___|\___/|_| \_\_____|
8
# Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
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.
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.
18
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
# KIND, either express or implied.
21
# $Id: Makefile.am,v 1.48 2004/04/25 08:13:07 bagder Exp $
22
###########################################################################
5
23
AUTOMAKE_OPTIONS = foreign nostdinc
25
# we use srcdir/src for "private" includes
7
26
# we use srcdir/include for the static global include files
8
# we use builddir/src for the generated src/config.h file to get found
9
# we use srcdir/lib for the client-private header files
10
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/src -I$(top_srcdir)/src
12
bin_PROGRAMS = curl #memtest
14
#memtest_SOURCES = memtest.c
15
#memtest_LDADD = $(top_srcdir)/lib/libcurl.la
17
curl_SOURCES = main.c hugehelp.c urlglob.c writeout.c setup.h \
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 \
34
# libcurl has sources that provide functions named curlx_* that aren't part of
35
# the official API, but we re-use the code here to avoid duplication.
36
curlx_ones = $(top_srcdir)/lib/strtoofft.c $(top_srcdir)/lib/timeval.c
38
curl_SOURCES = main.c hugehelp.c hugehelp.h urlglob.c writeout.c setup.h \
39
config-win32.h config-mac.h config-vms.h config-riscos.h urlglob.h \
40
version.h writeout.h writeenv.c writeenv.h getpass.c getpass.h \
41
homedir.c homedir.h $(curlx_ones)
28
43
curl_LDADD = ../lib/libcurl.la
29
44
curl_DEPENDENCIES = ../lib/libcurl.la
30
45
BUILT_SOURCES = hugehelp.c
31
46
CLEANFILES = hugehelp.c
47
NROFF=@NROFF@ @MANOPT@ # figured out by the configure script
34
EXTRA_DIST = mkhelp.pl curlmsg.msg \
35
Makefile.vc6 Makefile.b32 Makefile.m32 config.h.in \
36
macos/curl.mcp.xml.sit.hqx \
37
macos/MACINSTALL.TXT \
38
macos/src/curl_GUSIConfig.cpp \
39
macos/src/macos_main.cpp
49
EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 Makefile.m32 \
50
Makefile.riscos config.h.in macos/curl.mcp.xml.sit.hqx \
51
macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp \
52
macos/src/macos_main.cpp config-amigaos.h makefile.amiga curl.rc \
53
Makefile.netware config-netware.h
41
55
MANPAGE=$(top_srcdir)/docs/curl.1
42
56
README=$(top_srcdir)/docs/MANUAL
43
57
MKHELP=$(top_srcdir)/src/mkhelp.pl
45
# This generates the hugehelp.c file
46
hugehelp.c: $(README) $(MANPAGE) mkhelp.pl
48
$(NROFF) -man $(MANPAGE) | $(PERL) $(MKHELP) $(README) > hugehelp.c
61
# Here are the stuff to create a built-in manual
64
# This generates the hugehelp.c file in both uncompressed and compressed formats
65
$(HUGE): $(README) $(MANPAGE) mkhelp.pl
66
echo '#ifdef HAVE_CONFIG_H' > $(HUGE)
67
echo '#include "config.h"' >> $(HUGE)
68
echo '#endif' >> $(HUGE)
69
echo '#ifndef HAVE_LIBZ' >> $(HUGE)
70
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
71
echo '#else' >> $(HUGE)
72
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
73
echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
75
# This generates the hugehelp.c file uncompressed only
76
$(HUGE): $(README) $(MANPAGE) mkhelp.pl
77
echo '#ifdef HAVE_CONFIG_H' > $(HUGE)
78
echo '#include "config.h"' >> $(HUGE)
79
echo '#endif' >> $(HUGE)
80
$(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
84
# built-in manual has been disabled, make a blank file
86
echo "/* built-in manual is disabled, blank function */" > $(HUGE)
87
echo '#include "hugehelp.h"' >> $(HUGE)
88
echo "void hugehelp(void) {}" >>$(HUGE)