diff --git a/makefile b/makefile
index 97100db..6caaf22 100644
--- a/makefile
+++ b/makefile
@@ -373,7 +373,6 @@ clean:
 	rm -rf doc/doxygen
 	rm -f `find . -type f -name "*.pdf" | grep -FL crypt.pdf | xargs`
 	rm -f *.txt
-	cd testprof ; $(MAKE) clean
 
 #build the doxy files (requires Doxygen, tetex and patience)
 doxygen:
diff --git a/makefile.shared b/makefile.shared
index 1506ba7..8d9e964 100644
--- a/makefile.shared
+++ b/makefile.shared
@@ -244,17 +244,17 @@ install: $(LIBNAME) $(USEFUL_DEMOS)
 	sed -e 's,^prefix=.*,prefix=$(DESTDIR),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(LIBPATH)/pkgconfig/libtomcrypt.pc
 	install -m 644 libtomcrypt.pc $(LIBPATH)/pkgconfig/libtomcrypt.pc
 
-install_test: testprof/$(LIBTEST)
+install_test: $(LIBTEST)
 	install -d $(LIBPATH)
 	install -d $(INCPATH)
 	install -m 644 testprof/tomcrypt_test.h $(INCPATH)
 	$(LT) --mode=install install -c $(LIBTEST) $(LIBPATH)/$(LIBTEST)
 
-test: library testprof/$(LIBTEST) $(TESTS)
-	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS)
+test: library $(LIBTEST) $(TESTS)
+	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TESTS) $(LIBTEST) $(LIBNAME) $(EXTRALIBS)
 
-timing: library testprof/$(LIBTEST) $(TIMINGS)
-	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TIMING) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS)
+timing: library $(LIBTEST) $(TIMINGS)
+	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TIMING) $(TIMINGS) $(LIBTEST) $(LIBNAME) $(EXTRALIBS)
 
 # build the demos from a template
 define DEMO_template