# ------------------------------------------------------------------------------ # autotools SHELL = bash ACLOCAL_AMFLAGS = -I build/m4 ${ACLOCAL_FLAGS} AM_MAKEFLAGS = --no-print-directory AUTOMAKE_OPTIONS = color-tests parallel-tests GCC_COLORS ?= 'ooh, shiny!' export GCC_COLORS # remove targets if the command fails .DELETE_ON_ERROR: # keep intermediate files .SECONDARY: # keep the test-suite.log and Makefile around at all times .PRECIOUS: $(TEST_SUITE_LOG) Makefile pkgincludedir=$(includedir)/org.bus1 pkgconfiglibdir=$(libdir)/pkgconfig BUILT_SOURCES = CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = pkginclude_HEADERS = pkgconfiglib_DATA = noinst_LIBRARIES = check_PROGRAMS = default_tests = TESTS = AM_CPPFLAGS = \ -include $(top_builddir)/build/config.h \ -I $(top_srcdir)/src \ -I $(top_builddir)/src \ $(OUR_CPPFLAGS) AM_CFLAGS = $(OUR_CFLAGS) AM_LDFLAGS = $(OUR_LDFLAGS) # ------------------------------------------------------------------------------ # library archive noinst_LIBRARIES += \ libcrbtree.a libcrbtree_a_SOURCES = \ src/libcrbtree.sym \ src/c-rbtree-private.h \ src/c-rbtree.c \ src/org.bus1/c-rbtree.h # ------------------------------------------------------------------------------ # shared library built from archive all-local: libcrbtree.so.0 pkginclude_HEADERS += \ src/org.bus1/c-rbtree.h libcrbtree.so.0: libcrbtree.a $(top_srcdir)/src/libcrbtree.sym $(AM_V_CCLD)$(LINK) -shared \ -Wl,-soname=$@ \ -Wl,--version-script=$(top_srcdir)/src/libcrbtree.sym \ -Wl,--whole-archive libcrbtree.a -Wl,--no-whole-archive CLEANFILES += \ libcrbtree.so.0 install-exec-local: @echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1 @echo " $(INSTALL) libcrbtree.so.0 '$(DESTDIR)$(libdir)'"; \ $(INSTALL) libcrbtree.so.0 "$(DESTDIR)$(libdir)" || exit $$? @echo " $(LN_S) -f libcrbtree.so.0 '$(DESTDIR)$(libdir)/libcrbtree.so'"; \ $(LN_S) -f libcrbtree.so.0 "$(DESTDIR)$(libdir)/libcrbtree.so" || exit $$? uninstall-local: @test ! -d "$(DESTDIR)$(libdir)" || \ { echo " ( cd '$(DESTDIR)$(libdir)' && rm -f libcrbtree.so.0 )"; \ rm -f "$(DESTDIR)$(libdir)/libcrbtree.so.0"; } %.pc: %.pc.in $(AM_V_GEN)$(SED) \ -e 's,@includedir\@,$(includedir),g' \ -e 's,@libdir\@,$(libdir),g' \ -e 's,@VERSION\@,$(VERSION),g' \ $< > $@ pkgconfiglib_DATA += \ src/crbtree.pc EXTRA_DIST += \ src/crbtree.pc.in CLEANFILES += \ src/crbtree.pc # ------------------------------------------------------------------------------ # test-api default_tests += \ test-api test_api_SOURCES = \ src/test-api.c test_api_LDADD = \ libcrbtree.so.0 # explicitly linked against public library # ------------------------------------------------------------------------------ # test-basic default_tests += \ test-basic test_basic_SOURCES = \ src/test-basic.c test_basic_LDADD = \ libcrbtree.a # ------------------------------------------------------------------------------ # test-map default_tests += \ test-map test_map_SOURCES = \ src/test-map.c test_map_LDADD = \ libcrbtree.a # ------------------------------------------------------------------------------ # test suite AM_TESTS_ENVIRONMENT = LD_LIBRARY_PATH=$(abs_builddir) check_PROGRAMS += $(default_tests) TESTS += $(default_tests) # ------------------------------------------------------------------------------ΒΆ # check "make install" directory tree install-tree: all rm -rf $(abs_builddir)/install-tree $(MAKE) install DESTDIR=$(abs_builddir)/install-tree tree $(abs_builddir)/install-tree .PHONY: install-tree