Commit 7944f20 1 parent 2189cf4 commit 7944f20 Copy full SHA for 7944f20
File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ BUILD_DIR := build
24
24
25
25
include tests/test.mk
26
26
include benchmarks/bench.mk
27
+ include examples/example.mk
27
28
28
29
$(SHA3_INC_DIR ) :
29
30
git submodule update --init sha3
Original file line number Diff line number Diff line change
1
+ EXAMPLE_BUILD_DIR := $(BUILD_DIR ) /example
2
+
3
+ EXAMPLE_DIR := examples
4
+ EXAMPLE_SOURCES := $(wildcard $(EXAMPLE_DIR ) /* .cpp)
5
+ EXAMPLE_HEADERS := $(wildcard $(EXAMPLE_DIR ) /* .hpp)
6
+ EXAMPLE_EXECS := $(addprefix $(EXAMPLE_BUILD_DIR ) /, $(notdir $(EXAMPLE_SOURCES:.cpp=.exe ) ) )
7
+
8
+ $(EXAMPLE_BUILD_DIR ) :
9
+ mkdir -p $@
10
+
11
+ $(EXAMPLE_BUILD_DIR ) /% .exe : $(EXAMPLE_DIR ) /% .cpp $(EXAMPLE_BUILD_DIR ) $(SHA3_INC_DIR )
12
+ $(CXX ) $(CXX_DEFS ) $(CXX_FLAGS ) $(WARN_FLAGS ) $(RELEASE_FLAGS ) $(I_FLAGS ) $(DEP_IFLAGS ) $< -o $@
13
+
14
+ example : $(EXAMPLE_EXECS ) # # Build and run example program, demonstrating usage of ML-DSA API
15
+ $(foreach exec,$^ ,./$(exec ) ;)
You can’t perform that action at this time.
0 commit comments