1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) 1998 - 2013, 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 ###########################################################################
22 AUTOMAKE_OPTIONS = foreign nostdinc
24 # remove targets if the command fails
27 # Specify our include paths here, and do it relative to $(top_srcdir) and
28 # $(top_builddir), to ensure that these paths which belong to the library
29 # being currently built and tested are searched before the library which
30 # might possibly already be installed in the system.
32 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
33 # $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
34 # $(top_srcdir)/include is for libcurl's external include files
35 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
36 # $(top_builddir)/src is for curl's generated src/curl_config.h file
37 # $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
38 # $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files
40 AM_CPPFLAGS = -I$(top_builddir)/include/curl \
41 -I$(top_builddir)/include \
42 -I$(top_srcdir)/include \
43 -I$(top_builddir)/lib \
44 -I$(top_builddir)/src \
50 if USE_CPPFLAG_CURL_STATICLIB
51 AM_CPPFLAGS += -DCURL_STATICLIB
56 # This might hold -Werror
57 CFLAGS += @CURL_CFLAG_EXTRAS@
59 # Prevent LIBS from being used for all link targets
60 LIBS = $(BLANK_AT_MAKETIME)
62 if USE_EXPLICIT_LIB_DEPS
63 curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@
65 curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@
68 curl_LDFLAGS = @LIBMETALINK_LDFLAGS@
69 curl_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
70 curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
72 # if unit tests are enabled, build a static library to link them with
74 noinst_LTLIBRARIES = libcurltool.la
75 libcurltool_la_CPPFLAGS = $(LIBMETALINK_CPPFLAGS) $(AM_CPPFLAGS)
76 libcurltool_la_CFLAGS = -DUNITTESTS
77 libcurltool_la_LDFLAGS = -static $(LINKFLAGS)
78 libcurltool_la_SOURCES = $(curl_SOURCES)
81 BUILT_SOURCES = tool_hugehelp.c
82 CLEANFILES = tool_hugehelp.c
83 # Use the C locale to ensure that only ASCII characters appear in the
85 NROFF=env LC_ALL=C @NROFF@ @MANOPT@ # figured out by the configure script
87 EXTRA_DIST = mkhelp.pl makefile.dj Makefile.vc6 Makefile.b32 Makefile.m32 \
88 macos/curl.mcp.xml.sit.hqx \
89 macos/MACINSTALL.TXT macos/src/curl_GUSIConfig.cpp \
90 macos/src/macos_main.cpp makefile.amiga curl.rc \
91 Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt
93 MANPAGE=$(top_srcdir)/docs/curl.1
94 README=$(top_srcdir)/docs/MANUAL
95 MKHELP=$(top_srcdir)/src/mkhelp.pl
99 # Here are the stuff to create a built-in manual
102 # This generates the tool_hugehelp.c file in both uncompressed and
104 $(HUGE): $(README) $(MANPAGE) mkhelp.pl
105 echo '#include "tool_setup.h"' > $(HUGE)
106 echo '#ifndef HAVE_LIBZ' >> $(HUGE)
107 $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
108 echo '#else' >> $(HUGE)
109 $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
110 echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
112 # This generates the tool_hugehelp.c file uncompressed only
113 $(HUGE): $(README) $(MANPAGE) mkhelp.pl
114 echo '#include "tool_setup.h"' > $(HUGE)
115 $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
119 # built-in manual has been disabled, make a blank file
121 echo "/* built-in manual is disabled, blank function */" > $(HUGE)
122 echo '#include "tool_hugehelp.h"' >> $(HUGE)
123 echo "void hugehelp(void) {}" >>$(HUGE)
126 # ignore tool_hugehelp.c since it is generated source code and it plays
127 # by slightly different rules!
129 @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/src -Wtool_hugehelp.c $(CURL_CFILES) $(CURL_HFILES)
132 # for debug builds, we scan the sources on all regular make invokes