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.

74 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/oid \
  10. test/xmss_determinism \
  11. test/xmss \
  12. test/xmss_fast \
  13. test/xmssmt \
  14. test/xmssmt_fast \
  15. UI = ui/xmss_keypair \
  16. ui/xmss_sign \
  17. ui/xmss_open \
  18. ui/xmssmt_keypair \
  19. ui/xmssmt_sign \
  20. ui/xmssmt_open \
  21. ui/xmss_keypair_fast \
  22. ui/xmss_sign_fast \
  23. ui/xmss_open_fast \
  24. ui/xmssmt_keypair_fast \
  25. ui/xmssmt_sign_fast \
  26. ui/xmssmt_open_fast \
  27. all: tests ui
  28. tests: $(TESTS)
  29. ui: $(UI)
  30. test: $(TESTS:=.exec)
  31. .PHONY: clean test
  32. test/%.exec: test/%
  33. @$<
  34. test/xmss_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  35. $(CC) -DXMSS_SIGNATURES=1024 $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  36. test/xmss: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
  37. $(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  38. test/xmssmt_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  39. $(CC) -DXMSSMT -DXMSS_SIGNATURES=1024 $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  40. test/xmssmt: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
  41. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  42. test/%: test/%.c $(SOURCES) $(OBJS) $(HEADERS)
  43. $(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  44. ui/xmss_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  45. $(CC) $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  46. ui/xmssmt_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  47. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  48. ui/xmss_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
  49. $(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  50. ui/xmssmt_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
  51. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  52. clean:
  53. -$(RM) $(TESTS)
  54. -$(RM) $(UI)