diff --git a/.gitignore b/.gitignore
index b1879a4..9a5a036 100644
--- a/.gitignore
+++ b/.gitignore
tools/rfcomm
tools/l2ping
tools/sdptool
+tools/avtest
test/agent
test/bdaddr
test/hciemu
-test/avtest
test/l2test
test/rctest
test/scotest
diff --git a/Makefile.tools b/Makefile.tools
index 764f48c..a80b742 100644
--- a/Makefile.tools
+++ b/Makefile.tools
bin_PROGRAMS += tools/hciattach tools/hciconfig
-noinst_PROGRAMS += tools/avinfo tools/hcieventmask tools/hcisecfilter
+noinst_PROGRAMS += tools/avinfo tools/avtest \
+ tools/hcieventmask tools/hcisecfilter
tools_rfcomm_SOURCES = tools/rfcomm.c
tools_rfcomm_LDADD = lib/libbluetooth-private.la
tools_avinfo_LDADD = lib/libbluetooth-private.la
+tools_avtest_LDADD = lib/libbluetooth-private.la
+
tools_hcieventmask_LDADD = lib/libbluetooth-private.la
noinst_PROGRAMS += tools/btmgmt tools/btattach tools/btsnoop \
if TEST
bin_PROGRAMS += test/hciemu test/l2test test/rctest
-noinst_PROGRAMS += test/gaptest test/sdptest test/scotest test/avtest \
+noinst_PROGRAMS += test/gaptest test/sdptest test/scotest \
test/lmptest test/bdaddr test/agent \
test/btiotest test/mpris-player
test_scotest_LDADD = lib/libbluetooth-private.la
-test_avtest_LDADD = lib/libbluetooth-private.la
-
test_lmptest_LDADD = lib/libbluetooth-private.la
test_bdaddr_SOURCES = test/bdaddr.c src/oui.h src/oui.c
diff --git a/test/avtest.c b/tools/avtest.c
similarity index 100%
rename from test/avtest.c
rename to tools/avtest.c