mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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>
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
[submodule "hashx"]
|
||||
path = hashx
|
||||
url = https://github.com/tevador/hashx
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd ./src/ext/equix
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
@@ -1,9 +0,0 @@
|
||||
bin/
|
||||
obj/
|
||||
*.user
|
||||
*.suo
|
||||
.vs
|
||||
x64/
|
||||
Release/
|
||||
Debug/
|
||||
build/
|
||||
+54
-6
@@ -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@
|
||||
|
||||
Reference in New Issue
Block a user