diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-02 05:22:36 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-02 05:22:36 +0000 |
| commit | fd627b134c686e7c9afb646dc37c573c5d36fd4a (patch) | |
| tree | 4ebf97a159074dfb478056b4deee40ea575bf6a5 /src | |
| parent | e4f898c4a6b9900553c64b9804889b5fdae3e55f (diff) | |
build: stop rm -rf'ing a RandomX tree the build did not create
deps-randomx built into $(HOME)/RandomX and deleted that path whenever
the library was missing, taking out hand-managed checkouts the build
never owned. Default the build to the in-tree $(ROOT)/randomx-build,
like secp256k1-build, overridable via RANDOMX_DIR and exported so
src/Makefile's own fallback resolves to the same tree. As a backstop,
the recipe writes a .bitflash-built marker after a successful build and
refuses to delete any directory that lacks it, so a user-supplied
RANDOMX_DIR pointing at a pre-existing tree is never removed.
Closes #27
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile index 1bc3ae8..2c6d304 100644 --- a/src/Makefile +++ b/src/Makefile | |||
| @@ -6,7 +6,9 @@ FUZZ_CXX ?= clang++ | |||
| 6 | 6 | ||
| 7 | SECP_INC ?= /usr/local/include | 7 | SECP_INC ?= /usr/local/include |
| 8 | SECP_LIB ?= /usr/local/lib | 8 | SECP_LIB ?= /usr/local/lib |
| 9 | RANDOMX_DIR ?= $(HOME)/RandomX | 9 | # The root Makefile exports RANDOMX_DIR (default: <repo>/randomx-build, built |
| 10 | # by deps-randomx). This fallback only applies when src/ is built standalone. | ||
| 11 | RANDOMX_DIR ?= $(abspath $(CURDIR)/..)/randomx-build | ||
| 10 | 12 | ||
| 11 | IMGUI_DIR = imgui | 13 | IMGUI_DIR = imgui |
| 12 | 14 | ||