root / ImageMagick / trunk / ltdl / Makefile.inc

Revision 12264, 5.2 kB (checked in by cristy, 4 weeks ago)
Line 
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
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.
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':
35AM_CPPFLAGS            += -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \
36                          -DLTDL -I. -I$(srcdir) -Iltdl \
37                          -I$(srcdir)/ltdl -I$(srcdir)/ltdl/libltdl
38AM_LDFLAGS             += -no-undefined
39LTDL_VERSION_INFO       = -version-info 9:0:2
40
41noinst_LTLIBRARIES      += $(LT_DLLOADERS)
42
43if INSTALL_LTDL
44ltdlincludedir          = $(includedir)/libltdl
45ltdlinclude_HEADERS     = ltdl/libltdl/lt_system.h \
46                          ltdl/libltdl/lt_error.h \
47                          ltdl/libltdl/lt_dlloader.h
48include_HEADERS        += ltdl/ltdl.h
49lib_LTLIBRARIES        += ltdl/libltdl.la
50endif
51
52if CONVENIENCE_LTDL
53noinst_LTLIBRARIES     += ltdl/libltdlc.la
54endif
55
56ltdl_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 \
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
73EXTRA_DIST             += ltdl/lt__dirent.c \
74                          ltdl/lt__strl.c
75
76ltdl_libltdl_la_CPPFLAGS        = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
77ltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN)
78ltdl_libltdl_la_LIBADD  = $(ltdl_LTLIBOBJS)
79ltdl_libltdl_la_DEPENDENCIES    = $(LT_DLLOADERS) $(ltdl_LTLIBOBJS)
80
81ltdl_libltdlc_la_SOURCES        = $(ltdl_libltdl_la_SOURCES)
82ltdl_libltdlc_la_CPPFLAGS       = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
83ltdl_libltdlc_la_LDFLAGS        = $(AM_LDFLAGS) $(LT_DLPREOPEN)
84ltdl_libltdlc_la_LIBADD = $(ltdl_libltdl_la_LIBADD)
85ltdl_libltdlc_la_DEPENDENCIES= $(ltdl_libltdl_la_DEPENDENCIES)
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:
91EXTRA_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
98ltdl_dlopen_la_SOURCES  = ltdl/loaders/dlopen.c
99ltdl_dlopen_la_LDFLAGS  = -module -avoid-version
100ltdl_dlopen_la_LIBADD   = $(LIBADD_DLOPEN)
101
102ltdl_dld_link_la_SOURCES        = ltdl/loaders/dld_link.c
103ltdl_dld_link_la_LDFLAGS        = -module -avoid-version
104ltdl_dld_link_la_LIBADD = -ldld
105
106ltdl_dyld_la_SOURCES            = ltdl/loaders/dyld.c
107ltdl_dyld_la_LDFLAGS            = -module -avoid-version
108
109ltdl_load_add_on_la_SOURCES     = ltdl/loaders/load_add_on.c
110ltdl_load_add_on_la_LDFLAGS     = -module -avoid-version
111
112ltdl_loadlibrary_la_SOURCES     = ltdl/loaders/loadlibrary.c
113ltdl_loadlibrary_la_LDFLAGS     = -module -avoid-version
114
115ltdl_shl_load_la_SOURCES        = ltdl/loaders/shl_load.c
116ltdl_shl_load_la_LDFLAGS        = -module -avoid-version
117ltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
118
119## Make sure these will be cleaned even when they're not built by default:
120CLEANFILES                     += 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:
126CLEANFILES             += $(ltdl_LIBOBJS) $(ltdl_LTLIBOBJS)
127
128EXTRA_DIST             += ltdl/README \
129                          ltdl/README
130
131## --------------------------- ##
132## Gnulib Makefile.am snippets ##
133## --------------------------- ##
134
135BUILT_SOURCES   += ltdl/$(ARGZ_H)
136EXTRA_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.
141all-local $(lib_OBJECTS): ltdl/$(ARGZ_H)
142ltdl/argz.h: ltdl/argz_.h
143        $(mkinstalldirs) . ltdl/
144        cp $(srcdir)/ltdl/argz_.h $@-t
145        mv $@-t $@
146MOSTLYCLEANFILES += ltdl/argz.h \
147                    ltdl/argz.h-t
Note: See TracBrowser for help on using the browser.