aboutsummaryrefslogtreecommitdiff
path: root/src/ext/include.am
diff options
context:
space:
mode:
authorMicah Elizabeth Scott <beth@torproject.org>2023-03-09 19:33:41 -0800
committerMicah Elizabeth Scott <beth@torproject.org>2023-05-10 07:38:28 -0700
commit246ced3a8ce7bbfb60f14dec7e138670afdab647 (patch)
treeac279e83bc72db9fe47d53def6dda498f4843123 /src/ext/include.am
parentbfa2102c955e0dc81af0821760c45d787eac8e1e (diff)
downloadtor-246ced3a8ce7bbfb60f14dec7e138670afdab647.tar.gz
tor-246ced3a8ce7bbfb60f14dec7e138670afdab647.zip
ext: build equix and hashx using automake
This replaces the sketchy cmake invocation we had inside configure The libs are always built and always used in unit tests, but only included in libtor and tor when --enable-gpl is set. Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
Diffstat (limited to 'src/ext/include.am')
-rw-r--r--src/ext/include.am60
1 files changed, 54 insertions, 6 deletions
diff --git a/src/ext/include.am b/src/ext/include.am
index dea8e4419b..dad6a592b7 100644
--- a/src/ext/include.am
+++ b/src/ext/include.am
@@ -1,14 +1,8 @@
AM_CPPFLAGS += \
-I$(srcdir)/src/ext/ \
- -I$(srcdir)/src/ext/equix/include/ \
-I$(srcdir)/src/ext/equix/hashx/include/
-# TODO: put this with other equix/hashx ext defs when those happen,
-# and also add it to the autoconf config header. For now this is here
-# just for test_crypto's benefit.
-AM_CPPFLAGS += -DHASHX_SIZE=8
-
EXTRA_DIST += src/ext/ext.md
EXTHEADERS = \
@@ -152,6 +146,60 @@ noinst_HEADERS += $(ED25519_DONNA_HDRS)
LIBED25519_DONNA=src/ext/ed25519/donna/libed25519_donna.a
noinst_LIBRARIES += $(LIBED25519_DONNA)
+src_ext_equix_libhashx_a_CPPFLAGS = \
+ -I$(srcdir)/src/ext/equix/hashx/include/ \
+ -I$(srcdir)/src/ext/equix/hashx/src/ \
+ -DHASHX_SIZE=@HASHX_SIZE@ \
+ -DEQUIX_STATIC=1 -DHASHX_STATIC=1
+
+src_ext_equix_libhashx_a_SOURCES = \
+ src/ext/equix/hashx/src/blake2.c \
+ src/ext/equix/hashx/src/compiler.c \
+ src/ext/equix/hashx/src/compiler_a64.c \
+ src/ext/equix/hashx/src/compiler_x86.c \
+ src/ext/equix/hashx/src/context.c \
+ src/ext/equix/hashx/src/hashx.c \
+ src/ext/equix/hashx/src/program.c \
+ src/ext/equix/hashx/src/program_exec.c \
+ src/ext/equix/hashx/src/siphash.c \
+ src/ext/equix/hashx/src/siphash_rng.c \
+ src/ext/equix/hashx/src/virtual_memory.c
+
+src_ext_equix_libequix_a_CPPFLAGS = \
+ -I$(srcdir)/src/ext/equix/include/ \
+ -I$(srcdir)/src/ext/equix/src/ \
+ $(src_ext_equix_libhashx_a_CPPFLAGS)
+
+src_ext_equix_libequix_a_SOURCES = \
+ src/ext/equix/src/context.c \
+ src/ext/equix/src/equix.c \
+ src/ext/equix/src/solver.c
+
+EQUIX_HDRS = \
+ src/ext/equix/hashx/include/hashx.h \
+ src/ext/equix/hashx/src/blake2.h \
+ src/ext/equix/hashx/src/compiler.h \
+ src/ext/equix/hashx/src/context.h \
+ src/ext/equix/hashx/src/force_inline.h \
+ src/ext/equix/hashx/src/hashx_endian.h \
+ src/ext/equix/hashx/src/instruction.h \
+ src/ext/equix/hashx/src/program.h \
+ src/ext/equix/hashx/src/siphash_rng.h \
+ src/ext/equix/hashx/src/siphash.h \
+ src/ext/equix/hashx/src/unreachable.h \
+ src/ext/equix/hashx/src/virtual_memory.h \
+ src/ext/equix/include/equix.h \
+ src/ext/equix/src/context.h \
+ src/ext/equix/src/solver_heap.h \
+ src/ext/equix/src/solver.h
+
+EQUIX_LIBS = \
+ src/ext/equix/libhashx.a \
+ src/ext/equix/libequix.a
+
+noinst_HEADERS += $(EQUIX_HDRS)
+noinst_LIBRARIES += $(EQUIX_LIBS)
+
if BUILD_KECCAK_TINY
src_ext_keccak_tiny_libkeccak_tiny_a_CFLAGS=\
@CFLAGS_CONSTTIME@