Skip to content

Commit fbecccb

Browse files
fix: makefile build_operator on macos (#1254)
1 parent 590f105 commit fbecccb

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ ifeq ($(OS),Darwin)
1717
endif
1818

1919
ifeq ($(OS),Linux)
20-
export LD_LIBRARY_PATH := $(CURDIR)/operator/risc_zero/lib
20+
export LD_LIBRARY_PATH += $(CURDIR)/operator/risc_zero/lib
21+
endif
22+
23+
ifeq ($(OS),Linux)
24+
BUILD_OPERATOR = $(MAKE) build_operator_linux
25+
endif
26+
27+
ifeq ($(OS),Darwin)
28+
BUILD_OPERATOR = $(MAKE) build_operator_macos
2129
endif
2230

2331

@@ -120,6 +128,14 @@ operator_full_registration: operator_get_eth operator_register_with_eigen_layer
120128
operator_register_and_start: operator_full_registration operator_start
121129

122130
build_operator: deps
131+
$(BUILD_OPERATOR)
132+
133+
build_operator_macos:
134+
@echo "Building Operator..."
135+
@go build -ldflags "-X main.Version=$(OPERATOR_VERSION)" -o ./operator/build/aligned-operator ./operator/cmd/main.go
136+
@echo "Operator built into /operator/build/aligned-operator"
137+
138+
build_operator_linux:
123139
@echo "Building Operator..."
124140
@go build -ldflags "-X main.Version=$(OPERATOR_VERSION) -r $(LD_LIBRARY_PATH)" -o ./operator/build/aligned-operator ./operator/cmd/main.go
125141
@echo "Operator built into /operator/build/aligned-operator"

0 commit comments

Comments
 (0)