ltdl.mk 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. ## DO NOT REMOVE THIS LINE -- make depends on it
  32. # -I$(srcdir) is needed for user that built libltdl with a sub-Automake
  33. # (not as a sub-package!) using 'nostdinc':
  34. AM_CPPFLAGS += -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \
  35. -DLTDL -I. -I$(srcdir) -Ilibltdl \
  36. -I$(srcdir)/libltdl -Ilibltdl/libltdl \
  37. -I$(srcdir)/libltdl/libltdl
  38. AM_LDFLAGS += -no-undefined
  39. LTDL_VERSION_INFO = -version-info 10:1:3
  40. noinst_LTLIBRARIES += $(LT_DLLOADERS)
  41. if INSTALL_LTDL
  42. ltdlincludedir = $(includedir)/libltdl
  43. ltdlinclude_HEADERS = libltdl/libltdl/lt_system.h \
  44. libltdl/libltdl/lt_error.h \
  45. libltdl/libltdl/lt_dlloader.h
  46. include_HEADERS += libltdl/ltdl.h
  47. lib_LTLIBRARIES += libltdl/libltdl.la
  48. endif
  49. if CONVENIENCE_LTDL
  50. noinst_LTLIBRARIES += libltdl/libltdlc.la
  51. endif
  52. libltdl_libltdl_la_SOURCES = libltdl/libltdl/lt__alloc.h \
  53. libltdl/libltdl/lt__dirent.h \
  54. libltdl/libltdl/lt__glibc.h \
  55. libltdl/libltdl/lt__private.h \
  56. libltdl/libltdl/lt__strl.h \
  57. libltdl/libltdl/lt_dlloader.h \
  58. libltdl/libltdl/lt_error.h \
  59. libltdl/libltdl/lt_system.h \
  60. libltdl/libltdl/slist.h \
  61. libltdl/loaders/preopen.c \
  62. libltdl/lt__alloc.c \
  63. libltdl/lt_dlloader.c \
  64. libltdl/lt_error.c \
  65. libltdl/ltdl.c \
  66. libltdl/ltdl.h \
  67. libltdl/slist.c
  68. EXTRA_DIST += libltdl/lt__dirent.c \
  69. libltdl/lt__strl.c
  70. libltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
  71. libltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN)
  72. libltdl_libltdl_la_LIBADD = $(LTLIBOBJS)
  73. libltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(LTLIBOBJS)
  74. libltdl_libltdlc_la_SOURCES = $(libltdl_libltdl_la_SOURCES)
  75. libltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
  76. libltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
  77. libltdl_libltdlc_la_LIBADD = $(libltdl_libltdl_la_LIBADD)
  78. libltdl_libltdlc_la_DEPENDENCIES= $(libltdl_libltdl_la_DEPENDENCIES)
  79. ## The loaders are preopened by libltdl, itself always built from
  80. ## pic-objects (either as a shared library, or a convenience library),
  81. ## so the loaders themselves must be made from pic-objects too. We
  82. ## use convenience libraries for that purpose:
  83. EXTRA_LTLIBRARIES += libltdl/dlopen.la \
  84. libltdl/dld_link.la \
  85. libltdl/dyld.la \
  86. libltdl/load_add_on.la \
  87. libltdl/loadlibrary.la \
  88. libltdl/shl_load.la
  89. libltdl_dlopen_la_SOURCES = libltdl/loaders/dlopen.c
  90. libltdl_dlopen_la_LDFLAGS = -module -avoid-version
  91. libltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN)
  92. libltdl_dld_link_la_SOURCES = libltdl/loaders/dld_link.c
  93. libltdl_dld_link_la_LDFLAGS = -module -avoid-version
  94. libltdl_dld_link_la_LIBADD = -ldld
  95. libltdl_dyld_la_SOURCES = libltdl/loaders/dyld.c
  96. libltdl_dyld_la_LDFLAGS = -module -avoid-version
  97. libltdl_load_add_on_la_SOURCES = libltdl/loaders/load_add_on.c
  98. libltdl_load_add_on_la_LDFLAGS = -module -avoid-version
  99. libltdl_loadlibrary_la_SOURCES = libltdl/loaders/loadlibrary.c
  100. libltdl_loadlibrary_la_LDFLAGS = -module -avoid-version
  101. libltdl_shl_load_la_SOURCES = libltdl/loaders/shl_load.c
  102. libltdl_shl_load_la_LDFLAGS = -module -avoid-version
  103. libltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
  104. ## Make sure these will be cleaned even when they're not built by default:
  105. CLEANFILES += libltdl/libltdl.la \
  106. libltdl/libltdlc.la \
  107. libltdl/libdlloader.la
  108. ## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects
  109. ## automatically:
  110. CLEANFILES += $(LIBOBJS) $(LTLIBOBJS)
  111. EXTRA_DIST += libltdl/COPYING.LIB \
  112. libltdl/README
  113. ## --------------------------- ##
  114. ## Gnulib Makefile.am snippets ##
  115. ## --------------------------- ##
  116. BUILT_SOURCES += libltdl/libltdl/$(LT_ARGZ_H)
  117. EXTRA_DIST += libltdl/libltdl/lt__argz_.h \
  118. libltdl/lt__argz.c
  119. # We need the following in order to create an <argz.h> when the system
  120. # doesn't have one that works with the given compiler.
  121. all-local $(lib_OBJECTS): libltdl/libltdl/$(LT_ARGZ_H)
  122. libltdl/libltdl/lt__argz.h: libltdl/libltdl/lt__argz_.h
  123. $(AM_V_at)$(mkinstalldirs) . libltdl/libltdl
  124. $(AM_V_GEN)cp $(srcdir)/libltdl/libltdl/lt__argz_.h $@-t
  125. $(AM_V_at)mv $@-t $@
  126. MOSTLYCLEANFILES += libltdl/libltdl/lt__argz.h \
  127. libltdl/libltdl/lt__argz.h-t