remove the CVSish $Id$ lines
[platform/upstream/curl.git] / lib / Makefile.am
1 #***************************************************************************
2 #                                  _   _ ____  _
3 #  Project                     ___| | | |  _ \| |
4 #                             / __| | | | |_) | |
5 #                            | (__| |_| |  _ <| |___
6 #                             \___|\___/|_| \_\_____|
7 #
8 # Copyright (C) 1998 - 2010, 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 ###########################################################################
22 AUTOMAKE_OPTIONS = foreign nostdinc
23
24 DSP = vc6libcurl.dsp
25 VCPROJ = libcurl.vcproj
26
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.cmake README.pingpong
30
31 CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
32
33 EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos $(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 libcurl.plist        \
36  libcurl.rc config-amigaos.h amigaos.c 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  firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h Makefile.vxworks
41
42 CLEANFILES = $(DSP) $(VCPROJ)
43
44 lib_LTLIBRARIES = libcurl.la
45 LIBCURL_LIBS = @LIBCURL_LIBS@
46
47 # Specify our include paths here, and do it relative to $(top_srcdir) and
48 # $(top_builddir), to ensure that these paths which belong to the library
49 # being currently built and tested are searched before the library which
50 # might possibly already be installed in the system.
51 #
52 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
53 # $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
54 # $(top_srcdir)/include is for libcurl's external include files
55 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
56 # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
57 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
58 # $(top_srcdir)/ares is for in-tree c-ares's external include files
59
60 if USE_EMBEDDED_ARES
61 INCLUDES = -I$(top_builddir)/include/curl \
62            -I$(top_builddir)/include      \
63            -I$(top_srcdir)/include        \
64            -I$(top_builddir)/lib          \
65            -I$(top_srcdir)/lib            \
66            -I$(top_builddir)/ares         \
67            -I$(top_srcdir)/ares
68 else
69 INCLUDES = -I$(top_builddir)/include/curl \
70            -I$(top_builddir)/include      \
71            -I$(top_srcdir)/include        \
72            -I$(top_builddir)/lib          \
73            -I$(top_srcdir)/lib
74 endif
75
76 if SONAME_BUMP
77 #
78 # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
79 # it is. The problem is that we try to avoid the bump as hard as possible, but
80 # yet it is still necessary for a few rare situations. The configure script will
81 # attempt to figure out these situations, and it can be forced to consider this
82 # to be such a case! See README.curl_off_t for further details.
83 #
84 # This conditional soname bump SHOULD be removed at next "proper" bump.
85 #
86 VERSIONINFO=-version-info 7:0:2
87 else
88 VERSIONINFO=-version-info 6:0:2
89 endif
90
91 # This flag accepts an argument of the form current[:revision[:age]]. So,
92 # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
93 # 1.
94 #
95 # Here's the simplified rule guide on how to change -version-info:
96 # (current version is C:R:A)
97 #
98 # 1. if there are only source changes, use C:R+1:A
99 # 2. if interfaces were added use C+1:0:A+1
100 # 3. if interfaces were removed, then use C+1:0:0
101 #
102 # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
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) )