2015-08-11 11:08:27 +01:00
|
|
|
CC = /usr/bin/gcc
|
2017-10-19 15:50:24 +01:00
|
|
|
CFLAGS = -Wall -g -O3 -Wextra -Wpedantic
|
2017-10-23 12:03:07 +01:00
|
|
|
LDLIBS = -lcrypto
|
2015-08-11 11:08:27 +01:00
|
|
|
|
2017-10-17 16:11:18 +01:00
|
|
|
SOURCES = params.c hash.c fips202.c hash_address.c randombytes.c wots.c xmss.c xmss_core.c xmss_commons.c
|
|
|
|
HEADERS = params.h hash.h fips202.h hash_address.h randombytes.h wots.h xmss.h xmss_core.h xmss_commons.h
|
2015-08-11 11:08:27 +01:00
|
|
|
|
2017-10-31 15:53:44 +00:00
|
|
|
SOURCES_FAST = $(subst xmss_core.c,xmss_core_fast.c,$(SOURCES))
|
|
|
|
HEADERS_FAST = $(subst xmss_core.c,xmss_core_fast.c,$(HEADERS))
|
2017-06-02 13:10:24 +01:00
|
|
|
|
2017-10-26 14:50:33 +01:00
|
|
|
TESTS = test/wots \
|
|
|
|
test/xmss_determinism \
|
|
|
|
test/xmss \
|
2017-10-31 15:53:44 +00:00
|
|
|
test/xmss_fast \
|
2017-10-26 14:50:33 +01:00
|
|
|
test/xmssmt \
|
2017-10-31 15:53:44 +00:00
|
|
|
test/xmssmt_fast \
|
2017-06-02 13:10:24 +01:00
|
|
|
|
2017-10-26 12:47:29 +01:00
|
|
|
UI = ui/xmss_keypair \
|
|
|
|
ui/xmss_sign \
|
|
|
|
ui/xmss_open \
|
|
|
|
ui/xmssmt_keypair \
|
|
|
|
ui/xmssmt_sign \
|
|
|
|
ui/xmssmt_open \
|
2017-10-31 15:53:44 +00:00
|
|
|
ui/xmss_keypair_fast \
|
|
|
|
ui/xmss_sign_fast \
|
|
|
|
ui/xmss_open_fast \
|
|
|
|
ui/xmssmt_keypair_fast \
|
|
|
|
ui/xmssmt_sign_fast \
|
|
|
|
ui/xmssmt_open_fast \
|
2017-10-26 14:50:33 +01:00
|
|
|
|
|
|
|
all: tests ui
|
|
|
|
|
|
|
|
tests: $(TESTS)
|
|
|
|
ui: $(UI)
|
|
|
|
|
|
|
|
test: $(TESTS:=.exec)
|
|
|
|
|
|
|
|
.PHONY: clean test
|
|
|
|
|
|
|
|
test/%.exec: test/%
|
|
|
|
@$<
|
|
|
|
|
|
|
|
test/xmss_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
|
2017-10-31 16:08:00 +00:00
|
|
|
$(CC) -DXMSS_SIGNATURES=1024 $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
|
2017-10-26 14:50:33 +01:00
|
|
|
|
|
|
|
test/xmss: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
|
|
|
|
|
|
|
test/xmssmt_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
|
2017-10-31 16:08:00 +00:00
|
|
|
$(CC) -DXMSSMT -DXMSS_SIGNATURES=1024 $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
|
2017-10-26 14:50:33 +01:00
|
|
|
|
|
|
|
test/xmssmt: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
|
|
$(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
2015-08-21 14:06:07 +01:00
|
|
|
|
2017-10-17 16:11:18 +01:00
|
|
|
test/%: test/%.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
2017-08-01 14:31:42 +01:00
|
|
|
|
2017-10-26 14:50:33 +01:00
|
|
|
ui/xmss_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
|
|
|
|
|
|
|
|
ui/xmssmt_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
|
|
|
|
$(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
|
2017-08-01 14:31:42 +01:00
|
|
|
|
2017-10-26 12:47:29 +01:00
|
|
|
ui/xmss_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
|
|
|
|
|
|
|
ui/xmssmt_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
|
|
$(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
|
|
|
|
2015-08-04 13:37:25 +01:00
|
|
|
clean:
|
2017-10-17 16:11:18 +01:00
|
|
|
-$(RM) $(TESTS)
|
|
|
|
-$(RM) $(UI)
|