You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.0 KiB

  1. CC = /usr/bin/gcc
  2. CFLAGS = -Wall -g -O3 -Wextra -Wpedantic
  3. LDLIBS = -lcrypto
  4. SOURCES = params.c hash.c fips202.c hash_address.c randombytes.c wots.c xmss.c xmss_core.c xmss_commons.c utils.c
  5. HEADERS = params.h hash.h fips202.h hash_address.h randombytes.h wots.h xmss.h xmss_core.h xmss_commons.h utils.h
  6. SOURCES_FAST = $(subst xmss_core.c,xmss_core_fast.c,$(SOURCES))
  7. HEADERS_FAST = $(subst xmss_core.c,xmss_core_fast.c,$(HEADERS))
  8. TESTS = test/wots \
  9. test/xmss_determinism \
  10. test/xmss \
  11. test/xmss_fast \
  12. test/xmssmt \
  13. test/xmssmt_fast \
  14. UI = ui/xmss_keypair \
  15. ui/xmss_sign \
  16. ui/xmss_open \
  17. ui/xmssmt_keypair \
  18. ui/xmssmt_sign \
  19. ui/xmssmt_open \
  20. ui/xmss_keypair_fast \
  21. ui/xmss_sign_fast \
  22. ui/xmss_open_fast \
  23. ui/xmssmt_keypair_fast \
  24. ui/xmssmt_sign_fast \
  25. ui/xmssmt_open_fast \
  26. all: tests ui
  27. tests: $(TESTS)
  28. ui: $(UI)
  29. test: $(TESTS:=.exec)
  30. .PHONY: clean test
  31. test/%.exec: test/%
  32. @$<
  33. test/xmss_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  34. $(CC) -DXMSS_SIGNATURES=1024 $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  35. test/xmss: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
  36. $(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  37. test/xmssmt_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  38. $(CC) -DXMSSMT -DXMSS_SIGNATURES=1024 $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  39. test/xmssmt: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
  40. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  41. test/%: test/%.c $(SOURCES) $(OBJS) $(HEADERS)
  42. $(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  43. ui/xmss_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  44. $(CC) $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  45. ui/xmssmt_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  46. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  47. ui/xmss_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
  48. $(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  49. ui/xmssmt_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
  50. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  51. clean:
  52. -$(RM) $(TESTS)
  53. -$(RM) $(UI)