1 ## Makefile.inc -- includable Makefile.am snippet
3 ## Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
4 ## Written by Gary V. Vaughan, 2003
6 ## NOTE: The canonical source of this file is maintained with the
7 ## GNU Libtool package. Report bugs to bug-libtool@gnu.org.
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.
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.
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.
24 ## You should have received a copy of the GNU LesserGeneral Public
25 ## License along with GNU Libltdl; see the file README. If not, a
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.
31 ## DO NOT REMOVE THIS LINE -- make depends on it
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
39 LTDL_VERSION_INFO = -version-info 10:0:3
41 noinst_LTLIBRARIES += $(LT_DLLOADERS)
44 ltdlincludedir = $(includedir)/libltdl
45 ltdlinclude_HEADERS = ltdl/libltdl/lt_system.h \
46 ltdl/libltdl/lt_error.h \
47 ltdl/libltdl/lt_dlloader.h
48 include_HEADERS += ltdl/ltdl.h
49 lib_LTLIBRARIES += ltdl/libltdl.la
53 noinst_LTLIBRARIES += ltdl/libltdlc.la
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 \
65 ltdl/loaders/preopen.c \
73 EXTRA_DIST += ltdl/lt__dirent.c \
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)
81 ltdl_libltdlc_la_SOURCES = $(ltdl_libltdl_la_SOURCES)
82 ltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
83 ltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
84 ltdl_libltdlc_la_LIBADD = $(ltdl_libltdl_la_LIBADD)
85 ltdl_libltdlc_la_DEPENDENCIES= $(ltdl_libltdl_la_DEPENDENCIES)
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 \
98 ltdl_dlopen_la_SOURCES = ltdl/loaders/dlopen.c
99 ltdl_dlopen_la_LDFLAGS = -module -avoid-version
100 ltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN)
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
106 ltdl_dyld_la_SOURCES = ltdl/loaders/dyld.c
107 ltdl_dyld_la_LDFLAGS = -module -avoid-version
109 ltdl_load_add_on_la_SOURCES = ltdl/loaders/load_add_on.c
110 ltdl_load_add_on_la_LDFLAGS = -module -avoid-version
112 ltdl_loadlibrary_la_SOURCES = ltdl/loaders/loadlibrary.c
113 ltdl_loadlibrary_la_LDFLAGS = -module -avoid-version
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)
119 ## Make sure these will be cleaned even when they're not built by default:
120 CLEANFILES += ltdl/libltdl.la \
124 ## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects
126 CLEANFILES += $(ltdl_LIBOBJS) $(ltdl_LTLIBOBJS)
128 EXTRA_DIST += ltdl/README \
131 ## --------------------------- ##
132 ## Gnulib Makefile.am snippets ##
133 ## --------------------------- ##
135 BUILT_SOURCES += ltdl/$(ARGZ_H)
136 EXTRA_DIST += ltdl/argz_.h \
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
146 MOSTLYCLEANFILES += ltdl/argz.h \