1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) 1998 - 2008, 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 # $Id: Makefile.am,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
22 ###########################################################################
24 AUTOMAKE_OPTIONS = foreign
26 ACLOCAL_AMFLAGS = -I m4
28 EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist curl-config.in \
29 curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat \
30 libcurl.pc.in vc6curl.dsw
32 bin_SCRIPTS = curl-config
35 DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
37 pkgconfigdir = $(libdir)/pkgconfig
38 pkgconfig_DATA = libcurl.pc
41 rm -rf $(top_builddir)/tests/log
42 find $(distdir) -name "*.dist" -exec rm {} \;
43 (distit=`find $(srcdir) -name "*.dist"`; \
44 for file in $$distit; do \
45 strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
46 cp $$file $(distdir)$$strip; \
62 @echo "NOTICE: we can't run the tests when cross-compiling!"
67 @(cd tests; $(MAKE) all quiet-test)
70 @(cd tests; $(MAKE) all full-test)
73 @(cd tests; $(MAKE) all torture-test)
78 @(cd docs/examples; $(MAKE) check)
81 # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
82 # must contain the following line:
83 # %_topdir /home/loic/local/rpm
84 # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
86 # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
88 # If additional configure flags are needed to build the package, add the
89 # following in ~/.rpmmacros
90 # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
91 # and run make rpm in the following way:
92 # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
96 $(MAKE) RPMDIST=curl rpm
97 $(MAKE) RPMDIST=curl-ssl rpm
100 RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
101 cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
102 cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
103 rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
104 mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
105 mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
108 # Build a Solaris pkkgadd format file
109 # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
110 # file (which ends up back in this directory).
111 # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
112 # pkgadd -d ./HAXXcurl-*
115 # gak - libtool requires an absoulte directory, hence the pwd below...
118 make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
119 cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
120 cd $(srcdir)/packages/Solaris && $(MAKE) package
123 # Build a cygwin binary tarball installation file
124 # resulting .tar.bz2 file will end up at packages/Win32/cygwin
126 $(MAKE) -C packages/Win32/cygwin cygwinbin
128 # We extend the standard install with a custom hook:
130 cd include && $(MAKE) install
131 cd docs && $(MAKE) install
133 # We extend the standard uninstall with a custom hook:
135 cd include && $(MAKE) uninstall
136 cd docs && $(MAKE) uninstall
138 ca-bundle: lib/mk-ca-bundle.pl
139 @echo "generate a fresh ca-bundle.crt"
140 @perl $< -b -l -u lib/ca-bundle.crt
142 ca-firefox: lib/firefox-db2pem.sh
143 @echo "generate a fresh ca-bundle.crt"
144 ./lib/firefox-db2pem.sh lib/ca-bundle.crt