Browse Source

minor improvements

Steffen Jaeckel 8 years ago
parent
commit
ee0874b50b
3 changed files with 9 additions and 10 deletions
  1. 3 6
      makefile
  2. 1 1
      makefile.include
  3. 5 3
      makefile.shared

+ 3 - 6
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_misc.h src/headers/tomcrypt_pk.h src/headers/tomcrypt_pkcs.h \
 src/headers/tomcrypt_prng.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.
 #The default rule for make builds the libtomcrypt library.
 default:library
 default:library
 
 
@@ -253,13 +250,13 @@ ifneq ($V,1)
 endif
 endif
 	${silent} $(RANLIB) $@
 	${silent} $(RANLIB) $@
 
 
-timing: library $(LIBTEST) $(TIMINGS)
+timing: $(LIBNAME) $(LIBTEST) $(TIMINGS)
 ifneq ($V,1)
 ifneq ($V,1)
 	@echo "   * ${CC} $@"
 	@echo "   * ${CC} $@"
 endif
 endif
 	${silent} $(CC) $(LDFLAGS) $(TIMINGS) $(LIBTEST) $(LIB_PRE) $(LIBNAME) $(LIB_POST) $(EXTRALIBS) -o $(TIMING)
 	${silent} $(CC) $(LDFLAGS) $(TIMINGS) $(LIBTEST) $(LIB_PRE) $(LIBNAME) $(LIB_POST) $(EXTRALIBS) -o $(TIMING)
 
 
-test: library $(LIBTEST) $(TESTS)
+test: $(LIBNAME) $(LIBTEST) $(TESTS)
 ifneq ($V,1)
 ifneq ($V,1)
 	@echo "   * ${CC} $@"
 	@echo "   * ${CC} $@"
 endif
 endif
@@ -267,7 +264,7 @@ endif
 
 
 # build the demos from a template
 # build the demos from a template
 define DEMO_template
 define DEMO_template
-$(1): demos/$(1).o library
+$(1): demos/$(1).o $$(LIBNAME)
 ifneq ($V,1)
 ifneq ($V,1)
 	@echo "   * $${CC} $$@"
 	@echo "   * $${CC} $$@"
 endif
 endif

+ 1 - 1
makefile.include

@@ -89,7 +89,7 @@ DSOURCES = $(wildcard demos/*.c)
 DOBJECTS = $(DSOURCES:.c=.o)
 DOBJECTS = $(DSOURCES:.c=.o)
 
 
 #List of testprof headers
 #List of testprof headers
-THEADERS != ls testprof/*.h
+THEADERS = $(wildcard testprof/*.h)
 
 
 TIMING=timing
 TIMING=timing
 TEST=test
 TEST=test

+ 5 - 3
makefile.shared

@@ -203,7 +203,7 @@ src/headers/tomcrypt_prng.h
 #END_INS
 #END_INS
 
 
 #The default rule for make builds the libtomcrypt library.
 #The default rule for make builds the libtomcrypt library.
-default: library
+default: $(LIBNAME)
 
 
 #ciphers come in two flavours... enc+dec and enc
 #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
 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)
 	install -m 644 testprof/tomcrypt_test.h $(INCPATH)
 	$(LT) --mode=install install -c $(LIBTEST) $(LIBPATH)/$(LIBTEST)
 	$(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)
 	$(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)
 	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(TIMING) $(TIMINGS) $(LIBTEST) $(LIBNAME) $(EXTRALIBS)
 
 
 # build the demos from a template
 # build the demos from a template
@@ -274,6 +274,8 @@ endef
 
 
 $(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
 $(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
 
 
+bins: $(USEFUL_DEMOS)
+
 all_test: test tv_gen $(DEMOS)
 all_test: test tv_gen $(DEMOS)
 
 
 # $Source$
 # $Source$