Makefile.am 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2004, 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: Makefile.am,v 1.45 2004/03/17 12:48:41 bagder Exp $
  22. ###########################################################################
  23. AUTOMAKE_OPTIONS = foreign nostdinc
  24. # we use srcdir/src for "private" includes
  25. # we use srcdir/include for the static global include files
  26. # we use builddir/src for the generated include files to get found
  27. # we use srcdir/lib for the header files we "borrow" from the lib
  28. INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/include -I$(top_builddir)/src \
  29. -I$(top_srcdir)/lib
  30. bin_PROGRAMS = curl
  31. curl_SOURCES = main.c hugehelp.c hugehelp.h urlglob.c writeout.c setup.h \
  32. config-win32.h config-mac.h config-vms.h config-riscos.h \
  33. urlglob.h version.h writeout.h writeenv.c writeenv.h \
  34. getpass.c getpass.h homedir.c homedir.h $(top_srcdir)/lib/strtoofft.c
  35. curl_LDADD = ../lib/libcurl.la
  36. curl_DEPENDENCIES = ../lib/libcurl.la
  37. BUILT_SOURCES = hugehelp.c
  38. CLEANFILES = hugehelp.c
  39. NROFF=@NROFF@ @MANOPT@ # figured out by the configure script
  40. EXTRA_DIST = mkhelp.pl curlmsg.msg makefile.dj \
  41. Makefile.vc6 Makefile.b32 Makefile.m32 Makefile.riscos config.h.in \
  42. macos/curl.mcp.xml.sit.hqx \
  43. macos/MACINSTALL.TXT \
  44. macos/src/curl_GUSIConfig.cpp \
  45. macos/src/macos_main.cpp curlmsg.h curlmsg.sdl curlmsg_vms.h \
  46. config-amigaos.h makefile.amiga curl.rc \
  47. Makefile.netware config-netware.h
  48. MANPAGE=$(top_srcdir)/docs/curl.1
  49. README=$(top_srcdir)/docs/MANUAL
  50. MKHELP=$(top_srcdir)/src/mkhelp.pl
  51. HUGE=hugehelp.c
  52. if USE_MANUAL
  53. # Here are the stuff to create a built-in manual
  54. if HAVE_LIBZ
  55. # This generates the hugehelp.c file in both uncompressed and compressed formats
  56. $(HUGE): $(README) $(MANPAGE) mkhelp.pl
  57. echo '#ifdef HAVE_CONFIG_H' > $(HUGE)
  58. echo '#include "config.h"' >> $(HUGE)
  59. echo '#endif' >> $(HUGE)
  60. echo '#ifndef HAVE_LIBZ' >> $(HUGE)
  61. $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
  62. echo '#else' >> $(HUGE)
  63. $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
  64. echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
  65. else # HAVE_LIBZ
  66. # This generates the hugehelp.c file uncompressed only
  67. $(HUGE): $(README) $(MANPAGE) mkhelp.pl
  68. $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) > $(HUGE)
  69. endif
  70. else # USE_MANUAL
  71. # built-in manual has been disabled, make a blank file
  72. $(HUGE):
  73. echo "/* built-in manual is disabled, blank function */" > $(HUGE)
  74. echo '#include "hugehelp.h"' >> $(HUGE)
  75. echo "void hugehelp(void) {}" >>$(HUGE)
  76. endif