1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) 1998 - 2012, 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
25 VCPROJ = libcurl.vcproj
27 DOCS = README.encoding README.memoryleak README.ares README.curlx \
28 README.hostip README.multi_socket README.httpauth README.pipelining \
29 README.curl_off_t README.pingpong
31 CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
33 EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 $(DSP) \
34 vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h \
35 config-mac.h curl_config.h.in makefile.dj config-dos.h libcurl.plist \
36 libcurl.rc config-amigaos.h makefile.amiga \
37 Makefile.netware nwlib.c nwos.c msvcproj.head msvcproj.foot \
38 config-win32ce.h config-os400.h setup-os400.h config-symbian.h \
39 Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl \
40 mk-ca-bundle.vbs firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h \
41 Makefile.vxworks config-vms.h checksrc.pl objnames-test.sh \
44 CLEANFILES = $(DSP) $(VCPROJ)
46 lib_LTLIBRARIES = libcurl.la
47 LIBCURL_LIBS = @LIBCURL_LIBS@
49 # This might hold -Werror
50 CFLAGS += @CURL_CFLAG_EXTRAS@
52 CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
54 # Specify our include paths here, and do it relative to $(top_srcdir) and
55 # $(top_builddir), to ensure that these paths which belong to the library
56 # being currently built and tested are searched before the library which
57 # might possibly already be installed in the system.
59 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
60 # $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
61 # $(top_srcdir)/include is for libcurl's external include files
62 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
63 # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
64 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
65 # $(top_srcdir)/ares is for in-tree c-ares's external include files
68 AM_CPPFLAGS = -I$(top_builddir)/include/curl \
69 -I$(top_builddir)/include \
70 -I$(top_srcdir)/include \
71 -I$(top_builddir)/lib \
73 -I$(top_builddir)/ares \
76 AM_CPPFLAGS = -I$(top_builddir)/include/curl \
77 -I$(top_builddir)/include \
78 -I$(top_srcdir)/include \
79 -I$(top_builddir)/lib \
83 # Mostly for Windows build targets, when building libcurl library
84 if USE_CPPFLAG_BUILDING_LIBCURL
85 AM_CPPFLAGS += -DBUILDING_LIBCURL
88 # Mostly for Windows build targets, when building static libcurl
89 if USE_CPPFLAG_CURL_STATICLIB
90 AM_CPPFLAGS += -DCURL_STATICLIB
95 # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
96 # it is. The problem is that we try to avoid the bump as hard as possible, but
97 # yet it is still necessary for a few rare situations. The configure script will
98 # attempt to figure out these situations, and it can be forced to consider this
99 # to be such a case! See README.curl_off_t for further details.
101 # This conditional soname bump SHOULD be removed at next "proper" bump.
103 VERSIONINFO=-version-info 8:0:3
105 VERSIONINFO=-version-info 7:0:3
108 # This flag accepts an argument of the form current[:revision[:age]]. So,
109 # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
112 # Here's the simplified rule guide on how to change -version-info:
113 # (current version is C:R:A)
115 # 1. if there are only source changes, use C:R+1:A
116 # 2. if interfaces were added use C+1:0:A+1
117 # 3. if interfaces were removed, then use C+1:0:0
119 # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
122 # The -no-undefined flag is crucial to build fine on some platforms
123 UNDEF = -no-undefined
127 # This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
128 # allocatable but non-writable sections" problems.
129 MIMPURE = -mimpure-text
133 VERSIONED_SYMBOLS = -Wl,--version-script=libcurl.vers
136 # Prevent LIBS from being used for all link targets
137 LIBS = $(BLANK_AT_MAKETIME)
139 libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(VERSIONED_SYMBOLS) $(LIBCURL_LIBS)
141 if DOING_CURL_SYMBOL_HIDING
142 libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_HIDDEN_SYMBOLS
143 libcurl_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_CURL_SYMBOL_HIDING)
145 libcurl_la_CPPFLAGS = $(AM_CPPFLAGS)
146 libcurl_la_CFLAGS = $(AM_CFLAGS)
149 # unit testing static library built only along with unit tests
151 noinst_LTLIBRARIES = libcurlu.la
156 libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DUNITTESTS
157 libcurlu_la_LDFLAGS = -static $(LIBCURL_LIBS)
158 libcurlu_la_CFLAGS = $(AM_CFLAGS)
160 # Makefile.inc provides the CSOURCES and HHEADERS defines
163 libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
164 libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
166 WIN32SOURCES = $(CSOURCES)
167 WIN32HEADERS = $(HHEADERS) config-win32.h
169 DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
170 VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
172 $(DSP): msvcproj.head msvcproj.foot Makefile.am
173 echo "creating $(DSP)"
174 @(cp $(srcdir)/msvcproj.head $(DSP); \
175 echo "# Begin Group \"Source Files\"" $(DSPOUT); \
177 echo "# PROP Default_Filter \"\"" $(DSPOUT); \
178 win32_srcs='$(WIN32SOURCES)'; \
179 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
180 for file in $$sorted_srcs; do \
181 echo "# Begin Source File" $(DSPOUT); \
183 echo "SOURCE=.\\"$$file $(DSPOUT); \
184 echo "# End Source File" $(DSPOUT); \
186 echo "# End Group" $(DSPOUT); \
187 echo "# Begin Group \"Header Files\"" $(DSPOUT); \
189 echo "# PROP Default_Filter \"\"" $(DSPOUT); \
190 win32_hdrs='$(WIN32HEADERS)'; \
191 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
192 for file in $$sorted_hdrs; do \
193 echo "# Begin Source File" $(DSPOUT); \
195 echo "SOURCE=.\\"$$file $(DSPOUT); \
196 echo "# End Source File" $(DSPOUT); \
198 echo "# End Group" $(DSPOUT); \
199 cat $(srcdir)/msvcproj.foot $(DSPOUT) )
201 $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
202 echo "creating $(VCPROJ)"
203 @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
204 win32_srcs='$(WIN32SOURCES)'; \
205 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
206 for file in $$sorted_srcs; do \
207 echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
209 echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT); \
210 win32_hdrs='$(WIN32HEADERS)'; \
211 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
212 for file in $$sorted_hdrs; do \
213 echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
215 cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
219 @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
222 # for debug builds, we scan the sources on all regular make invokes