mirror of
https://github.com/logos-storage/logos-storage-go-bindings.git
synced 2026-01-02 13:33:10 +00:00
Remove LDFLAGS from code in order to pass them in command line
This commit is contained in:
parent
7258754442
commit
3afdc93a50
6
Makefile
6
Makefile
@ -5,7 +5,7 @@ NIM_CODEX_LIB_DIR := $(abspath $(NIM_CODEX_DIR)/library)
|
||||
NIM_CODEX_BUILD_DIR := $(abspath $(NIM_CODEX_DIR)/build)
|
||||
|
||||
CGO_CFLAGS := -I$(NIM_CODEX_LIB_DIR)
|
||||
CGO_LDFLAGS := -L$(NIM_CODEX_BUILD_DIR) -Wl,-rpath,$(NIM_CODEX_BUILD_DIR)
|
||||
CGO_LDFLAGS := -L$(NIM_CODEX_BUILD_DIR) -lcodex -Wl,-rpath,$(NIM_CODEX_BUILD_DIR)
|
||||
|
||||
.PHONY: all clean update libcodex build test
|
||||
|
||||
@ -25,11 +25,11 @@ libcodex:
|
||||
|
||||
build:
|
||||
@echo "Building Codex Go Bindings..."
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o codex-go ./codex
|
||||
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o codex-go main.go
|
||||
|
||||
test:
|
||||
@echo "Running tests..."
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test ./...
|
||||
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test ./...
|
||||
|
||||
clean:
|
||||
@echo "Cleaning up..."
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
package codex
|
||||
|
||||
/*
|
||||
#cgo LDFLAGS: -L../vendor/nim-codex/build/ -lcodex
|
||||
#cgo LDFLAGS: -L../vendor/nim-codex/ -Wl,-rpath,../vendor/nim-codex/build
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include "libcodex.h"
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
package codex
|
||||
|
||||
/*
|
||||
#cgo LDFLAGS: -L../vendor/nim-codex/build/ -lcodex
|
||||
#cgo LDFLAGS: -L../vendor/nim-codex/ -Wl,-rpath,../vendor/nim-codex/
|
||||
|
||||
#include "bridge.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user