X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=97c56d5ae98b73c32b00c0ed79ad12928da5c314;hb=267cb0a0d12700ecfdc3f9ab005b61e48691f6a2;hp=5a9090ca5dad511115b7313ee006989f87ec9a12;hpb=4f50c75ee5a6cc88bf7ea71957ed509e298e6c25;p=avr-crypto-lib.git diff --git a/Makefile b/Makefile index 5a9090c..97c56d5 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ HASHES := MACS := PRNGS := ENCODINGS := +SIGNATURE := +PK_CIPHERS := AUX := # we use the gnu make standard library @@ -20,7 +22,7 @@ include mkfiles/*.mk #------------------------------------------------------------------------------- ALGORITHMS = $(BLOCK_CIPHERS) $(STREAM_CIPHERS) $(HASHES) $(PRNGS) $(MACS) \ - $(ENCODINGS) $(AUX) + $(ENCODINGS) $(SIGNATURE) $(PK_CIPHERS) $(AUX) ALGORITHMS_OBJ = $(patsubst %,%_OBJ, $(ALGORITHMS)) ALGORITHMS_TEST_BIN = $(patsubst %,%_TEST_BIN, $(ALGORITHMS)) @@ -149,6 +151,36 @@ $(foreach algo, $(ALGORITHMS), $(eval $(call Flash_Template, \ #------------------------------------------------------------------------------- +define Speed_Template +$(1)_SPEED: $(1)_FLASH + @$(RUBY) $(SPEEDTOOL) -c $(SPEEDCMD) -t $(SPEEDLOG_DIR) -a $(call lc, $(1)) +endef + +$(foreach algo, $(ALGORITHMS), $(eval $(call Speed_Template, \ + $(algo), $(algo) \ +))) + +.PHONY: hash_speed +hash_speed: $(foreach algo, $(HASHES), $(algo)_SPEED) + +#------------------------------------------------------------------------------- + + +define Size_Template +$(1)_SIZE: $(2) + @echo "[size] $(1)" + $(SIZE) $(2) > $(strip $(SIZE_DIR))$(strip $(call lc, $(1))).size +endef + +$(foreach algo, $(ALGORITHMS), $(eval $(call Size_Template, \ + $(strip $(algo)), $($(algo)_BINOBJ) \ +))) + +.PHONY: hash_size +hash_size: $(foreach algo, $(HASHES), $(algo)_SIZE) + +#------------------------------------------------------------------------------- + .PHONY: tests tests: $(foreach a, $(ALGORITHMS), $(a)_TEST_BIN) @@ -220,8 +252,14 @@ info: @echo " $(MACS)" @echo " PRNG functions:" @echo " $(PRNGS)" + @echo " signature functions:" + @echo " $(SIGNATURE)" + @echo " public key ciphers:" + @echo " $(PK_CIPHERS)" @echo " encodings:" @echo " $(ENCODINGS)" + @echo " auxiliary functions:" + @echo " $(AUX)" @echo " targets:" @echo " all - all algorithm cores" @echo " cores - all algorithm cores" @@ -234,6 +272,8 @@ info: @echo " macs - all MAC cores" @echo " prngs - all PRNG cores" @echo " all_testrun - testrun all algorithms" + @echo " hash_size - measure size of all hash functions" + @echo " hash_speed - measure performance of all hash functions" @echo " docu - build doxygen documentation" @echo " clean - remove a lot of builded files" @echo " depclean - also remove dependency files"