mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-03-25 16:00:24 +08:00
depdemo commented out, so that `dist' works before `check' (BUILD_LTDL): will contain libltdl if --enable-ltdl-install * Makefile.am (DIST_SUBDIRS): expand SUBDIRS and add depdemo, commented out (SUBDIRS): add $(BUILT_LTDL) * libltdl/Makefile.am (EXTRA_LTLIBRARIES): add libtest.la, the same as libltdl but always a convenience library. Not built by default. Both libraries now depend on the libtool script, that depends on ../libtool and is rebuilt when needed * mdemo/Makefile.am (mdemo, mdemo.debug): depend on and link with ../libltdl/libtest.la, that is rebuilt if needed (mdemo_LDADD): removed $(LIBADD_M), to avoid silent failures (foo1.la): renamed from libfoo1.la; test removing the lib prefix * mdemo/foo1.c: renamed libfoo1_LTX symbols to foo1_LTX * mdemo/main.c: don't include string.h nor math.h, nor refer to sin nor cos * tests/mdemo-exec.test: renamed libfoo1.la to foo1.la * tests/mdemo-inst.test: ditto
This is mdemo, an example package that uses GNU libtool with an Automake-generated environment to build two simple libraries and programs. It demonstrates how to build both dynamic and static libraries that can be dlopened. You'll need a wrapper (libltdl) for your dlopen functions. We prefix all exported symbols with "libname_LTX_". When dlopening these static libraries, we cut the prefix off to get the real name.