tools: Do not link dynamically with libkmod

Instead of linking dynamically with libkmod, use libkmod-private.la. We
disallow creating a static libkmod because we can't hide symbols there
and it cause problems with external programs. However this should not
prevent users that are only interested in the tools we provide not being
able to ship only them keeping the library alone.

Other projects also do this to allow our tools to use certain functions
that should not be used outside of the project.
diff --git a/Makefile.am b/Makefile.am
index c165868..6cff044 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -104,8 +104,8 @@
 if BUILD_TOOLS
 bin_PROGRAMS = tools/kmod
 
-noinst_SCRIPTS = tools/test/insmod tools/test/rmmod tools/test/lsmod \
-		 tools/test/modprobe tools/test/modinfo tools/test/depmod
+noinst_SCRIPTS = tools/insmod tools/rmmod tools/lsmod \
+		 tools/modprobe tools/modinfo tools/depmod
 
 tools_kmod_SOURCES = tools/kmod.c tools/kmod.h tools/lsmod.c \
 		     tools/rmmod.c tools/insmod.c \
@@ -113,14 +113,9 @@
 		     tools/depmod.c tools/log.h tools/log.c \
 		     tools/static-nodes.c
 tools_kmod_LDADD = libkmod/libkmod-util.la \
-		   libkmod/libkmod.la
+		   libkmod/libkmod-private.la
 
-noinst_PROGRAMS = tools/test/kmod
-tools_test_kmod_SOURCES = $(tools_kmod_SOURCES)
-tools_test_kmod_LDADD = libkmod/libkmod-util.la \
-			 libkmod/libkmod-private.la
-
-${noinst_SCRIPTS}: tools/test/kmod
+${noinst_SCRIPTS}: tools/kmod
 	$(AM_V_GEN) ($(RM) $@; \
 		$(LN_S) $(notdir $<) $@)
 endif