Description: avoid selecting the way tools are linked
 Current Makefile builds the tools twice and makes it difficult to use
 the version linked dynamically.
Author: Nicolas Boulenguez <nicolas@debian.org>

--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,6 @@
 include Makefile.conf
 
 ifeq (${BUILDS_SHARED},yes)
-# Additional targets. Builds relocatble first so that the tools are
-# preferably linked statically.
 all: relocatable static
 else
 all: static
@@ -15,9 +13,7 @@
 
 include Makefile.gnat
 
-## Builds explicitly the shared or the static libraries
-
-static: build_library_type/static
+static: build_library_type/static build_tools/static
 shared relocatable: build_library_type/relocatable
 
 # Build either type of library. The argument (%) is the type of library to build
@@ -32,6 +28,8 @@
 	${GPRBUILD} ${GPRBUILD_OPTIONS} -XLIBRARY_TYPE=$(@F) -Psrc/gnatcoll_gtk -p
 endif
 
+build_tools/%:
+	@echo "====== Building tools against $(@F) libraries ======"
 	@# Build the tools (the list is the project's Main attribute)
 	@# They are not build as part of the above because only the Main from
 	@# gnatcoll_build.gpr are build. We could use aggregate projects to speed
