cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | ## Makefile.inc -- includable Makefile.am snippet |
| 2 | ## |
| 3 | ## Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc. |
| 4 | ## Written by Gary V. Vaughan, 2003 |
| 5 | ## |
| 6 | ## NOTE: The canonical source of this file is maintained with the |
| 7 | ## GNU Libtool package. Report bugs to bug-libtool@gnu.org. |
| 8 | ## |
| 9 | ## GNU Libltdl is free software; you can redistribute it and/or |
| 10 | ## modify it under the terms of the GNU Lesser General Public |
| 11 | ## License as published by the Free Software Foundation; either |
| 12 | ## version 2 of the License, or (at your option) any later version. |
| 13 | ## |
| 14 | ## As a special exception to the GNU Lesser General Public License, |
| 15 | ## if you distribute this file as part of a program or library that |
| 16 | ## is built using GNU libtool, you may include this file under the |
| 17 | ## same distribution terms that you use for the rest of that program. |
| 18 | ## |
| 19 | ## GNU Libltdl is distributed in the hope that it will be useful, |
| 20 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | ## GNU Lesser General Public License for more details. |
| 23 | ## |
| 24 | ## You should have received a copy of the GNU LesserGeneral Public |
cristy | 36f0032 | 2009-11-19 18:23:59 +0000 | [diff] [blame] | 25 | ## License along with GNU Libltdl; see the file README. If not, a |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 26 | ## copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, |
| 27 | ## or obtained by writing to the Free Software Foundation, Inc., |
| 28 | ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 29 | ##### |
| 30 | |
| 31 | ## DO NOT REMOVE THIS LINE -- make depends on it |
| 32 | |
| 33 | # -I$(srcdir) is needed for user that built libltdl with a sub-Automake |
| 34 | # (not as a sub-package!) using 'nostdinc': |
| 35 | AM_CPPFLAGS += -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \ |
| 36 | -DLTDL -I. -I$(srcdir) -Iltdl \ |
| 37 | -I$(srcdir)/ltdl -I$(srcdir)/ltdl/libltdl |
| 38 | AM_LDFLAGS += -no-undefined |
cristy | 1f9e1ed | 2009-11-18 04:09:38 +0000 | [diff] [blame] | 39 | LTDL_VERSION_INFO = -version-info 9:1:2 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 40 | |
| 41 | noinst_LTLIBRARIES += $(LT_DLLOADERS) |
| 42 | |
| 43 | if INSTALL_LTDL |
| 44 | ltdlincludedir = $(includedir)/libltdl |
cristy | aefa975 | 2009-11-18 17:37:56 +0000 | [diff] [blame] | 45 | ltdlinclude_HEADERS = ltdl/libltdl/lt_system.h \ |
| 46 | ltdl/libltdl/lt_error.h \ |
| 47 | ltdl/libltdl/lt_dlloader.h |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 48 | include_HEADERS += ltdl/ltdl.h |
| 49 | lib_LTLIBRARIES += ltdl/libltdl.la |
| 50 | endif |
| 51 | |
| 52 | if CONVENIENCE_LTDL |
| 53 | noinst_LTLIBRARIES += ltdl/libltdlc.la |
| 54 | endif |
| 55 | |
cristy | aefa975 | 2009-11-18 17:37:56 +0000 | [diff] [blame] | 56 | ltdl_libltdl_la_SOURCES = ltdl/libltdl/lt__alloc.h \ |
| 57 | ltdl/libltdl/lt__dirent.h \ |
| 58 | ltdl/libltdl/lt__glibc.h \ |
| 59 | ltdl/libltdl/lt__private.h \ |
| 60 | ltdl/libltdl/lt__strl.h \ |
| 61 | ltdl/libltdl/lt_dlloader.h \ |
| 62 | ltdl/libltdl/lt_error.h \ |
| 63 | ltdl/libltdl/lt_system.h \ |
| 64 | ltdl/libltdl/slist.h \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 65 | ltdl/loaders/preopen.c \ |
| 66 | ltdl/lt__alloc.c \ |
| 67 | ltdl/lt_dlloader.c \ |
| 68 | ltdl/lt_error.c \ |
| 69 | ltdl/ltdl.c \ |
| 70 | ltdl/ltdl.h \ |
| 71 | ltdl/slist.c |
| 72 | |
| 73 | EXTRA_DIST += ltdl/lt__dirent.c \ |
| 74 | ltdl/lt__strl.c |
| 75 | |
cristy | aefa975 | 2009-11-18 17:37:56 +0000 | [diff] [blame] | 76 | ltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS) |
| 77 | ltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN) |
| 78 | ltdl_libltdl_la_LIBADD = $(ltdl_LTLIBOBJS) |
| 79 | ltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(ltdl_LTLIBOBJS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 80 | |
cristy | aefa975 | 2009-11-18 17:37:56 +0000 | [diff] [blame] | 81 | ltdl_libltdlc_la_SOURCES = $(ltdl_libltdl_la_SOURCES) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 82 | ltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS) |
| 83 | ltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN) |
cristy | aefa975 | 2009-11-18 17:37:56 +0000 | [diff] [blame] | 84 | ltdl_libltdlc_la_LIBADD = $(ltdl_libltdl_la_LIBADD) |
| 85 | ltdl_libltdlc_la_DEPENDENCIES= $(ltdl_libltdl_la_DEPENDENCIES) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 86 | |
| 87 | ## The loaders are preopened by libltdl, itself always built from |
| 88 | ## pic-objects (either as a shared library, or a convenience library), |
| 89 | ## so the loaders themselves must be made from pic-objects too. We |
| 90 | ## use convenience libraries for that purpose: |
| 91 | EXTRA_LTLIBRARIES += ltdl/dlopen.la \ |
| 92 | ltdl/dld_link.la \ |
| 93 | ltdl/dyld.la \ |
| 94 | ltdl/load_add_on.la \ |
| 95 | ltdl/loadlibrary.la \ |
| 96 | ltdl/shl_load.la |
| 97 | |
| 98 | ltdl_dlopen_la_SOURCES = ltdl/loaders/dlopen.c |
| 99 | ltdl_dlopen_la_LDFLAGS = -module -avoid-version |
| 100 | ltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN) |
| 101 | |
| 102 | ltdl_dld_link_la_SOURCES = ltdl/loaders/dld_link.c |
| 103 | ltdl_dld_link_la_LDFLAGS = -module -avoid-version |
| 104 | ltdl_dld_link_la_LIBADD = -ldld |
| 105 | |
| 106 | ltdl_dyld_la_SOURCES = ltdl/loaders/dyld.c |
| 107 | ltdl_dyld_la_LDFLAGS = -module -avoid-version |
| 108 | |
| 109 | ltdl_load_add_on_la_SOURCES = ltdl/loaders/load_add_on.c |
| 110 | ltdl_load_add_on_la_LDFLAGS = -module -avoid-version |
| 111 | |
| 112 | ltdl_loadlibrary_la_SOURCES = ltdl/loaders/loadlibrary.c |
| 113 | ltdl_loadlibrary_la_LDFLAGS = -module -avoid-version |
| 114 | |
| 115 | ltdl_shl_load_la_SOURCES = ltdl/loaders/shl_load.c |
| 116 | ltdl_shl_load_la_LDFLAGS = -module -avoid-version |
| 117 | ltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD) |
| 118 | |
| 119 | ## Make sure these will be cleaned even when they're not built by default: |
| 120 | CLEANFILES += ltdl/libltdl.la \ |
| 121 | ltdl/libltdlc.la \ |
| 122 | ltdl/libdlloader.la |
| 123 | |
| 124 | ## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects |
| 125 | ## automatically: |
| 126 | CLEANFILES += $(ltdl_LIBOBJS) $(ltdl_LTLIBOBJS) |
| 127 | |
cristy | 36f0032 | 2009-11-19 18:23:59 +0000 | [diff] [blame] | 128 | EXTRA_DIST += ltdl/README \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 129 | ltdl/README |
| 130 | |
| 131 | ## --------------------------- ## |
| 132 | ## Gnulib Makefile.am snippets ## |
| 133 | ## --------------------------- ## |
| 134 | |
| 135 | BUILT_SOURCES += ltdl/$(ARGZ_H) |
| 136 | EXTRA_DIST += ltdl/argz_.h \ |
| 137 | ltdl/argz.c |
| 138 | |
| 139 | # We need the following in order to create an <argz.h> when the system |
| 140 | # doesn't have one that works with the given compiler. |
| 141 | all-local $(lib_OBJECTS): ltdl/$(ARGZ_H) |
| 142 | ltdl/argz.h: ltdl/argz_.h |
| 143 | $(mkinstalldirs) . ltdl/ |
| 144 | cp $(srcdir)/ltdl/argz_.h $@-t |
| 145 | mv $@-t $@ |
| 146 | MOSTLYCLEANFILES += ltdl/argz.h \ |
| 147 | ltdl/argz.h-t |