Makefile.am 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. ## ltdl.mk -- includable Makefile snippet
  2. ##
  3. ## Copyright (C) 2003-2005, 2007, 2011-2015 Free Software Foundation,
  4. ## Inc.
  5. ## Written by Gary V. Vaughan, 2003
  6. ##
  7. ## NOTE: The canonical source of this file is maintained with the
  8. ## GNU Libtool package. Report bugs to bug-libtool@gnu.org.
  9. ##
  10. ## GNU Libltdl is free software; you can redistribute it and/or
  11. ## modify it under the terms of the GNU Lesser General Public
  12. ## License as published by the Free Software Foundation; either
  13. ## version 2 of the License, or (at your option) any later version.
  14. ##
  15. ## As a special exception to the GNU Lesser General Public License,
  16. ## if you distribute this file as part of a program or library that
  17. ## is built using GNU libtool, you may include this file under the
  18. ## same distribution terms that you use for the rest of that program.
  19. ##
  20. ## GNU Libltdl is distributed in the hope that it will be useful,
  21. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. ## GNU Lesser General Public License for more details.
  24. ##
  25. ## You should have received a copy of the GNU LesserGeneral Public
  26. ## License along with GNU Libltdl; see the file COPYING.LIB. If not, a
  27. ## copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
  28. ## or obtained by writing to the Free Software Foundation, Inc.,
  29. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  30. #####
  31. ACLOCAL_AMFLAGS = -I ../m4
  32. AUTOMAKE_OPTIONS = foreign
  33. AM_CPPFLAGS =
  34. AM_LDFLAGS =
  35. BUILT_SOURCES =
  36. include_HEADERS =
  37. noinst_LTLIBRARIES =
  38. lib_LTLIBRARIES =
  39. EXTRA_LTLIBRARIES =
  40. EXTRA_DIST =
  41. CLEANFILES =
  42. MOSTLYCLEANFILES =
  43. # -I$(srcdir) is needed for user that built libltdl with a sub-Automake
  44. # (not as a sub-package!) using 'nostdinc':
  45. AM_CPPFLAGS += -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \
  46. -DLTDL -I. -I$(srcdir) -Ilibltdl \
  47. -I$(srcdir)/libltdl
  48. AM_LDFLAGS += -no-undefined
  49. LTDL_VERSION_INFO = -version-info 10:1:3
  50. noinst_LTLIBRARIES += $(LT_DLLOADERS)
  51. if INSTALL_LTDL
  52. ltdlincludedir = $(includedir)/libltdl
  53. ltdlinclude_HEADERS = libltdl/lt_system.h \
  54. libltdl/lt_error.h \
  55. libltdl/lt_dlloader.h
  56. include_HEADERS += ltdl.h
  57. lib_LTLIBRARIES += libltdl.la
  58. endif
  59. if CONVENIENCE_LTDL
  60. noinst_LTLIBRARIES += libltdlc.la
  61. endif
  62. libltdl_la_SOURCES = libltdl/lt__alloc.h \
  63. libltdl/lt__dirent.h \
  64. libltdl/lt__glibc.h \
  65. libltdl/lt__private.h \
  66. libltdl/lt__strl.h \
  67. libltdl/lt_dlloader.h \
  68. libltdl/lt_error.h \
  69. libltdl/lt_system.h \
  70. libltdl/slist.h \
  71. loaders/preopen.c \
  72. lt__alloc.c \
  73. lt_dlloader.c \
  74. lt_error.c \
  75. ltdl.c \
  76. ltdl.h \
  77. slist.c
  78. EXTRA_DIST += lt__dirent.c \
  79. lt__strl.c
  80. libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
  81. libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN)
  82. libltdl_la_LIBADD = $(LTLIBOBJS)
  83. libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(LTLIBOBJS)
  84. libltdlc_la_SOURCES = $(libltdl_la_SOURCES)
  85. libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
  86. libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
  87. libltdlc_la_LIBADD = $(libltdl_la_LIBADD)
  88. libltdlc_la_DEPENDENCIES= $(libltdl_la_DEPENDENCIES)
  89. ## The loaders are preopened by libltdl, itself always built from
  90. ## pic-objects (either as a shared library, or a convenience library),
  91. ## so the loaders themselves must be made from pic-objects too. We
  92. ## use convenience libraries for that purpose:
  93. EXTRA_LTLIBRARIES += dlopen.la \
  94. dld_link.la \
  95. dyld.la \
  96. load_add_on.la \
  97. loadlibrary.la \
  98. shl_load.la
  99. dlopen_la_SOURCES = loaders/dlopen.c
  100. dlopen_la_LDFLAGS = -module -avoid-version
  101. dlopen_la_LIBADD = $(LIBADD_DLOPEN)
  102. dld_link_la_SOURCES = loaders/dld_link.c
  103. dld_link_la_LDFLAGS = -module -avoid-version
  104. dld_link_la_LIBADD = -ldld
  105. dyld_la_SOURCES = loaders/dyld.c
  106. dyld_la_LDFLAGS = -module -avoid-version
  107. load_add_on_la_SOURCES = loaders/load_add_on.c
  108. load_add_on_la_LDFLAGS = -module -avoid-version
  109. loadlibrary_la_SOURCES = loaders/loadlibrary.c
  110. loadlibrary_la_LDFLAGS = -module -avoid-version
  111. shl_load_la_SOURCES = loaders/shl_load.c
  112. shl_load_la_LDFLAGS = -module -avoid-version
  113. shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
  114. ## Make sure these will be cleaned even when they're not built by default:
  115. CLEANFILES += libltdl.la \
  116. libltdlc.la \
  117. libdlloader.la
  118. ## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects
  119. ## automatically:
  120. CLEANFILES += $(LIBOBJS) $(LTLIBOBJS)
  121. EXTRA_DIST += COPYING.LIB \
  122. README
  123. ## --------------------------- ##
  124. ## Gnulib Makefile.am snippets ##
  125. ## --------------------------- ##
  126. BUILT_SOURCES += libltdl/$(LT_ARGZ_H)
  127. EXTRA_DIST += libltdl/lt__argz_.h \
  128. lt__argz.c
  129. # We need the following in order to create an <argz.h> when the system
  130. # doesn't have one that works with the given compiler.
  131. all-local $(lib_OBJECTS): $(LT_ARGZ_H)
  132. libltdl/lt__argz.h: libltdl/lt__argz_.h
  133. $(AM_V_at)$(mkinstalldirs) . libltdl
  134. $(AM_V_GEN)cp $(srcdir)/libltdl/lt__argz_.h $@-t
  135. $(AM_V_at)mv $@-t $@
  136. MOSTLYCLEANFILES += libltdl/lt__argz.h \
  137. libltdl/lt__argz.h-t