1# 2# This file and its contents are supplied under the terms of the 3# Common Development and Distribution License ("CDDL"), version 1.0. 4# You may only use this file in accordance with the terms of version 5# 1.0 of the CDDL. 6# 7# A full copy of the text of the CDDL should have accompanied this 8# source. A copy of the CDDL is also available via the Internet at 9# http://www.illumos.org/license/CDDL. 10# 11 12# 13# Copyright 2021 Toomas Soome <tsoome@me.com> 14# 15 16COMDIR = $(SRC)/common/crypto 17 18SRCS += $(CRYPTOSRC)/digest.c 19SRCS += $(COMDIR)/sha1/sha1.c 20SRCS += $(COMDIR)/edonr/edonr.c 21SRCS += $(COMDIR)/skein/skein.c 22SRCS += $(COMDIR)/skein/skein_iv.c 23SRCS += $(COMDIR)/skein/skein_block.c 24OBJECTS += digest.o 25OBJECTS += sha1.o 26OBJECTS += edonr.o 27OBJECTS += skein.o 28OBJECTS += skein_iv.o 29OBJECTS += skein_block.o 30 31objs/digest.o pics/digest.o := CPPFLAGS += -I../../common 32 33# Do not unroll skein loops, reduce code size 34objs/skein_block.o pics/skein_block.o := CPPFLAGS += -DSKEIN_LOOP=111 35 36objs/%.o pics/%.o: $(COMDIR)/edonr/%.c 37 $(COMPILE.c) -o $@ $< 38 39objs/%.o pics/%.o: $(COMDIR)/skein/%.c 40 $(COMPILE.c) -o $@ $< 41 42objs/%.o pics/%.o: $(CRYPTOSRC)/%.c 43 $(COMPILE.c) -o $@ $< 44 45objs/%.o pics/%.o: $(COMDIR)/sha1/%.c 46 $(COMPILE.c) -o $@ $< 47 48sha1-x86_64.s: $(COMDIR)/sha1/amd64/sha1-x86_64.pl 49 $(PERL) $? $@ 50 51pics/sha1-x86_64.o: sha1-x86_64.s 52 $(COMPILE.s) -o $@ ${@F:.o=.s} 53