Makefile.am 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Makefile.am for XSParagraph
  2. #
  3. # Copyright 2015, 2016 Free Software Foundation, Inc.
  4. #
  5. # This file is free software; as a special exception the author gives
  6. # unlimited permission to copy and/or distribute it, with or without
  7. # modifications, as long as this notice is preserved.
  8. #
  9. # This program is distributed in the hope that it will be useful, but
  10. # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
  11. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. #
  13. AUTOMAKE_OPTIONS=foreign subdir-objects
  14. EXTRA_DIST=
  15. ######################## Gnulib ################################
  16. AM_CPPFLAGS = \
  17. -I$(srcdir) \
  18. -I$(srcdir)/lib \
  19. -I$(builddir)/lib
  20. XSParagraph_la_LIBADD = $(builddir)/lib/libgnu.la \
  21. $(TERMLIBS) $(LIBINTL) $(LIBICONV)
  22. ACLOCAL_AMFLAGS = -I m4
  23. SUBDIRS=lib
  24. EXTRA_DIST+=m4/gnulib-cache.m4
  25. ################### End Gnulib section #########################
  26. modulesdir = $(pkgdatadir)/Texinfo/Convert/XSParagraph
  27. xsdir = $(pkglibdir)
  28. dist_modules_DATA = TestXS.pm
  29. PERL_INC = $(PERL_CONF_archlibexp)/CORE
  30. XSUBPPARGS = -typemap $(PERL_CONF_privlibexp)/ExtUtils/typemap
  31. EXTRA_DIST+=fail.pl
  32. .xs.c:
  33. $(XSUBPP) $(XSUBPPARGS) $< > $*.xsc && mv $*.xsc $*.c
  34. # -------------------------------------------------------
  35. CLEANFILES =
  36. xs_LTLIBRARIES = XSParagraph.la TestXS.la
  37. XSParagraph_la_SOURCES = XSParagraph.c xspara.c xspara.h \
  38. text.c text.h ppport.h
  39. TestXS_la_SOURCES = TestXS.c ppport.h
  40. # TestXS has to be included in xs_LIBRARIES, and not noinst_LIBRARIES,
  41. # otherwise dynamic libraries aren't built (a libtool bug). Work around
  42. # this by deleting it after it's installed.
  43. install-data-hook:
  44. rm -f $(DESTDIR)$(xsdir)/TestXS*
  45. CLEANFILES += TestXS.c
  46. EXTRA_DIST += TestXS.xs
  47. CLEANFILES += XSParagraph.c
  48. EXTRA_DIST += XSParagraph.xs
  49. # Override these variables set by configure at the top level, because
  50. # the compiler used in this subdirectory might be different.
  51. # PERL_EXT_var are user variables, allowing configuring at the top-level
  52. # with e.g. "./configure CFLAGS='-g -O0' PERL_EXT_CFLAGS='-g'".
  53. CFLAGS = $(PERL_EXT_CFLAGS)
  54. CPPFLAGS = $(PERL_EXT_CPPFLAGS)
  55. LDFLAGS = $(PERL_EXT_LDFLAGS)
  56. AM_CFLAGS = $(PERL_CONF_ccflags)
  57. XSParagraph_la_CFLAGS = $(AM_CFLAGS)
  58. XSParagraph_la_CFLAGS += -DVERSION=\"$(VERSION)\" -DXS_VERSION=\"$(XSPARAGRAPH_INTERFACE_VERSION)\" "-I$(PERL_INC)"
  59. TestXS_la_CFLAGS = $(AM_CFLAGS)
  60. TestXS_la_CFLAGS += -DVERSION=\"$(VERSION)\" -DXS_VERSION=\"$(VERSION)\" "-I$(PERL_INC)"
  61. AM_LDFLAGS = -no-undefined -L$(PERL_INC) $(PERL_CONF_libperl)
  62. AM_LDFLAGS += -avoid-version -module $(PERL_CONF_ccdlflags)
  63. # The -no-undefined flag is for MS-Windows. See info node
  64. # `(gnulib)Libtool and Windows'. The -L and -l options after it show
  65. # where to find the undefined symbols.
  66. # only used to regenerate a stand-alone perl module
  67. perl_specific_files = \
  68. Makefile.PL \
  69. MANIFEST \
  70. prepare_standalone_perl_module.sh
  71. EXTRA_DIST += $(perl_specific_files)