X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=Makefile;h=561f84e7382fd80ddd161b3c9f7d2937466536de;hb=eb09a2a6f447833e3cf73a71fc0113f84d51f41b;hp=5a9090ca5dad511115b7313ee006989f87ec9a12;hpb=4f50c75ee5a6cc88bf7ea71957ed509e298e6c25;p=avr-crypto-lib.git diff --git a/Makefile b/Makefile index 5a9090c..561f84e 100644 --- a/Makefile +++ b/Makefile @@ -149,6 +149,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)