1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) 1998 - 2013, 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
43 $(VC6LIBDSP) $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
44 $(VC8LIBPRJ) $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
46 vs/vc6/lib/vc6libcurl.dsw \
47 vs/vc6/src/vc6curltool.dsw \
48 vs/vc6/src/vc6curltool.dsp
50 VC6LIBDSP_DEPS = $(VC6LIBDSPHEAD) $(VC6LIBDSPFOOT) \
51 Makefile.am lib/Makefile.inc
53 VC8LIBPRJ_DEPS = $(VC8LIBPRJHEAD) $(VC8LIBPRJFOOT) \
54 Makefile.am lib/Makefile.inc
56 WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
57 winbuild/MakefileBuild.vc winbuild/Makefile.vc \
58 winbuild/Makefile.msvc.names
60 EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
61 RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \
62 $(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in
64 CLEANFILES = $(VC6LIBDSP) $(VC8LIBPRJ)
66 bin_SCRIPTS = curl-config
68 SUBDIRS = lib src include
69 DIST_SUBDIRS = $(SUBDIRS) tests packages docs
71 pkgconfigdir = $(libdir)/pkgconfig
72 pkgconfig_DATA = libcurl.pc
74 # List of libcurl source files required to generate VC IDE dsp and prj files
75 include lib/Makefile.inc
77 WIN32SOURCES = $(CSOURCES)
78 WIN32HEADERS = $(HHEADERS) config-win32.h
81 rm -rf $(top_builddir)/tests/log
82 find $(distdir) -name "*.dist" -exec rm {} \;
83 (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
84 for file in $$distit; do \
85 strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
86 cp $$file $(distdir)$$strip; \
102 @echo "NOTICE: we can't run the tests when cross-compiling!"
107 @(cd tests; $(MAKE) all quiet-test)
110 @(cd tests; $(MAKE) all full-test)
113 @(cd tests; $(MAKE) all torture-test)
116 @(cd tests; $(MAKE) all am-test)
121 @(cd docs/examples; $(MAKE) check)
123 # This is a hook to have 'make clean' also clean up the docs and the tests
124 # dir. The extra check for the Makefiles being present is necessary because
125 # 'make distcheck' will make clean first in these directories _before_ it runs
128 @(if test -f tests/Makefile; then cd tests; $(MAKE) clean; fi)
129 @(if test -f docs/Makefile; then cd docs; $(MAKE) clean; fi)
132 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
133 # must contain the following line:
134 # %_topdir /home/loic/local/rpm
135 # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
137 # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
139 # If additional configure flags are needed to build the package, add the
140 # following in ~/.rpmmacros
141 # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
142 # and run make rpm in the following way:
143 # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
147 $(MAKE) RPMDIST=curl rpm
148 $(MAKE) RPMDIST=curl-ssl rpm
151 RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
152 cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
153 cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
154 rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
155 mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
156 mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
159 # Build a Solaris pkgadd format file
160 # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
161 # file (which ends up back in this directory).
162 # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
163 # pkgadd -d ./HAXXcurl-*
166 # gak - libtool requires an absoulte directory, hence the pwd below...
169 make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
170 cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
171 cd $(srcdir)/packages/Solaris && $(MAKE) package
174 # Build a cygwin binary tarball installation file
175 # resulting .tar.bz2 file will end up at packages/Win32/cygwin
177 $(MAKE) -C packages/Win32/cygwin cygwinbin
179 # We extend the standard install with a custom hook:
181 cd include && $(MAKE) install
182 cd docs && $(MAKE) install
184 # We extend the standard uninstall with a custom hook:
186 cd include && $(MAKE) uninstall
187 cd docs && $(MAKE) uninstall
189 ca-bundle: lib/mk-ca-bundle.pl
190 @echo "generate a fresh ca-bundle.crt"
191 @perl $< -b -l -u lib/ca-bundle.crt
193 ca-firefox: lib/firefox-db2pem.sh
194 @echo "generate a fresh ca-bundle.crt"
195 ./lib/firefox-db2pem.sh lib/ca-bundle.crt
198 cd lib && $(MAKE) checksrc
199 cd src && $(MAKE) checksrc
206 $(VC6LIBDSP): $(VC6LIBDSP_DEPS)
207 @(echo "generating '$(VC6LIBDSP)'"; \
209 for dir in 'vs' 'vs/vc6' 'vs/vc6/lib'; do \
210 test -d "$$dir" || mkdir "$$dir" || exit 1; \
213 dir='..\..\..\lib\'; \
214 body='$(VC6LIBDSP)'.body; \
215 win32_srcs='$(WIN32SOURCES)'; \
216 win32_hdrs='$(WIN32HEADERS)'; \
217 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
218 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
220 echo "# Begin Group \"Source Files\"" > $$body; \
222 echo "# PROP Default_Filter \"\"" >> $$body; \
223 for file in $$sorted_srcs; do \
224 echo "# Begin Source File" >> $$body; \
226 echo "SOURCE="$$dir$$file >> $$body; \
227 echo "# End Source File" >> $$body; \
229 echo "# End Group" >> $$body; \
230 echo "# Begin Group \"Header Files\"" >> $$body; \
232 echo "# PROP Default_Filter \"\"" >> $$body; \
233 for file in $$sorted_hdrs; do \
234 echo "# Begin Source File" >> $$body; \
236 echo "SOURCE="$$dir$$file >> $$body; \
237 echo "# End Source File" >> $$body; \
239 echo "# End Group" >> $$body; \
241 awk '{ printf("%s\r\n", $$0); }' \
242 $(srcdir)/$(VC6LIBDSPHEAD) $$body $(srcdir)/$(VC6LIBDSPFOOT) \
243 > $(VC6LIBDSP) || { rm -f $$body; exit 1; }; \
252 $(VC8LIBPRJ): $(VC8LIBPRJ_DEPS)
253 @(echo "generating '$(VC8LIBPRJ)'"; \
255 for dir in 'vs' 'vs/vc8' 'vs/vc8/lib'; do \
256 test -d "$$dir" || mkdir "$$dir" || exit 1; \
259 dir='..\..\..\lib\'; \
260 body='$(VC8LIBPRJ)'.body; \
261 win32_srcs='$(WIN32SOURCES)'; \
262 win32_hdrs='$(WIN32HEADERS)'; \
263 sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
264 sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
266 echo "%tab%%tab%<Filter Name=\"Source Files\">" > $$body; \
267 for file in $$sorted_srcs; do \
268 echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
270 echo "%tab%%tab%</Filter>" >> $$body; \
271 echo "%tab%%tab%<Filter Name=\"Header Files\">" >> $$body; \
272 for file in $$sorted_hdrs; do \
273 echo "%tab%%tab%%tab%<File RelativePath=\""$$dir$$file"\"></File>" >> $$body; \
275 echo "%tab%%tab%</Filter>" >> $$body; \
277 awk '{ gsub(/%tab%/, "\t"); printf("%s\r\n", $$0); }' \
278 $(srcdir)/$(VC8LIBPRJHEAD) $$body $(srcdir)/$(VC8LIBPRJFOOT) \
279 > $(VC8LIBPRJ) || { rm -f $$body; exit 1; }; \