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
50 $(VC6LIBDSP) $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
51 $(VC8LIBPRJ) $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
53 vs/vc6/lib/vc6libcurl.dsw \
54 vs/vc6/src/vc6curltool.dsw \
55 vs/vc6/src/vc6curltool.dsp $(VCPROJECTS)
57 VC6LIBDSP_DEPS = $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
58 Makefile.am lib/Makefile.inc
60 VC8LIBPRJ_DEPS = $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
61 Makefile.am lib/Makefile.inc
63 WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
64 winbuild/MakefileBuild.vc winbuild/Makefile.vc \
65 winbuild/Makefile.msvc.names
67 EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
68 RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \
69 $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in
71 CLEANFILES = $(VC6LIBDSP) $(VC8LIBPRJ)
73 bin_SCRIPTS = curl-config
75 SUBDIRS = lib src include
76 DIST_SUBDIRS = $(SUBDIRS) tests packages docs
78 pkgconfigdir = $(libdir)/pkgconfig
79 pkgconfig_DATA = libcurl.pc
81 # List of libcurl source files required to generate VC IDE dsp and prj files
82 include lib/Makefile.inc
84 WIN32SOURCES = $(CSOURCES)
85 WIN32HEADERS = $(HHEADERS) config-win32.h
88 rm -rf $(top_builddir)/tests/log
89 find $(distdir) -name "*.dist" -exec rm {} \;
90 (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
91 for file in $$distit; do \
92 strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
93 cp $$file $(distdir)$$strip; \
109 @echo "NOTICE: we can't run the tests when cross-compiling!"
114 @(cd tests; $(MAKE) all quiet-test)
117 @(cd tests; $(MAKE) all full-test)
120 @(cd tests; $(MAKE) all torture-test)
123 @(cd tests; $(MAKE) all am-test)
128 @(cd docs/examples; $(MAKE) check)
130 # This is a hook to have 'make clean' also clean up the docs and the tests
131 # dir. The extra check for the Makefiles being present is necessary because
132 # 'make distcheck' will make clean first in these directories _before_ it runs
135 @(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi)
136 @(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi)
139 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
140 # must contain the following line:
141 # %_topdir /home/loic/local/rpm
142 # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
144 # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
146 # If additional configure flags are needed to build the package, add the
147 # following in ~/.rpmmacros
148 # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
149 # and run make rpm in the following way:
150 # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
154 $(MAKE) RPMDIST=curl rpm
155 $(MAKE) RPMDIST=curl-ssl rpm
158 RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
159 cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
160 cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
161 rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
162 mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
163 mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
166 # Build a Solaris pkgadd format file
167 # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
168 # file (which ends up back in this directory).
169 # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
170 # pkgadd -d ./HAXXcurl-*
173 # gak - libtool requires an absoulte directory, hence the pwd below...
176 make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
177 cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
178 cd $(srcdir)/packages/Solaris && $(MAKE) package
181 # Build a cygwin binary tarball installation file
182 # resulting .tar.bz2 file will end up at packages/Win32/cygwin
184 $(MAKE) -C packages/Win32/cygwin cygwinbin
186 # We extend the standard install with a custom hook:
188 cd include && $(MAKE) install
189 cd docs && $(MAKE) install
191 # We extend the standard uninstall with a custom hook:
193 cd include && $(MAKE) uninstall
194 cd docs && $(MAKE) uninstall
196 ca-bundle: lib/mk-ca-bundle.pl
197 @echo "generate a fresh ca-bundle.crt"
198 @perl $< -b -l -u lib/ca-bundle.crt
200 ca-firefox: lib/firefox-db2pem.sh
201 @echo "generate a fresh ca-bundle.crt"
202 ./lib/firefox-db2pem.sh lib/ca-bundle.crt
205 cd lib && $(MAKE) checksrc
206 cd src && $(MAKE) checksrc
213 $(VC6LIBDSP): $(VC6LIBDSP_DEPS)
214 @(echo "generating '$(VC6LIBDSP)'"; \
216 for dir in 'vs' 'vs/vc6' 'vs/vc6/lib'; do \
217 test -d "$$dir" || mkdir "$$dir" || exit 1; \
220 dir='..\..\..\lib\'; \
221 body='$(VC6LIBDSP)'.body; \
222 win32_srcs='$(WIN32SOURCES)'; \
223 win32_hdrs='$(WIN32HEADERS)'; \
224 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
225 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
227 echo "# Begin Group \"Source Files\"" > $$body; \
229 echo "# PROP Default_Filter \"\"" >> $$body; \
230 for file in $$sorted_srcs; do \
231 echo "# Begin Source File" >> $$body; \
233 echo "SOURCE="$$dir$$file >> $$body; \
234 echo "# End Source File" >> $$body; \
236 echo "# End Group" >> $$body; \
237 echo "# Begin Group \"Header Files\"" >> $$body; \
239 echo "# PROP Default_Filter \"\"" >> $$body; \
240 for file in $$sorted_hdrs; do \
241 echo "# Begin Source File" >> $$body; \
243 echo "SOURCE="$$dir$$file >> $$body; \
244 echo "# End Source File" >> $$body; \
246 echo "# End Group" >> $$body; \
248 awk '{ printf("%s\r\n", $$0); }' \
249 $(srcdir)/$(VC6LIBDSPHEAD) $$body $(srcdir)/$(VC6LIBDSPFOOT) \
250 > $(VC6LIBDSP) || { rm -f $$body; exit 1; }; \
259 $(VC8LIBPRJ): $(VC8LIBPRJ_DEPS)
260 @(echo "generating '$(VC8LIBPRJ)'"; \
262 for dir in 'vs' 'vs/vc8' 'vs/vc8/lib'; do \
263 test -d "$$dir" || mkdir "$$dir" || exit 1; \
266 dir='..\..\..\lib\'; \
267 body='$(VC8LIBPRJ)'.body; \
268 win32_srcs='$(WIN32SOURCES)'; \
269 win32_hdrs='$(WIN32HEADERS)'; \
270 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
271 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
273 echo "%tab%%tab%<Filter Name=\"Source Files\">" > $$body; \
274 for file in $$sorted_srcs; do \
275 echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
277 echo "%tab%%tab%</Filter>" >> $$body; \
278 echo "%tab%%tab%<Filter Name=\"Header Files\">" >> $$body; \
279 for file in $$sorted_hdrs; do \
280 echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
282 echo "%tab%%tab%</Filter>" >> $$body; \
284 awk '{ gsub(/%tab%/, "\t"); printf("%s\r\n", $$0); }' \
285 $(srcdir)/$(VC8LIBPRJHEAD) $$body $(srcdir)/$(VC8LIBPRJFOOT) \
286 > $(VC8LIBPRJ) || { rm -f $$body; exit 1; }; \