1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
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.
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.
18 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 # KIND, either express or implied.
21 ###########################################################################
23 AUTOMAKE_OPTIONS = foreign
25 ACLOCAL_AMFLAGS = -I m4
27 CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
28 CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake \
29 CMake/CurlTests.c CMake/FindOpenSSL.cmake CMake/FindZLIB.cmake \
30 CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
31 CMake/Utilities.cmake include/curl/curlbuild.h.cmake
33 VC6LIBDSP = vs/vc6/lib/vc6libcurl.dsp
34 VC6LIBDSPHEAD = vs/t/lib/vc6_libcurl_dsp.head
35 VC6LIBDSPFOOT = vs/t/lib/vc6_libcurl_dsp.foot
37 VC8LIBPRJ = vs/vc8/lib/vc8libcurl.vcproj
38 VC8LIBPRJHEAD = vs/t/lib/vc8_libcurl_prj.head
39 VC8LIBPRJFOOT = vs/t/lib/vc8_libcurl_prj.foot
41 VCPROJECTS = projects/README projects/Windows/VC8/lib/libcurl.sln \
42 projects/Windows/VC8/lib/libcurl.tmpl projects/Windows/VC8/curl.sln \
43 projects/Windows/VC8/src/curlsrc.tmpl projects/Windows/VC8/src/curlsrc.sln \
44 projects/Windows/VC9/curl.sln \
45 projects/Windows/VC9/lib/libcurl.sln projects/Windows/VC9/lib/libcurl.tmpl \
46 projects/Windows/VC9/src/curlsrc.sln projects/Windows/VC9/src/curlsrc.tmpl \
47 projects/Windows/VC10/curl.sln \
48 projects/Windows/VC10/lib/libcurl.sln projects/Windows/VC10/lib/libcurl.tmpl \
49 projects/Windows/VC10/src/curlsrc.sln projects/Windows/VC10/src/curlsrc.tmpl \
50 projects/Windows/VC11/curl.sln \
51 projects/Windows/VC11/lib/libcurl.sln projects/Windows/VC11/lib/libcurl.tmpl \
52 projects/Windows/VC11/src/curlsrc.sln projects/Windows/VC11/src/curlsrc.tmpl \
53 projects/Windows/VC12/curl.sln \
54 projects/Windows/VC12/lib/libcurl.sln projects/Windows/VC12/lib/libcurl.tmpl \
55 projects/Windows/VC12/src/curlsrc.sln projects/Windows/VC12/src/curlsrc.tmpl
59 $(VC6LIBDSP) $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
60 $(VC8LIBPRJ) $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
62 vs/vc6/lib/vc6libcurl.dsw \
63 vs/vc6/src/vc6curltool.dsw \
64 vs/vc6/src/vc6curltool.dsp $(VCPROJECTS)
66 VC6LIBDSP_DEPS = $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
67 Makefile.am lib/Makefile.inc
69 VC8LIBPRJ_DEPS = $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
70 Makefile.am lib/Makefile.inc
72 WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
73 winbuild/MakefileBuild.vc winbuild/Makefile.vc \
74 winbuild/Makefile.msvc.names
76 EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
77 RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \
78 $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in
80 CLEANFILES = $(VC6LIBDSP) $(VC8LIBPRJ)
82 bin_SCRIPTS = curl-config
84 SUBDIRS = lib src include
85 DIST_SUBDIRS = $(SUBDIRS) tests packages docs
87 pkgconfigdir = $(libdir)/pkgconfig
88 pkgconfig_DATA = libcurl.pc
90 # List of libcurl source files required to generate VC IDE dsp and prj files
91 include lib/Makefile.inc
93 WIN32SOURCES = $(CSOURCES)
94 WIN32HEADERS = $(HHEADERS) config-win32.h
97 rm -rf $(top_builddir)/tests/log
98 find $(distdir) -name "*.dist" -exec rm {} \;
99 (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
100 for file in $$distit; do \
101 strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
102 cp $$file $(distdir)$$strip; \
118 @echo "NOTICE: we can't run the tests when cross-compiling!"
123 @(cd tests; $(MAKE) all quiet-test)
126 @(cd tests; $(MAKE) all full-test)
129 @(cd tests; $(MAKE) all torture-test)
132 @(cd tests; $(MAKE) all am-test)
137 @(cd docs/examples; $(MAKE) check)
139 # This is a hook to have 'make clean' also clean up the docs and the tests
140 # dir. The extra check for the Makefiles being present is necessary because
141 # 'make distcheck' will make clean first in these directories _before_ it runs
144 @(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi)
145 @(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi)
148 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
149 # must contain the following line:
150 # %_topdir /home/loic/local/rpm
151 # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
153 # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
155 # If additional configure flags are needed to build the package, add the
156 # following in ~/.rpmmacros
157 # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
158 # and run make rpm in the following way:
159 # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
163 $(MAKE) RPMDIST=curl rpm
164 $(MAKE) RPMDIST=curl-ssl rpm
167 RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
168 cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
169 cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
170 rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
171 mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
172 mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
175 # Build a Solaris pkgadd format file
176 # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
177 # file (which ends up back in this directory).
178 # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
179 # pkgadd -d ./HAXXcurl-*
182 # gak - libtool requires an absoulte directory, hence the pwd below...
185 make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
186 cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
187 cd $(srcdir)/packages/Solaris && $(MAKE) package
190 # Build a cygwin binary tarball installation file
191 # resulting .tar.bz2 file will end up at packages/Win32/cygwin
193 $(MAKE) -C packages/Win32/cygwin cygwinbin
195 # We extend the standard install with a custom hook:
197 cd include && $(MAKE) install
198 cd docs && $(MAKE) install
200 # We extend the standard uninstall with a custom hook:
202 cd include && $(MAKE) uninstall
203 cd docs && $(MAKE) uninstall
205 ca-bundle: lib/mk-ca-bundle.pl
206 @echo "generate a fresh ca-bundle.crt"
207 @perl $< -b -l -u lib/ca-bundle.crt
209 ca-firefox: lib/firefox-db2pem.sh
210 @echo "generate a fresh ca-bundle.crt"
211 ./lib/firefox-db2pem.sh lib/ca-bundle.crt
214 cd lib && $(MAKE) checksrc
215 cd src && $(MAKE) checksrc
222 $(VC6LIBDSP): $(VC6LIBDSP_DEPS)
223 @(echo "generating '$(VC6LIBDSP)'"; \
225 for dir in 'vs' 'vs/vc6' 'vs/vc6/lib'; do \
226 test -d "$$dir" || mkdir "$$dir" || exit 1; \
229 dir='..\..\..\lib\'; \
230 body='$(VC6LIBDSP)'.body; \
231 win32_srcs='$(WIN32SOURCES)'; \
232 win32_hdrs='$(WIN32HEADERS)'; \
233 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
234 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
236 echo "# Begin Group \"Source Files\"" > $$body; \
238 echo "# PROP Default_Filter \"\"" >> $$body; \
239 for file in $$sorted_srcs; do \
240 echo "# Begin Source File" >> $$body; \
242 echo "SOURCE="$$dir$$file >> $$body; \
243 echo "# End Source File" >> $$body; \
245 echo "# End Group" >> $$body; \
246 echo "# Begin Group \"Header Files\"" >> $$body; \
248 echo "# PROP Default_Filter \"\"" >> $$body; \
249 for file in $$sorted_hdrs; do \
250 echo "# Begin Source File" >> $$body; \
252 echo "SOURCE="$$dir$$file >> $$body; \
253 echo "# End Source File" >> $$body; \
255 echo "# End Group" >> $$body; \
257 awk '{ printf("%s\r\n", $$0); }' \
258 $(srcdir)/$(VC6LIBDSPHEAD) $$body $(srcdir)/$(VC6LIBDSPFOOT) \
259 > $(VC6LIBDSP) || { rm -f $$body; exit 1; }; \
268 $(VC8LIBPRJ): $(VC8LIBPRJ_DEPS)
269 @(echo "generating '$(VC8LIBPRJ)'"; \
271 for dir in 'vs' 'vs/vc8' 'vs/vc8/lib'; do \
272 test -d "$$dir" || mkdir "$$dir" || exit 1; \
275 dir='..\..\..\lib\'; \
276 body='$(VC8LIBPRJ)'.body; \
277 win32_srcs='$(WIN32SOURCES)'; \
278 win32_hdrs='$(WIN32HEADERS)'; \
279 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
280 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
282 echo "%tab%%tab%<Filter Name=\"Source Files\">" > $$body; \
283 for file in $$sorted_srcs; do \
284 echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
286 echo "%tab%%tab%</Filter>" >> $$body; \
287 echo "%tab%%tab%<Filter Name=\"Header Files\">" >> $$body; \
288 for file in $$sorted_hdrs; do \
289 echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
291 echo "%tab%%tab%</Filter>" >> $$body; \
293 awk '{ gsub(/%tab%/, "\t"); printf("%s\r\n", $$0); }' \
294 $(srcdir)/$(VC8LIBPRJHEAD) $$body $(srcdir)/$(VC8LIBPRJFOOT) \
295 > $(VC8LIBPRJ) || { rm -f $$body; exit 1; }; \