Skip to content

Commit

Permalink
fixes for building from source in BigSur (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
theo25 authored Oct 21, 2021
1 parent ad7fa5b commit 11e7aed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ OPENSSL_ROOT := $(shell brew --prefix openssl)
MACOS_CMAKE_OPTS := -DOPENSSL_ROOT_DIR=$(OPENSSL_ROOT) -DWITH_PROCPS=off
endif

libff_out := $(IELE_LIB)/libff/libff.a
libff_out := $(IELE_LIB)/libff/lib/libff.a

libff: $(libff_out)

Expand All @@ -104,15 +104,19 @@ $(protobuf_out): $(PROTO)/proto/msg.proto
ifndef SYSTEM_LIBSECP256K1

ifeq ($(UNAME_S),Darwin)
libsecp256k1_out := $(IELE_LIB)/libsecp256k1/libsecp256k1.a
libsecp256k1_out := $(IELE_LIB)/libsecp256k1/lib/libsecp256k1.a
libsecp256k1_rm := $(addprefix $(IELE_LIB)/libsecp256k1/lib/,libsecp256k1.0.dylib libsecp256k1.dylib libsecp256k1.la)
libsecp256k1_destdir := $(abspath $(BUILD_DIR))
SECP256K1_ROOT := $(abspath $(IELE_LIB)/libsecp256k1)
endif

secp256k1: $(libsecp256k1_out)

$(libsecp256k1_out): $(PLUGIN)/deps/secp256k1/Makefile
cd $(PLUGIN)/deps/secp256k1 \
&& make \
&& make install DESTDIR=../../../$(BUILD_DIR)
&& make install DESTDIR=$(libsecp256k1_destdir)
rm $(libsecp256k1_rm)

$(PLUGIN)/deps/secp256k1/Makefile: $(PLUGIN)/deps/secp256k1/autogen.sh
cd $(PLUGIN)/deps/secp256k1 \
Expand All @@ -125,14 +129,15 @@ ifndef SYSTEM_LIBCRYPTOPP

ifeq ($(UNAME_S),Darwin)
libcryptopp_out := $(IELE_LIB)/libcryptopp
CRYPTOPP_ROOT := $(abspath $(IELE_LIB)/libcryptopp)
endif

cryptopp: $(libcryptopp_out)

$(libcryptopp_out): $(PLUGIN)/deps/cryptopp/GNUmakefile
cd $(PLUGIN)/deps/cryptopp \
&& make libcryptopp.a \
&& make install PREFIX=$(INSTALL_LIB)/libcryptopp DEST_DIR=../../../$(BUILD_DIR)
&& make install PREFIX=$(INSTALL_LIB)/libcryptopp DESTDIR=../../../$(BUILD_DIR)

endif # ifndef SYSTEM_LIBCRYPTOPP

Expand Down Expand Up @@ -307,8 +312,8 @@ endif
LIB_PROCPS=-lprocps

ifeq ($(UNAME_S),Darwin)
MACOS_INCLUDE_OPTS := -I $(OPENSSL_ROOT)/include
MACOS_LINK_OPTS := -L $(OPENSSL_ROOT)/lib
MACOS_INCLUDE_OPTS := -I $(OPENSSL_ROOT)/include -I $(SECP256K1_ROOT)/include -I $(CRYPTOPP_ROOT)/include
MACOS_LINK_OPTS := -L $(OPENSSL_ROOT)/lib -L $(SECP256K1_ROOT)/lib -L $(CRYPTOPP_ROOT)/lib
LIB_PROCPS=
endif

Expand Down
2 changes: 1 addition & 1 deletion kiele
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ check_k_install() {
|| fatal "Must have K installed! See https://github.com/kframework/k/releases."
}

check_token() { [[ -v FIREFLY_TOKEN ]] || fatal "FIREFLY_TOKEN environment variable isn't set!" ; }
check_token() { [ -v FIREFLY_TOKEN ] || fatal "FIREFLY_TOKEN environment variable isn't set!" ; }

make_temp_trap() {
local tmpdesc tmpfile
Expand Down

0 comments on commit 11e7aed

Please sign in to comment.