File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1212 CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,$(LIBS_DIR)
1313endif
1414
15+ ifeq ($(OS ) ,windows)
16+ BIN_NAME := example.exe
17+ else
18+ BIN_NAME := example
19+ endif
20+
1521# Configuration for fetching the right binary
1622OS ?= "linux"
1723ARCH ?= "amd64"
1824VERSION ?= "v0.0.16"
1925LATEST_URL := "https://github.com/codex-storage/codex-go-bindings/releases/latest/download/codex-${OS}-${ARCH}.zip"
2026VERSIONED_URL := "https://github.com/codex-storage/codex-go-bindings/releases/download/$(VERSION ) /codex-${OS}-${ARCH}.zip"
2127
22- # Just for the example
23- BIN =example
24-
2528all : run
2629
2730fetch :
3437 CGO_ENABLED=1 CGO_CFLAGS=" $( CGO_CFLAGS) " CGO_LDFLAGS=" $( CGO_LDFLAGS) " go build -o $(BIN ) main.go
3538
3639run :
37- ./example
40+ ./$( BIN_NAME )
3841
3942clean :
40- rm -f $(BIN )
43+ rm -f $(BIN_NAME )
4144 rm -Rf $(LIBS_DIR ) /*
You can’t perform that action at this time.
0 commit comments