Git init
[external/curl.git] / Makefile.am
1 #***************************************************************************
2 #                                  _   _ ____  _
3 #  Project                     ___| | | |  _ \| |
4 #                             / __| | | | |_) | |
5 #                            | (__| |_| |  _ <| |___
6 #                             \___|\___/|_| \_\_____|
7 #
8 # Copyright (C) 1998 - 2009, 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 ###########################################################################
22
23 AUTOMAKE_OPTIONS = foreign
24
25 ACLOCAL_AMFLAGS = -I m4
26
27 CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
28 CMake/CMakeConfigurableFile.in CMake/CurlCheckCSourceCompiles.cmake            \
29 CMake/CurlCheckCSourceRuns.cmake CMake/CurlTests.c CMake/FindOpenSSL.cmake     \
30 CMake/FindZLIB.cmake CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
31 CMake/Utilities.cmake include/curl/curlbuild.h.cmake
32
33 EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in       \
34  curl-style.el sample.emacs RELEASE-NOTES buildconf     \
35  libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
36
37 bin_SCRIPTS = curl-config
38
39 SUBDIRS = lib src
40 DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
41
42 pkgconfigdir = $(libdir)/pkgconfig
43 pkgconfig_DATA = libcurl.pc
44
45 dist-hook:
46         rm -rf $(top_builddir)/tests/log
47         find $(distdir) -name "*.dist" -exec rm {} \;
48         (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
49         for file in $$distit; do \
50           strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
51           cp $$file $(distdir)$$strip; \
52         done)
53
54 html:
55         cd docs; make html
56
57 pdf:
58         cd docs; make pdf
59
60 check: test examples
61
62 if CROSSCOMPILING
63 test-full: test
64 test-torture: test
65
66 test:
67         @echo "NOTICE: we can't run the tests when cross-compiling!"
68
69 else
70
71 test:
72         @(cd tests; $(MAKE) all quiet-test)
73
74 test-full:
75         @(cd tests; $(MAKE) all full-test)
76
77 test-torture:
78         @(cd tests; $(MAKE) all torture-test)
79
80 endif
81
82 examples:
83         @(cd docs/examples; $(MAKE) check)
84
85 clean-local:
86         @(cd tests; $(MAKE) clean)
87         @(cd docs; $(MAKE) clean)
88
89 #
90 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
91 # must contain the following line:
92 # %_topdir /home/loic/local/rpm
93 # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
94 #
95 # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
96 #
97 # If additional configure flags are needed to build the package, add the
98 # following in ~/.rpmmacros
99 # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
100 # and run make rpm in the following way:
101 # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
102 #
103
104 rpms:
105         $(MAKE) RPMDIST=curl rpm
106         $(MAKE) RPMDIST=curl-ssl rpm
107
108 rpm:
109         RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
110         cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
111         cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
112         rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
113         mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
114         mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
115
116 #
117 # Build a Solaris pkgadd format file
118 # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
119 # file (which ends up back in this directory).
120 # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
121 # pkgadd -d ./HAXXcurl-*
122 #
123
124 # gak - libtool requires an absoulte directory, hence the pwd below...
125 pkgadd:
126         umask 022 ; \
127         make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
128         cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
129         cd $(srcdir)/packages/Solaris && $(MAKE) package
130
131 #
132 # Build a cygwin binary tarball installation file
133 # resulting .tar.bz2 file will end up at packages/Win32/cygwin
134 cygwinbin:
135         $(MAKE) -C packages/Win32/cygwin cygwinbin
136
137 # We extend the standard install with a custom hook:
138 install-data-hook:
139         cd include && $(MAKE) install
140         cd docs && $(MAKE) install
141
142 # We extend the standard uninstall with a custom hook:
143 uninstall-hook:
144         cd include && $(MAKE) uninstall
145         cd docs && $(MAKE) uninstall
146
147 ca-bundle: lib/mk-ca-bundle.pl
148         @echo "generate a fresh ca-bundle.crt"
149         @perl $< -b -l -u lib/ca-bundle.crt
150
151 ca-firefox: lib/firefox-db2pem.sh
152         @echo "generate a fresh ca-bundle.crt"
153         ./lib/firefox-db2pem.sh lib/ca-bundle.crt