Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 223 lines (191 sloc) 8.069 kB
7a82810 @bagder Added the curl source header and changed some comments
authored
1 #***************************************************************************
2 # _ _ ____ _
3 # Project ___| | | | _ \| |
4 # / __| | | | |_) | |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
ae1912c @bagder Initial revision
authored
7 #
2142349 @yangtse configure: Windows cross-compilation fixes
yangtse authored
8 # Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
ae1912c @bagder Initial revision
authored
9 #
7a82810 @bagder Added the curl source header and changed some comments
authored
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 ###########################################################################
e6ed347 @bagder automake usage and options cleanup
authored
22 AUTOMAKE_OPTIONS = foreign nostdinc
ae1912c @bagder Initial revision
authored
23
619869c @yangtse Renamed vc6 workspace and project files to avoid filename clash when …
yangtse authored
24 DSP = vc6libcurl.dsp
8b66981 @bagder - I renamed everything in the windows builds files that used the name…
authored
25 VCPROJ = libcurl.vcproj
04e2520 @bagder new attempt at an improved DSP-file generation
authored
26
c508ab1 @bagder Added README.pipelining but also extracted the "docs" files to a sepa…
authored
27 DOCS = README.encoding README.memoryleak README.ares README.curlx \
a81a16b @bagder Added README.NSS to describe the current NSS situation.
authored
28 README.hostip README.multi_socket README.httpauth README.pipelining \
1d26569 @bagder removed README.cmake due to the improved situation
authored
29 README.curl_off_t README.pingpong
c508ab1 @bagder Added README.pipelining but also extracted the "docs" files to a sepa…
authored
30
f671d05 @gknauf renamed generated config.h to curl_config.h in order to avoid clashes…
gknauf authored
31 CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
d27519c @bagder Add missing cmake files to the tarball (thanks to Richard Atterer's r…
authored
32
dfe4050 @gknauf Removed libcurl.imp from Makefile.am.
gknauf authored
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 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 \
4685db9 @bagder make: add checksrc.pl to dist
authored
41 Makefile.vxworks config-vms.h checksrc.pl
04e2520 @bagder new attempt at an improved DSP-file generation
authored
42
78a4782 @bagder Michael Jerris added magic that builds lib/curllib.vcproj automatical…
authored
43 CLEANFILES = $(DSP) $(VCPROJ)
044ca34 @bagder Loic Dachary's makefile/dist/rpm fixes
authored
44
f71a148 @bagder libtool adjustments
authored
45 lib_LTLIBRARIES = libcurl.la
a0a47f2 @dfandrich Better separate the library dependencies into those required by libcurl
dfandrich authored
46 LIBCURL_LIBS = @LIBCURL_LIBS@
ae1912c @bagder Initial revision
authored
47
d6981cb @greearb build: Enable configure --enable-werror
greearb authored
48 # This might hold -Werror
ecfe0b5 @yangtse Makefile.am: fix spurious CFLAGS duplication
yangtse authored
49 CFLAGS += @CURL_CFLAG_EXTRAS@
d6981cb @greearb build: Enable configure --enable-werror
greearb authored
50
3833765 @yangtse build adjustments: commit 9e24b9c7 follow-up
yangtse authored
51 CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
9e24b9c @yangtse build adjustments: CURL_HIDDEN_SYMBOLS no longer defined in config files
yangtse authored
52
1e7125a @yangtse add comment for include paths
yangtse authored
53 # Specify our include paths here, and do it relative to $(top_srcdir) and
54 # $(top_builddir), to ensure that these paths which belong to the library
55 # being currently built and tested are searched before the library which
56 # might possibly already be installed in the system.
57 #
55e68ba @yangtse I removed leading 'curl' path on the 'curlbuild.h' include statement in
yangtse authored
58 # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
59 # $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
1e7125a @yangtse add comment for include paths
yangtse authored
60 # $(top_srcdir)/include is for libcurl's external include files
f671d05 @gknauf renamed generated config.h to curl_config.h in order to avoid clashes…
gknauf authored
61 # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
1e7125a @yangtse add comment for include paths
yangtse authored
62 # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
d576be5 @yangtse allow usage of in-tree c-ares when building from outside of the cvs tree
yangtse authored
63 # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
64 # $(top_srcdir)/ares is for in-tree c-ares's external include files
b33f478 @yangtse Allow again proper compilation outside of the source tree
yangtse authored
65
13fdb9d @yangtse c-ares embbeded builds header include paths fully defined in makefiles
yangtse authored
66 if USE_EMBEDDED_ARES
55e68ba @yangtse I removed leading 'curl' path on the 'curlbuild.h' include statement in
yangtse authored
67 INCLUDES = -I$(top_builddir)/include/curl \
68 -I$(top_builddir)/include \
69 -I$(top_srcdir)/include \
70 -I$(top_builddir)/lib \
71 -I$(top_srcdir)/lib \
72 -I$(top_builddir)/ares \
d576be5 @yangtse allow usage of in-tree c-ares when building from outside of the cvs tree
yangtse authored
73 -I$(top_srcdir)/ares
13fdb9d @yangtse c-ares embbeded builds header include paths fully defined in makefiles
yangtse authored
74 else
55e68ba @yangtse I removed leading 'curl' path on the 'curlbuild.h' include statement in
yangtse authored
75 INCLUDES = -I$(top_builddir)/include/curl \
76 -I$(top_builddir)/include \
77 -I$(top_srcdir)/include \
78 -I$(top_builddir)/lib \
13fdb9d @yangtse c-ares embbeded builds header include paths fully defined in makefiles
yangtse authored
79 -I$(top_srcdir)/lib
80 endif
b736123 @bagder ares awareness/usage/support added. If configure --enable-ares is use…
authored
81
2142349 @yangtse configure: Windows cross-compilation fixes
yangtse authored
82 AM_CPPFLAGS =
83
84 # Mostly for Windows build targets, when building libcurl library
85 if USE_CPPFLAG_BUILDING_LIBCURL
86 AM_CPPFLAGS += -DBUILDING_LIBCURL
87 endif
88
89 # Mostly for Windows build targets, when building static libcurl
90 if USE_CPPFLAG_CURL_STATICLIB
91 AM_CPPFLAGS += -DCURL_STATICLIB
92 endif
93
8dabd34 @bagder Introduced the configure option --enable-soname-bump that lets a user…
authored
94 if SONAME_BUMP
95 #
96 # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah
97 # it is. The problem is that we try to avoid the bump as hard as possible, but
98 # yet it is still necessary for a few rare situations. The configure script will
99 # attempt to figure out these situations, and it can be forced to consider this
100 # to be such a case! See README.curl_off_t for further details.
101 #
102 # This conditional soname bump SHOULD be removed at next "proper" bump.
103 #
d33da42 @bagder set VERSIONINFO accordingly for the 7.20.0 release
authored
104 VERSIONINFO=-version-info 7:0:2
8dabd34 @bagder Introduced the configure option --enable-soname-bump that lets a user…
authored
105 else
d33da42 @bagder set VERSIONINFO accordingly for the 7.20.0 release
authored
106 VERSIONINFO=-version-info 6:0:2
8dabd34 @bagder Introduced the configure option --enable-soname-bump that lets a user…
authored
107 endif
cfa0054 @bagder The -no-undefined flag is CRUCIAL for this to build fine on Cygwin. I…
authored
108
421fccb @bagder Added -version-info and lots of info
authored
109 # This flag accepts an argument of the form current[:revision[:age]]. So,
110 # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
111 # 1.
112 #
2d71c9c @bagder I liked Daniel Johnson's simplified version bumper guide so I modifie…
authored
113 # Here's the simplified rule guide on how to change -version-info:
114 # (current version is C:R:A)
a07bc79 @yangtse removed trailing whitespace
yangtse authored
115 #
2d71c9c @bagder I liked Daniel Johnson's simplified version bumper guide so I modifie…
authored
116 # 1. if there are only source changes, use C:R+1:A
117 # 2. if interfaces were added use C+1:0:A+1
118 # 3. if interfaces were removed, then use C+1:0:0
119 #
120 # For the full guide on libcurl ABI rules, see docs/libcurl/ABI
421fccb @bagder Added -version-info and lots of info
authored
121
ecf3aee @bagder check for cygwin and if built on that, enable the no-undefined option…
authored
122 if NO_UNDEFINED
aa76dec @yangtse unit tests: more build adjustments
yangtse authored
123 # The -no-undefined flag is crucial to build fine on some platforms
b736123 @bagder ares awareness/usage/support added. If configure --enable-ares is use…
authored
124 UNDEF = -no-undefined
fcfc6de @bagder Based on David Hull's fix in bug report 804599, we now check for solaris
authored
125 endif
126
127 if MIMPURE
128 # This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
129 # allocatable but non-writable sections" problems.
130 MIMPURE = -mimpure-text
ecf3aee @bagder check for cygwin and if built on that, enable the no-undefined option…
authored
131 endif
132
7cc2e8b @ghedo configure: add symbols versioning option
ghedo authored
133 if VERSIONED_SYMBOLS
134 VERSIONED_SYMBOLS = -Wl,--version-script=libcurl.vers
135 endif
136
137 libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(VERSIONED_SYMBOLS) $(LIBCURL_LIBS)
53640a3 @bagder unittesting: build a separate static lib
authored
138
3833765 @yangtse build adjustments: commit 9e24b9c7 follow-up
yangtse authored
139 if DOING_CURL_SYMBOL_HIDING
9e24b9c @yangtse build adjustments: CURL_HIDDEN_SYMBOLS no longer defined in config files
yangtse authored
140 libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_HIDDEN_SYMBOLS
3833765 @yangtse build adjustments: commit 9e24b9c7 follow-up
yangtse authored
141 libcurl_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_CURL_SYMBOL_HIDING)
9e24b9c @yangtse build adjustments: CURL_HIDDEN_SYMBOLS no longer defined in config files
yangtse authored
142 else
143 libcurl_la_CPPFLAGS = $(AM_CPPFLAGS)
144 libcurl_la_CFLAGS = $(AM_CFLAGS)
145 endif
146
aa76dec @yangtse unit tests: more build adjustments
yangtse authored
147 # unit testing static library built only along with unit tests
148 if BUILD_UNITTESTS
53640a3 @bagder unittesting: build a separate static lib
authored
149 noinst_LTLIBRARIES = libcurlu.la
aa76dec @yangtse unit tests: more build adjustments
yangtse authored
150 else
151 noinst_LTLIBRARIES =
53640a3 @bagder unittesting: build a separate static lib
authored
152 endif
b736123 @bagder ares awareness/usage/support added. If configure --enable-ares is use…
authored
153
aa76dec @yangtse unit tests: more build adjustments
yangtse authored
154 libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DUNITTESTS
155 libcurlu_la_LDFLAGS = -static $(LIBCURL_LIBS)
9e24b9c @yangtse build adjustments: CURL_HIDDEN_SYMBOLS no longer defined in config files
yangtse authored
156 libcurlu_la_CFLAGS = $(AM_CFLAGS)
aa76dec @yangtse unit tests: more build adjustments
yangtse authored
157
bada8cc @bagder include the Makefile.inc file to get all sources and headers
authored
158 # Makefile.inc provides the CSOURCES and HHEADERS defines
159 include Makefile.inc
04e2520 @bagder new attempt at an improved DSP-file generation
authored
160
161 libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
53640a3 @bagder unittesting: build a separate static lib
authored
162 libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
04e2520 @bagder new attempt at an improved DSP-file generation
authored
163
377e43f Changes for removing libcurl.def file on Win32.
Gisle Vanem authored
164 WIN32SOURCES = $(CSOURCES)
04e2520 @bagder new attempt at an improved DSP-file generation
authored
165 WIN32HEADERS = $(HHEADERS) config-win32.h
ae1912c @bagder Initial revision
authored
166
04e2520 @bagder new attempt at an improved DSP-file generation
authored
167 DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
78a4782 @bagder Michael Jerris added magic that builds lib/curllib.vcproj automatical…
authored
168 VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
04e2520 @bagder new attempt at an improved DSP-file generation
authored
169
170 $(DSP): msvcproj.head msvcproj.foot Makefile.am
171 echo "creating $(DSP)"
70f2b5e @dfandrich Fixed building curllib.dsp when running make outside the source tree.
dfandrich authored
172 @(cp $(srcdir)/msvcproj.head $(DSP); \
04e2520 @bagder new attempt at an improved DSP-file generation
authored
173 echo "# Begin Group \"Source Files\"" $(DSPOUT); \
004dde1 @yangtse Adjust generation of MSVC project files
yangtse authored
174 echo "" $(DSPOUT); \
175 echo "# PROP Default_Filter \"\"" $(DSPOUT); \
176 win32_srcs='$(WIN32SOURCES)'; \
177 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
178 for file in $$sorted_srcs; do \
04e2520 @bagder new attempt at an improved DSP-file generation
authored
179 echo "# Begin Source File" $(DSPOUT); \
180 echo "" $(DSPOUT); \
181 echo "SOURCE=.\\"$$file $(DSPOUT); \
182 echo "# End Source File" $(DSPOUT); \
183 done; \
184 echo "# End Group" $(DSPOUT); \
185 echo "# Begin Group \"Header Files\"" $(DSPOUT); \
004dde1 @yangtse Adjust generation of MSVC project files
yangtse authored
186 echo "" $(DSPOUT); \
187 echo "# PROP Default_Filter \"\"" $(DSPOUT); \
188 win32_hdrs='$(WIN32HEADERS)'; \
189 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
190 for file in $$sorted_hdrs; do \
04e2520 @bagder new attempt at an improved DSP-file generation
authored
191 echo "# Begin Source File" $(DSPOUT); \
192 echo "" $(DSPOUT); \
193 echo "SOURCE=.\\"$$file $(DSPOUT); \
194 echo "# End Source File" $(DSPOUT); \
fbdc1b1 @bagder Generate curllib.dsp on dist.time from msvcproj.head msvcproj.foot an…
authored
195 done; \
04e2520 @bagder new attempt at an improved DSP-file generation
authored
196 echo "# End Group" $(DSPOUT); \
70f2b5e @dfandrich Fixed building curllib.dsp when running make outside the source tree.
dfandrich authored
197 cat $(srcdir)/msvcproj.foot $(DSPOUT) )
78a4782 @bagder Michael Jerris added magic that builds lib/curllib.vcproj automatical…
authored
198
199 $(VCPROJ): vc8proj.head vc8proj.foot Makefile.am
200 echo "creating $(VCPROJ)"
201 @(cp $(srcdir)/vc8proj.head $(VCPROJ); \
004dde1 @yangtse Adjust generation of MSVC project files
yangtse authored
202 win32_srcs='$(WIN32SOURCES)'; \
203 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
204 for file in $$sorted_srcs; do \
78a4782 @bagder Michael Jerris added magic that builds lib/curllib.vcproj automatical…
authored
205 echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
206 done; \
207 echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT); \
004dde1 @yangtse Adjust generation of MSVC project files
yangtse authored
208 win32_hdrs='$(WIN32HEADERS)'; \
209 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
210 for file in $$sorted_hdrs; do \
78a4782 @bagder Michael Jerris added magic that builds lib/curllib.vcproj automatical…
authored
211 echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
212 done; \
213 cat $(srcdir)/vc8proj.foot $(VCPROJOUT) )
b903186 @bagder source cleanup: unify look, style and indent levels
authored
214
45de057 @bagder make: add 'checksrc' as target to check code style
authored
215
216 checksrc:
217 @@PERL@ $(top_srcdir)/lib/checksrc.pl -D$(top_srcdir)/lib $(CSOURCES) $(HHEADERS)
218
068d656 @bagder Makefile: run checksrc if debug enabled
authored
219 if CURLDEBUG
220 # for debug builds, we scan the sources on all regular make invokes
45de057 @bagder make: add 'checksrc' as target to check code style
authored
221 all-local: checksrc
068d656 @bagder Makefile: run checksrc if debug enabled
authored
222 endif
Something went wrong with that request. Please try again.