Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ LDFLAGS := -X $(VERSION_PKG).Version=$(VERSION) \
-X $(VERSION_PKG).GitCommit=$(GIT_COMMIT) \
-X $(VERSION_PKG).BuildDate=$(BUILD_DATE)

# Build tags (auto-detect optional C dependencies)
BUILDTAGS ?= \
$(shell hack/btrfs_installed_tag.sh)

# Directories
VM_DIR := containerfiles/cluster-image

Expand All @@ -29,7 +33,7 @@ all: build-bink
# Build the bink CLI binary
build-bink:
@echo "=== Building bink CLI binary ==="
go build -ldflags "$(LDFLAGS)" -o $(BINK_BINARY) ./cmd/bink
go build -tags "$(BUILDTAGS)" -ldflags "$(LDFLAGS)" -o $(BINK_BINARY) ./cmd/bink
@echo "✅ bink binary built: $(BINK_BINARY)"


Expand Down
7 changes: 7 additions & 0 deletions hack/btrfs_installed_tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
${CPP:-${CC:-cc} -E} ${CPPFLAGS} - > /dev/null 2> /dev/null << EOF
#include <btrfs/ioctl.h>
EOF
if test $? -ne 0; then
echo exclude_graphdriver_btrfs
fi
Loading