1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) 1998 - 2011, 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 libcurl.imp 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
43 CLEANFILES = $(DSP) $(VCPROJ)
45 lib_LTLIBRARIES = libcurl.la
46 LIBCURL_LIBS = @LIBCURL_LIBS@
48 # This might hold -Werror
49 CFLAGS += @CURL_CFLAG_EXTRAS@
51 # Specify our include paths here, and do it relative to $(top_srcdir) and
52 # $(top_builddir), to ensure that these paths which belong to the library
53 # being currently built and tested are searched before the library which
54 # might possibly already be installed in the system.
56 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
57 # $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
58 # $(top_srcdir)/include is for libcurl's external include files
59 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
60 # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
61 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
62 # $(top_srcdir)/ares is for in-tree c-ares's external include files
65 INCLUDES = -I$(top_builddir)/include/curl \
66 -I$(top_builddir)/include \
67 -I$(top_srcdir)/include \
68 -I$(top_builddir)/lib \
70 -I$(top_builddir)/ares \
73 INCLUDES = -I$(top_builddir)/include/curl \
74 -I$(top_builddir)/include \
75 -I$(top_srcdir)/include \
76 -I$(top_builddir)/lib \
82 # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
83 # it is. The problem is that we try to avoid the bump as hard as possible, but
84 # yet it is still necessary for a few rare situations. The configure script will
85 # attempt to figure out these situations, and it can be forced to consider this
86 # to be such a case! See README.curl_off_t for further details.
88 # This conditional soname bump SHOULD be removed at next "proper" bump.
90 VERSIONINFO=-version-info 7:0:2
92 VERSIONINFO=-version-info 6:0:2
95 # This flag accepts an argument of the form current[:revision[:age]]. So,
96 # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
99 # Here's the simplified rule guide on how to change -version-info:
100 # (current version is C:R:A)
102 # 1. if there are only source changes, use C:R+1:A
103 # 2. if interfaces were added use C+1:0:A+1
104 # 3. if interfaces were removed, then use C+1:0:0
106 # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
109 # The -no-undefined flag is crucial to build fine on some platforms
110 UNDEF = -no-undefined
114 # This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
115 # allocatable but non-writable sections" problems.
116 MIMPURE = -mimpure-text
120 VERSIONED_SYMBOLS = -Wl,--version-script=libcurl.vers
123 libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(VERSIONED_SYMBOLS) $(LIBCURL_LIBS)
125 # unit testing static library built only along with unit tests
127 noinst_LTLIBRARIES = libcurlu.la
132 libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DUNITTESTS
133 libcurlu_la_LDFLAGS = -static $(LIBCURL_LIBS)
135 # Makefile.inc provides the CSOURCES and HHEADERS defines
138 libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
139 libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
141 WIN32SOURCES = $(CSOURCES)
142 WIN32HEADERS = $(HHEADERS) config-win32.h
144 DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
145 VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
147 $(DSP): msvcproj.head msvcproj.foot Makefile.am
148 echo "creating $(DSP)"
149 @(cp $(srcdir)/msvcproj.head $(DSP); \
150 echo "# Begin Group \"Source Files\"" $(DSPOUT); \
152 echo "# PROP Default_Filter \"\"" $(DSPOUT); \
153 win32_srcs='$(WIN32SOURCES)'; \
154 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
155 for file in $$sorted_srcs; do \
156 echo "# Begin Source File" $(DSPOUT); \
158 echo "SOURCE=.\\"$$file $(DSPOUT); \
159 echo "# End Source File" $(DSPOUT); \
161 echo "# End Group" $(DSPOUT); \
162 echo "# Begin Group \"Header Files\"" $(DSPOUT); \
164 echo "# PROP Default_Filter \"\"" $(DSPOUT); \
165 win32_hdrs='$(WIN32HEADERS)'; \
166 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
167 for file in $$sorted_hdrs; do \
168 echo "# Begin Source File" $(DSPOUT); \
170 echo "SOURCE=.\\"$$file $(DSPOUT); \
171 echo "# End Source File" $(DSPOUT); \
173 echo "# End Group" $(DSPOUT); \
174 cat $(srcdir)/msvcproj.foot $(DSPOUT) )
176 $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
177 echo "creating $(VCPROJ)"
178 @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
179 win32_srcs='$(WIN32SOURCES)'; \
180 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
181 for file in $$sorted_srcs; do \
182 echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
184 echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT); \
185 win32_hdrs='$(WIN32HEADERS)'; \
186 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
187 for file in $$sorted_hdrs; do \
188 echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
190 cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
194 @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
197 # for debug builds, we scan the sources on all regular make invokes