Skip to content

Commit

Permalink
Update dist/Makefile.tmpl
Browse files Browse the repository at this point in the history
  • Loading branch information
mamonet committed May 25, 2024
1 parent d024ebd commit 30b5b96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions code/gf128/AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Proofs are written by Mamone Tarsha Kurdi (Cryspen).

This code was primarily written by Karthikeyan Bhargavan (INRIA).
7 changes: 1 addition & 6 deletions code/gf128/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,22 @@ HACL_HOME=$(realpath ../..)
# CUSTOMIZE HERE: determine what is the main target of this Makefile, e.g. a C
# test, a Low* test, or just a binary archive (like libcurve.a).
all: \
dist/gf128-precomp-test.exe \
dist/gf128-ni-test.exe

test: all
dist/gf128-ni-test.exe
dist/gf128-precomp-test.exe

# Defines rules for producing .checked, .krml, .depend, etc.
include ../../Makefile.local

CFLAGS += -I$(HACL_HOME)/lib/c -mavx -mavx2 -mpclmul
CFLAGS += -I$(HACL_HOME)/lib/c -msse4.1 -mpclmul
export CFLAGS

# CUSTOMIZE HERE: how to produce binary objects
# An archive with all the compiled code in this directory.
dist/libgf128.a: dist/Makefile.basic
$(MAKE) -C dist -f Makefile.basic

GF128_PRECOMP_BUNDLE=-bundle Hacl.Gf128.PreComp=Hacl.Impl.Gf128.FieldPreComp
GF128_NI_BUNDLE=-bundle Hacl.Gf128.NI=Hacl.Impl.Gf128.FieldNI

# Note: POLY_BUNDLE is found in Makefile.common -- shared definition.
Expand All @@ -33,8 +30,6 @@ dist/Makefile.basic: $(filter-out %/prims.krml,$(ALL_KRML_FILES))
-add-include '<stdbool.h>' \
-skip-compilation

dist/gf128-precomp-test.exe: $(HACL_HOME)/tests/gf128-precomp-test.o dist/libgf128.a

dist/gf128-ni-test.exe: $(HACL_HOME)/tests/gf128-ni-test.o dist/libgf128.a

%.exe:
Expand Down
3 changes: 3 additions & 0 deletions dist/Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ include Makefile.basic

CFLAGS += -Wno-parentheses -Wno-deprecated-declarations -Wno-\#warnings -Wno-error=cpp -Wno-cpp -g -std=gnu11 -O3

CFLAGS_GHASH_NI = -mpclmul -msse4.1
Hacl_Gf128_NI.o Hacl_Impl_Gf128_FieldNI.o: CFLAGS += $(CFLAGS_GHASH_NI)

Hacl_MAC_Poly1305_Simd128.o Hacl_Chacha20_Vec128.o Hacl_AEAD_Chacha20Poly1305_Simd128.o Hacl_Hash_Blake2s_Simd128.o Hacl_HMAC_Blake2s_128.o Hacl_HKDF_Blake2s_128.o Hacl_SHA2_Vec128.o: CFLAGS += $(CFLAGS_128)
Hacl_MAC_Poly1305_Simd256.o Hacl_Chacha20_Vec256.o Hacl_AEAD_Chacha20Poly1305_Simd256.o Hacl_Hash_Blake2b_Simd256.o Hacl_HMAC_Blake2b_256.o Hacl_HKDF_Blake2b_256.o Hacl_SHA2_Vec256.o Hacl_Hash_SHA3_Simd256.o: CFLAGS += $(CFLAGS_256)

Expand Down

0 comments on commit 30b5b96

Please sign in to comment.