diff --git a/.gitignore b/.gitignore
index 9a5a036..a5da318 100644
--- a/.gitignore
+++ b/.gitignore
tools/hid2hci
tools/rfcomm
tools/l2ping
+tools/l2test
tools/sdptool
tools/avtest
test/agent
test/bdaddr
test/hciemu
-test/l2test
test/rctest
test/scotest
test/gaptest
diff --git a/Makefile.tools b/Makefile.tools
index a80b742..d910456 100644
--- a/Makefile.tools
+++ b/Makefile.tools
if TOOLS
-bin_PROGRAMS += tools/rfcomm tools/l2ping \
+bin_PROGRAMS += tools/rfcomm tools/l2ping tools/l2test \
tools/hcitool tools/sdptool tools/ciptool
bin_PROGRAMS += tools/hciattach tools/hciconfig
tools_l2ping_LDADD = lib/libbluetooth-private.la
+tools_l2test_LDADD = lib/libbluetooth-private.la
+
tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \
tools/hciattach_st.c \
tools/hciattach_ti.c \
if TEST
-bin_PROGRAMS += test/hciemu test/l2test test/rctest
+bin_PROGRAMS += test/hciemu test/rctest
noinst_PROGRAMS += test/gaptest test/sdptest test/scotest \
test/lmptest test/bdaddr test/agent \
test_hciemu_LDADD = lib/libbluetooth-private.la
-test_l2test_LDADD = lib/libbluetooth-private.la
-
test_rctest_LDADD = lib/libbluetooth-private.la
test_gaptest_LDADD = @DBUS_LIBS@
diff --git a/test/l2test.c b/tools/l2test.c
similarity index 100%
rename from test/l2test.c
rename to tools/l2test.c