Git init
[external/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.pingpong
30
31 CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
32
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 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  mk-ca-bundle.vbs firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h         \
41  Makefile.vxworks config-vms.h
42
43 CLEANFILES = $(DSP) $(VCPROJ)
44
45 lib_LTLIBRARIES = libcurl.la
46 LIBCURL_LIBS = @LIBCURL_LIBS@
47
48 # This might hold -Werror
49 CFLAGS += @CURL_CFLAG_EXTRAS@
50
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.
55 #
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
63
64 if USE_EMBEDDED_ARES
65 INCLUDES = -I$(top_builddir)/include/curl \
66            -I$(top_builddir)/include      \
67            -I$(top_srcdir)/include        \
68            -I$(top_builddir)/lib          \
69            -I$(top_srcdir)/lib            \
70            -I$(top_builddir)/ares         \
71            -I$(top_srcdir)/ares
72 else
73 INCLUDES = -I$(top_builddir)/include/curl \
74            -I$(top_builddir)/include      \
75            -I$(top_srcdir)/include        \
76            -I$(top_builddir)/lib          \
77            -I$(top_srcdir)/lib
78 endif
79
80 if SONAME_BUMP
81 #
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.
87 #
88 # This conditional soname bump SHOULD be removed at next "proper" bump.
89 #
90 VERSIONINFO=-version-info 7:0:2
91 else
92 VERSIONINFO=-version-info 6:0:2
93 endif
94
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
97 # 1.
98 #
99 # Here's the simplified rule guide on how to change -version-info:
100 # (current version is C:R:A)
101 #
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
105 #
106 # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
107
108 if NO_UNDEFINED
109 # The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
110 UNDEF = -no-undefined
111 endif
112
113 if MIMPURE
114 # This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
115 # allocatable but non-writable sections" problems.
116 MIMPURE = -mimpure-text
117 endif
118
119 if VERSIONED_SYMBOLS
120 VERSIONED_SYMBOLS = -Wl,--version-script=libcurl.vers
121 endif
122
123 libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS) $(VERSIONED_SYMBOLS)
124
125 # Makefile.inc provides the CSOURCES and HHEADERS defines
126 include Makefile.inc
127
128 libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
129
130 WIN32SOURCES = $(CSOURCES)
131 WIN32HEADERS = $(HHEADERS) config-win32.h
132
133 DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
134 VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
135
136 $(DSP): msvcproj.head msvcproj.foot Makefile.am
137         echo "creating $(DSP)"
138         @(cp $(srcdir)/msvcproj.head $(DSP); \
139         echo "# Begin Group \"Source Files\"" $(DSPOUT); \
140         echo "" $(DSPOUT); \
141         echo "# PROP Default_Filter \"\"" $(DSPOUT); \
142         win32_srcs='$(WIN32SOURCES)'; \
143         sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
144         for file in $$sorted_srcs; do \
145         echo "# Begin Source File" $(DSPOUT); \
146         echo "" $(DSPOUT); \
147         echo "SOURCE=.\\"$$file $(DSPOUT); \
148         echo "# End Source File" $(DSPOUT); \
149         done; \
150         echo "# End Group" $(DSPOUT); \
151         echo "# Begin Group \"Header Files\"" $(DSPOUT); \
152         echo "" $(DSPOUT); \
153         echo "# PROP Default_Filter \"\"" $(DSPOUT); \
154         win32_hdrs='$(WIN32HEADERS)'; \
155         sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
156         for file in $$sorted_hdrs; do \
157         echo "# Begin Source File" $(DSPOUT); \
158         echo "" $(DSPOUT); \
159         echo "SOURCE=.\\"$$file $(DSPOUT); \
160         echo "# End Source File" $(DSPOUT); \
161         done; \
162         echo "# End Group" $(DSPOUT); \
163         cat $(srcdir)/msvcproj.foot $(DSPOUT) )
164
165 $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
166         echo "creating $(VCPROJ)"
167         @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
168         win32_srcs='$(WIN32SOURCES)'; \
169         sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
170         for file in $$sorted_srcs; do \
171         echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
172         done; \
173         echo "</Filter><Filter  Name=\"Header Files\">" $(VCPROJOUT); \
174         win32_hdrs='$(WIN32HEADERS)'; \
175         sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
176         for file in $$sorted_hdrs; do \
177         echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
178         done; \
179         cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )