Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OTRv4
libgoldilocks
Commits
0f54460e
Unverified
Commit
0f54460e
authored
Mar 23, 2018
by
Ola Bini
Browse files
Finish up some final pieces for the restructuring and renaming
parent
b56a367d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile.am
View file @
0f54460e
...
...
@@ -3,7 +3,7 @@ include $(top_srcdir)/variables.am
SUBDIRS
=
src
test
pkgconfig
ACLOCAL_AMFLAGS
=
-I
m4
.PHONY
:
gen_code
gen_code_static
test_ct todo lib sage sagetest all clean
.PHONY
:
gen_code test_ct todo lib sage sage
-
test all clean
test bench microbench
ci
:
test mem-check
...
...
@@ -13,9 +13,6 @@ all-lib:
gen-code
:
$(MAKE)
gen_code
-f
$(top_srcdir)
/Makefile.custom
gen-code-static
:
$(MAKE)
gen_code_static
-f
$(top_srcdir)
/Makefile.custom
test-ct
:
$(MAKE)
test_ct
-f
$(top_srcdir)
/Makefile.custom
...
...
@@ -34,14 +31,14 @@ lib:
clean-scan
:
$(MAKE)
clean
-f
$(top_srcdir)
/Makefile.custom
test
:
check
$(
top_srcdir)
/test/test
test
:
$(
MAKE)
test
-f
$(top_srcdir)
/Makefile.custom
bench
:
check
$(
top_srcdir)
/test/test_bench
bench
:
$(
MAKE)
bench
-f
$(top_srcdir)
/Makefile.custom
microbench
:
check
$(
top_srcdir)
/test/test_bench
--micro
microbench
:
$(
MAKE)
microbench
-f
$(top_srcdir)
/Makefile.custom
# NB: you must compile with XCFLAGS=-DNDEBUG or you will get lots of extra warnings due to assert(stuff).
mem-check
:
check
...
...
Makefile.custom
View file @
0f54460e
...
...
@@ -34,7 +34,7 @@ PYTHON ?= python
WARNFLAGS
=
-pedantic
-Wall
-Wextra
-Werror
-Wunreachable-code
\
-Wmissing-declarations
-Wunused-function
-Wno-overlength-strings
$(EXWARN)
INCFLAGS
=
-Isrc
-Isrc
/include
-I
$(BUILD_INC)
INCFLAGS
=
-Isrc
-Isrc
/include
-I
$(BUILD_INC)
-Isrc
/include/arch_x86_64
-Isrc
/arch_x86_64
PUB_INCFLAGS
=
-I
$(BUILD_INC)
LANGFLAGS
=
-std
=
c99
-fno-strict-aliasing
LANGXXFLAGS
=
-fno-strict-aliasing
...
...
@@ -69,15 +69,13 @@ SAGE ?= sage
SAGES
=
$(
shell
ls test
/
*
.sage
)
BUILDPYS
=
$
(
SAGES:test/%.sage
=
$(BUILD_PY)
/%.py
)
.PHONY
:
clean all test test_ct bench todo doc lib bat sage sagetest gen_code
gen_code_static
.PHONY
:
clean all test test_ct bench todo doc lib bat sage sagetest gen_code
.PRECIOUS
:
$(BUILD_C)/%.c $(BUILD_IBIN)/%
HEADERS
=
Makefile.custom
$(
shell
find src
test
-name
"*.h"
)
$(BUILD_OBJ)
/timestamp
# components needed by the lib
LIBCOMPONENTS
=
$(BUILD_OBJ)
/utils.o
$(BUILD_OBJ)
/shake.o
$(BUILD_OBJ)
/spongerng.o
# and per-field components
GENCOMPONENTS
=
$(BUILD_OBJ)
/f_impl.o
$(BUILD_OBJ)
/f_arithmetic.o
$(BUILD_OBJ)
/f_generic.o
LIBCOMPONENTS
=
$(BUILD_OBJ)
/utils.o
$(BUILD_OBJ)
/shake.o
$(BUILD_OBJ)
/spongerng.o
$(GENCOMPONENTS)
$(BUILD_OBJ)
/goldilocks.o
$(BUILD_OBJ)
/elligator.o
$(BUILD_OBJ)
/scalar.o
$(BUILD_OBJ)
/eddsa.o
$(BUILD_OBJ)
/decaf_tables.o
BENCHCOMPONENTS
=
$(BUILD_OBJ)
/bench.o
$(BUILD_OBJ)
/shake.o
all
:
lib $(BUILD_IBIN)/test $(BUILD_BIN)/ristretto $(BUILD_IBIN)/bench $(BUILD_BIN)/shakesum
...
...
@@ -125,24 +123,11 @@ $(BUILD_OBJ)/timestamp:
$(PER_OBJ_DIRS)
$(BUILD_C)
/goldilocks
touch
$@
COMPONENTS_OF
=
$(BUILD_OBJ)
/f_impl.o
$(BUILD_OBJ)
/f_arithmetic.o
$(BUILD_OBJ)
/f_generic.o
LIBCOMPONENTS
+=
$COMPONENTS_OF
$(BUILD_OBJ)/%.o
:
src/%.c $(HEADERS)
$(CC)
$(CFLAGS)
-I
src/arch_x86_64
-I
src/include/arch_x86_64
\
-c
-o
$@
$<
LIBCOMPONENTS
+=
$(BUILD_OBJ)
/goldilocks.o
$(BUILD_OBJ)
/elligator.o
$(BUILD_OBJ)
/scalar.o
\
$(BUILD_OBJ)
/eddsa.o
$(BUILD_OBJ)
/decaf_tables.o
GLOBAL_HEADERS_OF
=
$(BUILD_INC)
/goldilocks/point_448.h
$(BUILD_INC)
/goldilocks/point_448.hxx
\
$(BUILD_INC)
/goldilocks/ed448.h
$(BUILD_INC)
/goldilocks/ed448.hxx
HEADERS
+=
$(GLOBAL_HEADERS_OF)
GEN_CODE
=
$(BUILD_C)
/decaf_tables.c
$(BUILD_IBIN)/goldilocks_gen_tables
:
$(BUILD_OBJ)/goldilocks_gen_tables.o
\
$(BUILD_OBJ)/goldilocks.o $(BUILD_OBJ)/scalar.o $(BUILD_OBJ)/utils.o
\
$(COMPONENTS
_OF
)
$(
GEN
COMPONENTS)
$(LD)
$(LDFLAGS)
-o
$@
$^
$(BUILD_C)/decaf_tables.c
:
$(BUILD_IBIN)/goldilocks_gen_tables
...
...
@@ -181,6 +166,12 @@ else
strip
--discard-all
$@
endif
# $(BUILD_OBJ)/%.o: src/%.c $(HEADERS)
# $(CC) $(CFLAGS) -I src/arch_x86_64 -I src/include/arch_x86_64 \
# -c -o $@ $<
$(BUILD_OBJ)/%.o
:
src/arch_x86_64/%.c $(HEADERS)
$(CC)
$(CFLAGS)
-c
-o
$@
$<
$(BUILD_OBJ)/%.o
:
src/%.c $(HEADERS)
$(CC)
$(CFLAGS)
-c
-o
$@
$<
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment