Skip to content

Commit

Permalink
fix(Makefile): error out if rln-keystore-generator not compiled with …
Browse files Browse the repository at this point in the history
…rln flag (#1960)

* fix(Makefile): error out if rln-keystore-generator not compiled with rln flag

* fix(Makefile): make rln default to true for target
  • Loading branch information
rymnc committed Aug 29, 2023
1 parent bd3be21 commit ac25855
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ endif

### RLN

LIBRLN_BUILDDIR := $(CURDIR)/vendor/zerokit
LIBRLN_BUILDDIR := $(CURDIR)/vendor/zerokit/target/release

ifeq ($(OS),Windows_NT)
LIBRLN_FILE := rln.lib
Expand All @@ -135,11 +135,14 @@ $(LIBRLN_BUILDDIR)/$(LIBRLN_FILE):
echo -e $(BUILD_MSG) "$@" && \
./scripts/build_rln.sh $(LIBRLN_BUILDDIR)

librln-experimental:
EXPERIMENTAL_PARAMS += -d:rln --passL:$(LIBRLN_FILE) --passL:-lm
librln: $(LIBRLN_BUILDDIR)/$(LIBRLN_FILE)

ifneq ($(RLN), true)
librln: ; # noop
else
EXPERIMENTAL_PARAMS += -d:rln --passL:$(LIBRLN_FILE) --passL:-lm
librln: $(LIBRLN_BUILDDIR)/$(LIBRLN_FILE)
librln: | librln-experimental
endif

clean-librln:
Expand Down Expand Up @@ -184,9 +187,9 @@ chat2: | build deps librln
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim chat2 $(NIM_PARAMS) $(EXPERIMENTAL_PARAMS) waku.nims

rln-keystore-generator: | build deps librln
rln-keystore-generator: | build deps librln-experimental
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim rln_keystore_generator $(NIM_PARAMS) $(EXPERIMENTAL_PARAMS) waku.nims
$(ENV_SCRIPT) nim rln_keystore_generator $(NIM_PARAMS) $(EXPERIMENTAL_PARAMS) waku.nims

chat2bridge: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
Expand Down

0 comments on commit ac25855

Please sign in to comment.