Makefile.am 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2005, 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. # $Id$
  22. ###########################################################################
  23. AUTOMAKE_OPTIONS = foreign
  24. EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist curl-config.in \
  25. curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat libcurl.pc.in
  26. bin_SCRIPTS = curl-config
  27. SUBDIRS = lib src
  28. DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
  29. pkgconfigdir = $(libdir)/pkgconfig
  30. pkgconfig_DATA = libcurl.pc
  31. dist-hook:
  32. rm -rf $(top_builddir)/tests/log
  33. find $(distdir) -name "*.dist" -exec rm {} \;
  34. (distit=`find $(srcdir) -name "*.dist"`; \
  35. for file in $$distit; do \
  36. strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
  37. cp $$file $(distdir)$$strip; \
  38. done)
  39. html:
  40. cd docs; make html
  41. pdf:
  42. cd docs; make pdf
  43. check: test
  44. if CROSSCOMPILING
  45. test-full: test
  46. test-torture: test
  47. test:
  48. @echo "NOTICE: we can't run the tests when cross-compiling!"
  49. else
  50. test:
  51. @(cd tests; $(MAKE) all quiet-test)
  52. test-full:
  53. @(cd tests; $(MAKE) all full-test)
  54. test-torture:
  55. @(cd tests; $(MAKE) all torture-test)
  56. endif
  57. #
  58. # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
  59. # must contain the following line:
  60. # %_topdir /home/loic/local/rpm
  61. # and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
  62. #
  63. # cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
  64. #
  65. # If additional configure flags are needed to build the package, add the
  66. # following in ~/.rpmmacros
  67. # %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
  68. # and run make rpm in the following way:
  69. # AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
  70. #
  71. rpms:
  72. $(MAKE) RPMDIST=curl rpm
  73. $(MAKE) RPMDIST=curl-ssl rpm
  74. rpm:
  75. RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
  76. cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
  77. cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
  78. rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
  79. mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
  80. mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
  81. #
  82. # Build a Solaris pkkgadd format file
  83. # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
  84. # file (which ends up back in this directory).
  85. # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
  86. # pkgadd -d ./HAXXcurl-*
  87. #
  88. # gak - libtool requires an absoulte directory, hence the pwd below...
  89. pkgadd:
  90. umask 022 ; \
  91. make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
  92. cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
  93. cd $(srcdir)/packages/Solaris && $(MAKE) package
  94. #
  95. # Build a cygwin binary tarball installation file
  96. # resulting .tar.bz2 file will end up at packages/Win32/cygwin
  97. cygwinbin:
  98. $(MAKE) -C packages/Win32/cygwin cygwinbin
  99. # We extend the standard install with a custom hook:
  100. install-data-hook:
  101. cd include && $(MAKE) install
  102. cd docs && $(MAKE) install
  103. # We extend the standard uninstall with a custom hook:
  104. uninstall-hook:
  105. cd include && $(MAKE) uninstall
  106. cd docs && $(MAKE) uninstall