1 # ------------------------------------------------------------------------------
5 ACLOCAL_AMFLAGS = -I build/m4 ${ACLOCAL_FLAGS}
6 AM_MAKEFLAGS = --no-print-directory
7 AUTOMAKE_OPTIONS = color-tests parallel-tests
9 GCC_COLORS ?= 'ooh, shiny!'
12 # remove targets if the command fails
15 # keep intermediate files
18 # keep the test-suite.log and Makefile around at all times
19 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
21 pkgincludedir=$(includedir)/org.bus1
22 pkgconfiglibdir=$(libdir)/pkgconfig
25 CLEANFILES = $(BUILT_SOURCES)
35 -include $(top_builddir)/build/config.h \
36 -I $(top_srcdir)/src \
37 -I $(top_builddir)/src \
40 AM_CFLAGS = $(OUR_CFLAGS)
41 AM_LDFLAGS = $(OUR_LDFLAGS)
43 # ------------------------------------------------------------------------------
49 libcrbtree_a_SOURCES = \
51 src/c-rbtree-private.h \
53 src/org.bus1/c-rbtree.h
55 # ------------------------------------------------------------------------------
56 # shared library built from archive
58 all-local: libcrbtree.so.0
60 pkginclude_HEADERS += \
61 src/org.bus1/c-rbtree.h
63 libcrbtree.so.0: libcrbtree.a $(top_srcdir)/src/libcrbtree.sym
64 $(AM_V_CCLD)$(LINK) -shared \
66 -Wl,--version-script=$(top_srcdir)/src/libcrbtree.sym \
67 -Wl,--whole-archive libcrbtree.a -Wl,--no-whole-archive
73 @echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
74 $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1
75 @echo " $(INSTALL) libcrbtree.so.0 '$(DESTDIR)$(libdir)'"; \
76 $(INSTALL) libcrbtree.so.0 "$(DESTDIR)$(libdir)" || exit $$?
77 @echo " $(LN_S) -f libcrbtree.so.0 '$(DESTDIR)$(libdir)/libcrbtree.so'"; \
78 $(LN_S) -f libcrbtree.so.0 "$(DESTDIR)$(libdir)/libcrbtree.so" || exit $$?
81 @test ! -d "$(DESTDIR)$(libdir)" || \
82 { echo " ( cd '$(DESTDIR)$(libdir)' && rm -f libcrbtree.so.0 )"; \
83 rm -f "$(DESTDIR)$(libdir)/libcrbtree.so.0"; }
87 -e 's,@includedir\@,$(includedir),g' \
88 -e 's,@libdir\@,$(libdir),g' \
89 -e 's,@VERSION\@,$(VERSION),g' \
92 pkgconfiglib_DATA += \
101 # ------------------------------------------------------------------------------
111 libcrbtree.so.0 # explicitly linked against public library
113 # ------------------------------------------------------------------------------
119 test_basic_SOURCES = \
125 # ------------------------------------------------------------------------------
137 # ------------------------------------------------------------------------------
140 AM_TESTS_ENVIRONMENT = LD_LIBRARY_PATH=$(abs_builddir)
141 check_PROGRAMS += $(default_tests)
142 TESTS += $(default_tests)
144 # ------------------------------------------------------------------------------ΒΆ
145 # check "make install" directory tree
148 rm -rf $(abs_builddir)/install-tree
149 $(MAKE) install DESTDIR=$(abs_builddir)/install-tree
150 tree $(abs_builddir)/install-tree