1 ## Makefile.am -- Process this file with automake to produce Makefile.in
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 COPYING.LIB. 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 ACLOCAL_AMFLAGS = -I m4
32 AUTOMAKE_OPTIONS = foreign
44 # -I$(srcdir) is needed for user that built libltdl with a sub-Automake
45 # (not as a sub-package!) using 'nostdinc':
46 AM_CPPFLAGS += -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \
47 -DLTDL -I. -I$(srcdir) -Ilibltdl \
48 -I$(srcdir)/libltdl -I$(srcdir)/libltdl
49 AM_LDFLAGS += -no-undefined
50 LTDL_VERSION_INFO = -version-info 10:0:3
52 noinst_LTLIBRARIES += $(LT_DLLOADERS)
55 ltdlincludedir = $(includedir)/libltdl
56 ltdlinclude_HEADERS = libltdl/lt_system.h \
59 include_HEADERS += ltdl.h
60 lib_LTLIBRARIES += libltdl.la
64 noinst_LTLIBRARIES += libltdlc.la
67 libltdl_la_SOURCES = libltdl/lt__alloc.h \
68 libltdl/lt__dirent.h \
70 libltdl/lt__private.h \
72 libltdl/lt_dlloader.h \
84 EXTRA_DIST += lt__dirent.c \
87 libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
88 libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN)
89 libltdl_la_LIBADD = $(LTLIBOBJS)
90 libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(LTLIBOBJS)
92 libltdlc_la_SOURCES = $(libltdl_la_SOURCES)
93 libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
94 libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
95 libltdlc_la_LIBADD = $(libltdl_la_LIBADD)
96 libltdlc_la_DEPENDENCIES= $(libltdl_la_DEPENDENCIES)
98 ## The loaders are preopened by libltdl, itself always built from
99 ## pic-objects (either as a shared library, or a convenience library),
100 ## so the loaders themselves must be made from pic-objects too. We
101 ## use convenience libraries for that purpose:
102 EXTRA_LTLIBRARIES += dlopen.la \
109 dlopen_la_SOURCES = loaders/dlopen.c
110 dlopen_la_LDFLAGS = -module -avoid-version
111 dlopen_la_LIBADD = $(LIBADD_DLOPEN)
113 dld_link_la_SOURCES = loaders/dld_link.c
114 dld_link_la_LDFLAGS = -module -avoid-version
115 dld_link_la_LIBADD = -ldld
117 dyld_la_SOURCES = loaders/dyld.c
118 dyld_la_LDFLAGS = -module -avoid-version
120 load_add_on_la_SOURCES = loaders/load_add_on.c
121 load_add_on_la_LDFLAGS = -module -avoid-version
123 loadlibrary_la_SOURCES = loaders/loadlibrary.c
124 loadlibrary_la_LDFLAGS = -module -avoid-version
126 shl_load_la_SOURCES = loaders/shl_load.c
127 shl_load_la_LDFLAGS = -module -avoid-version
128 shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
130 ## Make sure these will be cleaned even when they're not built by default:
131 CLEANFILES += libltdl.la \
135 ## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects
137 CLEANFILES += $(LIBOBJS) $(LTLIBOBJS)
139 EXTRA_DIST += COPYING.LIB \
148 ## --------------------------- ##
149 ## Gnulib Makefile.am snippets ##
150 ## --------------------------- ##
152 BUILT_SOURCES += $(ARGZ_H)
153 EXTRA_DIST += argz_.h \
156 # We need the following in order to create an <argz.h> when the system
157 # doesn't have one that works with the given compiler.
158 all-local $(lib_OBJECTS): $(ARGZ_H)
161 cp $(srcdir)/argz_.h $@-t
163 MOSTLYCLEANFILES += argz.h \