diff --git a/makefile b/makefile
index 283e0ce..599633f 100644
--- a/makefile
+++ b/makefile
@@ -197,9 +197,6 @@ src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h src/headers/tomcrypt_ma
 src/headers/tomcrypt_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
 src/headers/tomcrypt_prng.h
 
-#Compressed filenames
-COMPRESSED=crypt-$(VERSION).tar.bz2 crypt-$(VERSION).zip
-
 #The default rule for make builds the libtomcrypt library.
 default:library
 
@@ -253,13 +250,13 @@ ifneq ($V,1)
 endif
 	${silent} $(RANLIB) $@
 
-timing: library $(LIBTEST) $(TIMINGS)
+timing: $(LIBNAME) $(LIBTEST) $(TIMINGS)
 ifneq ($V,1)
 	@echo "   * ${CC} $@"
 endif
 	${silent} $(CC) $(LDFLAGS) $(TIMINGS) $(LIBTEST) $(LIB_PRE) $(LIBNAME) $(LIB_POST) $(EXTRALIBS) -o $(TIMING)
 
-test: library $(LIBTEST) $(TESTS)
+test: $(LIBNAME) $(LIBTEST) $(TESTS)
 ifneq ($V,1)
 	@echo "   * ${CC} $@"
 endif
@@ -267,7 +264,7 @@ endif
 
 # build the demos from a template
 define DEMO_template
-$(1): demos/$(1).o library
+$(1): demos/$(1).o $$(LIBNAME)
 ifneq ($V,1)
 	@echo "   * $${CC} $$@"
 endif
diff --git a/makefile.include b/makefile.include
index 6af569f..7fe26a7 100644
--- a/makefile.include
+++ b/makefile.include
@@ -89,7 +89,7 @@ DSOURCES = $(wildcard demos/*.c)
 DOBJECTS = $(DSOURCES:.c=.o)
 
 #List of testprof headers
-THEADERS != ls testprof/*.h
+THEADERS = $(wildcard testprof/*.h)
 
 TIMING=timing
 TEST=test
diff --git a/makefile.shared b/makefile.shared
index d890b1b..637927d 100644
--- a/makefile.shared
+++ b/makefile.shared
@@ -203,7 +203,7 @@ src/headers/tomcrypt_prng.h
 #END_INS
 
 #The default rule for make builds the libtomcrypt library.
-default: library
+default: $(LIBNAME)
 
 #ciphers come in two flavours... enc+dec and enc
 src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
@@ -257,10 +257,10 @@ install_test: $(LIBTEST)
 	install -m 644 testprof/tomcrypt_test.h $(INCPATH)
 	$(LT) --mode=install install -c $(LIBTEST) $(LIBPATH)/$(LIBTEST)
 
-test: library $(LIBTEST) $(TESTS)
+test: $(LIBNAME) $(LIBTEST) $(TESTS)
 	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TEST) $(TESTS) $(LIBTEST) $(LIBNAME) $(EXTRALIBS)
 
-timing: library $(LIBTEST) $(TIMINGS)
+timing: $(LIBNAME) $(LIBTEST) $(TIMINGS)
 	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TIMING) $(TIMINGS) $(LIBTEST) $(LIBNAME) $(EXTRALIBS)
 
 # build the demos from a template
@@ -274,6 +274,8 @@ endef
 
 $(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
 
+bins: $(USEFUL_DEMOS)
+
 all_test: test tv_gen $(DEMOS)
 
 # $Source$