diff --git a/apps/arweave/c_src/Makefile b/apps/arweave/c_src/Makefile index 2e74b096c..12296d948 100644 --- a/apps/arweave/c_src/Makefile +++ b/apps/arweave/c_src/Makefile @@ -57,13 +57,15 @@ else ifeq ($(UNAME_SYS), Linux) endif ifneq (, $(shell which pkg-config)) - CFLAGS += `pkg-config --cflags openssl` - CXXFLAGS += `pkg-config --cflags openssl` - LDFLAGS += `pkg-config --libs openssl` + CFLAGS += $(shell pkg-config --cflags openssl) + CXXFLAGS += $(shell pkg-config --cflags openssl) + LDFLAGS += $(shell pkg-config --libs openssl) endif C_SRC_DIR = $(CURDIR) +SECP256K1_CFLAGS = $(CFLAGS) +SECP256K1_LDLIBS = $(LDFLAGS) CFLAGS += -fPIC -I $(ERTS_INCLUDE_DIR) -I $(ERL_INTERFACE_INCLUDE_DIR) -I /usr/local/include -I ../lib/RandomX/src -I $(C_SRC_DIR) CXXFLAGS += -fPIC -I $(ERTS_INCLUDE_DIR) -I $(ERL_INTERFACE_INCLUDE_DIR) -I ../lib/RandomX/src -std=c++11 LDLIBS += -L $(ERL_INTERFACE_LIB_DIR) -L /usr/local/lib -lei -lssl -lcrypto @@ -118,8 +120,8 @@ $(VDF_OUTPUT): $(VDF_OBJECTS) SECP256K1_SOURCES = $(wildcard $(C_SRC_DIR)/*.c $(C_SRC_DIR)/secp256k1/*.c) SECP256K1_OBJECTS = $(addsuffix .o, $(basename $(SECP256K1_SOURCES))) -SECP256K1_CFLAGS = -fPIC -I $(ERTS_INCLUDE_DIR) -I $(ERL_INTERFACE_INCLUDE_DIR) -I /usr/local/include -I $(CURDIR)/../lib/secp256k1/src -I $(CURDIR)/../lib/secp256k1/include -I $(C_SRC_DIR) -SECP256K1_LDLIBS = -L $(ERL_INTERFACE_LIB_DIR) -L /usr/local/lib -lcrypto +SECP256K1_CFLAGS += -fPIC -I $(ERTS_INCLUDE_DIR) -I $(ERL_INTERFACE_INCLUDE_DIR) -I /usr/local/include -I $(CURDIR)/../lib/secp256k1/src -I $(CURDIR)/../lib/secp256k1/include -I $(C_SRC_DIR) +SECP256K1_LDLIBS += -L $(ERL_INTERFACE_LIB_DIR) -L /usr/local/lib SECP256K1_OUTPUT ?= $(CURDIR)/../priv/secp256k1_arweave.so $(SECP256K1_OUTPUT): $(SECP256K1_OBJECTS)