Skip to content

Commit 703180f

Browse files
committed
Debug
1 parent 3633146 commit 703180f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@ all: run
2828

2929
fetch:
3030
@echo "Fetching libcodex from GitHub Actions: ${LATEST_URL}"
31-
@curl -fSL --create-dirs -o $(LIBS_DIR)/codex-${OS}-${ARCH}.zip ${LATEST_URL}
31+
curl -fSL --create-dirs -o $(LIBS_DIR)/codex-${OS}-${ARCH}.zip ${LATEST_URL}
3232
unzip -o -qq $(LIBS_DIR)/codex-${OS}-${ARCH}.zip -d $(LIBS_DIR)
3333
rm -f $(LIBS_DIR)/*.zip
34+
# Update the path to the shared library on macOS
3435
ifeq ($(UNAME_S),Darwin)
3536
install_name_tool -id @rpath/libcodex.dylib $(LIBS_DIR)/libcodex.dylib
3637
endif
38+
3739
build:
38-
@echo "CGO_CFLAGS=$(CGO_CFLAGS)"
39-
@echo "CGO_LDFLAGS=$(CGO_LDFLAGS)"
40-
ls -l $(LIBS_DIR)
41-
go env CGO_LDFLAGS
4240
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o $(BIN_NAME) main.go
41+
4342
run:
4443
ifeq ($(OS),Windows_NT)
4544
pwsh -Command "Copy-Item libs\libcodex.dll ."
4645
pwsh -Command ".\$(BIN_NAME)"
4746
else ifeq ($(UNAME_S),Darwin)
48-
# DYLD_LIBRARY_PATH=$(LIBS_DIR) ./$(BIN_NAME)
47+
# Instead of relying on install_name_tool, we can define DYLD_LIBRARY_PATH
48+
# DYLD_LIBRARY_PATH=$(LIBS_DIR) ./$(BIN_NAME)
4949
./$(BIN_NAME)
5050
else
5151
./$(BIN_NAME)

0 commit comments

Comments
 (0)