bump VERSIONINFO for the upcoming release
[platform/upstream/curl.git] / lib / Makefile.am
1 #***************************************************************************
2 #                                  _   _ ____  _
3 #  Project                     ___| | | |  _ \| |
4 #                             / __| | | | |_) | |
5 #                            | (__| |_| |  _ <| |___
6 #                             \___|\___/|_| \_\_____|
7 #
8 # Copyright (C) 1998 - 2008, 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 DSP = curllib.dsp
26 VCPROJ = curllib.vcproj
27
28 DOCS = README.encoding README.memoryleak README.ares README.curlx       \
29  README.hostip README.multi_socket README.httpauth README.pipelining    \
30  README.NSS README.curl_off_t
31
32 EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos $(DSP) \
33  curllib.dsw config-win32.h config-win32ce.h config-riscos.h config-mac.h  \
34  config.h.in makefile.dj config.dos libcurl.framework.make libcurl.plist   \
35  libcurl.rc config-amigaos.h amigaos.c amigaos.h makefile.amiga            \
36  Makefile.netware nwlib.c nwos.c libcurl.imp msvcproj.head msvcproj.foot   \
37  config-win32ce.h config-os400.h setup-os400.h config-symbian.h            \
38  Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl            \
39  firefox-db2pem.sh
40
41 CLEANFILES = $(DSP) $(VCPROJ)
42
43 lib_LTLIBRARIES = libcurl.la
44 LIBCURL_LIBS = @LIBCURL_LIBS@
45
46 # Specify our include paths here, and do it relative to $(top_srcdir) and
47 # $(top_builddir), to ensure that these paths which belong to the library
48 # being currently built and tested are searched before the library which
49 # might possibly already be installed in the system.
50 #
51 # $(top_builddir)/include is for libcurl's generated curl/curlbuild.h file
52 # $(top_srcdir)/include is for libcurl's external include files
53 # $(top_builddir)/lib is for libcurl's generated lib/config.h file
54 # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
55
56 INCLUDES = -I$(top_builddir)/include \
57            -I$(top_srcdir)/include   \
58            -I$(top_builddir)/lib     \
59            -I$(top_srcdir)/lib
60
61 if SONAME_BUMP
62 #
63 # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
64 # it is. The problem is that we try to avoid the bump as hard as possible, but
65 # yet it is still necessary for a few rare situations. The configure script will
66 # attempt to figure out these situations, and it can be forced to consider this
67 # to be such a case! See README.curl_off_t for further details.
68 #
69 # This conditional soname bump SHOULD be removed at next "proper" bump.
70 #
71 VERSIONINFO=-version-info 6:1:1
72 else
73 VERSIONINFO=-version-info 5:1:1
74 endif
75
76 # This flag accepts an argument of the form current[:revision[:age]]. So,
77 # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
78 # 1.
79 #
80 # If either revision or age are omitted, they default to 0. Also note that age
81 # must be less than or equal to the current interface number.
82 #
83 # Here are a set of rules to help you update your library version information:
84 #
85 # 1.Start with version information of 0:0:0 for each libtool library.
86 #
87 # 2.Update the version information only immediately before a public release of
88 # your software. More frequent updates are unnecessary, and only guarantee
89 # that the current interface number gets larger faster.
90 #
91 # 3.If the library source code has changed at all since the last update, then
92 # increment revision (c:r+1:a)
93 #
94 # 4.If any interfaces have been added, removed, or changed since the last
95 # update, increment current, and set revision to 0. (c+1:r=0:a)
96 #
97 # 5.If any interfaces have been added since the last public release, then
98 # increment age. (c:r:a+1)
99 #
100 # 6.If any interfaces have been removed since the last public release, then
101 # set age to 0. (c:r:a=0)
102 #
103
104 if NO_UNDEFINED
105 # The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
106 UNDEF = -no-undefined
107 endif
108
109 if MIMPURE
110 # This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
111 # allocatable but non-writable sections" problems.
112 MIMPURE = -mimpure-text
113 endif
114
115 libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
116
117 # Makefile.inc provides the CSOURCES and HHEADERS defines
118 include Makefile.inc
119
120 libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
121
122 WIN32SOURCES = $(CSOURCES)
123 WIN32HEADERS = $(HHEADERS) config-win32.h
124
125 DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
126 VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
127
128 $(DSP): msvcproj.head msvcproj.foot Makefile.am
129         echo "creating $(DSP)"
130         @(cp $(srcdir)/msvcproj.head $(DSP); \
131         echo "# Begin Group \"Source Files\"" $(DSPOUT); \
132         echo "" $(DSPOUT); \
133         echo "# PROP Default_Filter \"\"" $(DSPOUT); \
134         win32_srcs='$(WIN32SOURCES)'; \
135         sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
136         for file in $$sorted_srcs; do \
137         echo "# Begin Source File" $(DSPOUT); \
138         echo "" $(DSPOUT); \
139         echo "SOURCE=.\\"$$file $(DSPOUT); \
140         echo "# End Source File" $(DSPOUT); \
141         done; \
142         echo "# End Group" $(DSPOUT); \
143         echo "# Begin Group \"Header Files\"" $(DSPOUT); \
144         echo "" $(DSPOUT); \
145         echo "# PROP Default_Filter \"\"" $(DSPOUT); \
146         win32_hdrs='$(WIN32HEADERS)'; \
147         sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
148         for file in $$sorted_hdrs; do \
149         echo "# Begin Source File" $(DSPOUT); \
150         echo "" $(DSPOUT); \
151         echo "SOURCE=.\\"$$file $(DSPOUT); \
152         echo "# End Source File" $(DSPOUT); \
153         done; \
154         echo "# End Group" $(DSPOUT); \
155         cat $(srcdir)/msvcproj.foot $(DSPOUT) )
156
157 $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
158         echo "creating $(VCPROJ)"
159         @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
160         win32_srcs='$(WIN32SOURCES)'; \
161         sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
162         for file in $$sorted_srcs; do \
163         echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
164         done; \
165         echo "</Filter><Filter  Name=\"Header Files\">" $(VCPROJOUT); \
166         win32_hdrs='$(WIN32HEADERS)'; \
167         sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
168         for file in $$sorted_hdrs; do \
169         echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
170         done; \
171         cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )