libtool/mdemo/Makefile.am
Alexandre Oliva f212b8d7df * mdemo/Makefile.am (../libltdl/libtool): if it does not exist,
the sub-make for libltdlc.la will take care of it, but we must at
least provide an empty rule for it, otherwise the sub-make will
never run
1999-01-22 09:39:15 +00:00

41 lines
1.3 KiB
Makefile

# A brief demonstration of Libtool modules. -*-Makefile-*-
#
AUTOMAKE_OPTIONS = no-dependencies foreign
INCLUDES = -I$(srcdir)/../libltdl
EXTRA_DIST = acinclude.m4
lib_LTLIBRARIES = foo1.la libfoo2.la
foo1_la_SOURCES = foo1.c
foo1_la_LDFLAGS = $(LIBADD_M) -module -avoid-version
libfoo2_la_SOURCES = foo2.c
libfoo2_la_LDFLAGS = $(LIBADD_M) -module
noinst_HEADERS = foo.h
bin_PROGRAMS = mdemo mdemo.debug
../libltdl/libltdlc.la: ../libtool ../libltdl/libtool \
$(srcdir)/../libltdl/ltdl.c $(srcdir)/../libltdl/ltdl.h
(cd ../libltdl; $(MAKE) libltdlc.la)
# Without the following line, the check may fail if libltdl/libtool is
# removed after libltdl is configured
../libltdl/libtool:
# Create a version of mdemo that does dlopen.
mdemo_SOURCES = main.c
mdemo_LDFLAGS = -export-dynamic ## FIXME: remove this when libtool and libltdl
## handle dependencies of modules
## The quotes around -dlopen below fool automake into accepting it
mdemo_LDADD = ../libltdl/libltdlc.la "-dlopen" foo1.la "-dlopen" libfoo2.la
mdemo_DEPENDENCIES = ../libltdl/libltdlc.la foo1.la libfoo2.la
# Create an easier-to-debug version of mdemo.
mdemo_debug_SOURCES = $(mdemo_SOURCES)
mdemo_debug_LDFLAGS = $(STATIC) $(mdemo_LDFLAGS)
mdemo_debug_LDADD = $(mdemo_LDADD)
mdemo_debug_DEPENDENCIES = $(mdemo_DEPENDENCIES)