92a0497668e79ca68dce765b880d3d778f6bd379
[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
31
32 EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos     \
33  $(DSP) curllib.dsw config-win32.h config-win32ce.h config-riscos.h     \
34  config-mac.h config.h.in makefile.dj config.dos                \
35  libcurl.framework.make libcurl.plist libcurl.rc config-amigaos.h       \
36  amigaos.c amigaos.h makefile.amiga Makefile.netware nwlib.c nwos.c     \
37  libcurl.imp msvcproj.head msvcproj.foot config-win32ce.h               \
38  config-os400.h setup-os400.h config-symbian.h \
39  Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl
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_srcdir)/include is for libcurl's external include files
52 # $(top_builddir)/lib is for libcurl's generated lib/config.h file
53 # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
54
55 INCLUDES = -I$(top_srcdir)/include \
56            -I$(top_builddir)/lib   \
57            -I$(top_srcdir)/lib
58
59 VERSION=-version-info 5:0:1
60
61 # This flag accepts an argument of the form current[:revision[:age]]. So,
62 # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
63 # 1.
64 #
65 # If either revision or age are omitted, they default to 0. Also note that age
66 # must be less than or equal to the current interface number.
67 #
68 # Here are a set of rules to help you update your library version information:
69 #
70 # 1.Start with version information of 0:0:0 for each libtool library.
71 #
72 # 2.Update the version information only immediately before a public release of
73 # your software. More frequent updates are unnecessary, and only guarantee
74 # that the current interface number gets larger faster.
75 #
76 # 3.If the library source code has changed at all since the last update, then
77 # increment revision (c:r+1:a)
78 #
79 # 4.If any interfaces have been added, removed, or changed since the last
80 # update, increment current, and set revision to 0. (c+1:r=0:a)
81 #
82 # 5.If any interfaces have been added since the last public release, then
83 # increment age. (c:r:a+1)
84 #
85 # 6.If any interfaces have been removed since the last public release, then
86 # set age to 0. (c:r:a=0)
87 #
88
89 if NO_UNDEFINED
90 # The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
91 UNDEF = -no-undefined
92 endif
93
94 if MIMPURE
95 # This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
96 # allocatable but non-writable sections" problems.
97 MIMPURE = -mimpure-text
98 endif
99
100 libcurl_la_LDFLAGS = $(UNDEF) $(VERSION) $(MIMPURE) $(LIBCURL_LIBS)
101
102 # Makefile.inc provides the CSOURCES and HHEADERS defines
103 include Makefile.inc
104
105 libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
106
107 WIN32SOURCES = $(CSOURCES)
108 WIN32HEADERS = $(HHEADERS) config-win32.h
109
110 DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
111 VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
112
113 $(DSP): msvcproj.head msvcproj.foot Makefile.am
114         echo "creating $(DSP)"
115         @(cp $(srcdir)/msvcproj.head $(DSP); \
116         echo "# Begin Group \"Source Files\"" $(DSPOUT); \
117         for file in $(WIN32SOURCES); do \
118         echo "# Begin Source File" $(DSPOUT); \
119         echo "" $(DSPOUT); \
120         echo "SOURCE=.\\"$$file $(DSPOUT); \
121         echo "# End Source File" $(DSPOUT); \
122         done; \
123         echo "# End Group" $(DSPOUT); \
124         echo "# Begin Group \"Header Files\"" $(DSPOUT); \
125         for file in $(WIN32HEADERS); do \
126         echo "# Begin Source File" $(DSPOUT); \
127         echo "" $(DSPOUT); \
128         echo "SOURCE=.\\"$$file $(DSPOUT); \
129         echo "# End Source File" $(DSPOUT); \
130         done; \
131         echo "# End Group" $(DSPOUT); \
132         cat $(srcdir)/msvcproj.foot $(DSPOUT) )
133
134 $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
135         echo "creating $(VCPROJ)"
136         @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
137         for file in $(WIN32SOURCES); do \
138         echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
139         done; \
140         echo "</Filter><Filter  Name=\"Header Files\">" $(VCPROJOUT); \
141         for file in $(WIN32HEADERS); do \
142         echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
143         done; \
144         cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )