25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
2.6 KiB

  1. CC = /usr/bin/gcc
  2. CFLAGS = -Wall -g -O3 -Wextra
  3. all: test/test_wots \
  4. test/test_xmss_XMSS_SHA2-256_W16_H10 \
  5. test/test_xmss_fast_XMSS_SHA2-256_W16_H10 \
  6. test/test_xmssmt_fast_XMSSMT_SHA2-256_W16_H20_D4 \
  7. test/test_xmssmt_XMSSMT_SHA2-256_W16_H20_D4
  8. .PHONY: clean
  9. .PRECIOUS: params_%.h
  10. params_%.h: params.h.py
  11. python3 params.h.py $(patsubst params_%.h,%,$@) > $@
  12. test/test_wots: params_XMSS_SHA2-256_W16_H10.h hash.c fips202.c hash_address.c randombytes.c wots.c xmss_commons.c test/test_wots.c hash.h fips202.h hash_address.h randombytes.h wots.h xmss_commons.h
  13. ln -sf params_XMSS_SHA2-256_W16_H10.h params.h
  14. $(CC) $(CFLAGS) hash.c fips202.c hash_address.c randombytes.c wots.c xmss_commons.c test/test_wots.c -o $@ -lcrypto -lm
  15. test/test_xmss_XMSS_%: params_XMSS_%.h hash.c fips202.c hash_address.c randombytes.c wots.c xmss.c xmss_commons.c test/test_xmss.c hash.h fips202.h hash_address.h randombytes.h wots.h xmss.h xmss_commons.h
  16. ln -sf params_XMSS_$(patsubst test/test_xmss_XMSS_%,%,$@).h params.h
  17. $(CC) $(CFLAGS) hash.c fips202.c hash_address.c randombytes.c wots.c xmss.c xmss_commons.c test/test_xmss.c -o $@ -lcrypto -lm
  18. test/test_xmss_fast_XMSS_%: params_XMSS_%.h hash.c fips202.c hash_address.c randombytes.c wots.c xmss_fast.c xmss_commons.c test/test_xmss_fast.c hash.h fips202.h hash_address.h randombytes.h wots.h xmss_fast.h xmss_commons.h
  19. ln -sf params_XMSS_$(patsubst test/test_xmss_fast_XMSS_%,%,$@).h params.h
  20. $(CC) $(CFLAGS) hash.c fips202.c hash_address.c randombytes.c wots.c xmss_fast.c xmss_commons.c test/test_xmss_fast.c -o $@ -lcrypto -lm
  21. test/test_xmssmt_XMSSMT_%: params_XMSSMT_%.h hash.c fips202.c hash_address.c randombytes.c wots.c xmss.c xmss_commons.c test/test_xmssmt.c hash.h fips202.h hash_address.h randombytes.h wots.h xmss.h xmss_commons.h
  22. ln -sf params_XMSSMT_$(patsubst test/test_xmssmt_XMSSMT_%,%,$@).h params.h
  23. $(CC) $(CFLAGS) hash.c fips202.c hash_address.c randombytes.c wots.c xmss.c xmss_commons.c test/test_xmssmt.c -o $@ -lcrypto -lm
  24. test/test_xmssmt_fast_XMSSMT_%: params_XMSSMT_%.h hash.c fips202.c hash_address.c randombytes.c wots.c xmss_fast.c xmss_commons.c test/test_xmssmt_fast.c hash.h fips202.h hash_address.h randombytes.h wots.h xmss_fast.h xmss_commons.h
  25. ln -sf params_XMSSMT_$(patsubst test/test_xmssmt_fast_XMSSMT_%,%,$@).h params.h
  26. $(CC) $(CFLAGS) hash.c fips202.c hash_address.c randombytes.c wots.c xmss_fast.c xmss_commons.c test/test_xmssmt_fast.c -o $@ -lcrypto -lm
  27. clean:
  28. -rm *.o *.s
  29. -rm test/test_wots
  30. -rm test/test_xmss_XMSS*
  31. -rm test/test_xmss_fast_XMSS*
  32. -rm test/test_xmssmt_XMSS*
  33. -rm test/test_xmssmt_fast_XMSS*
  34. distclean:
  35. -rm params.h
  36. -rm params_XMSS*.h