Add Makefile for universal binary builds#80
Open
manavponnekanti wants to merge 2 commits intodrgrib:masterfrom
Open
Add Makefile for universal binary builds#80manavponnekanti wants to merge 2 commits intodrgrib:masterfrom
manavponnekanti wants to merge 2 commits intodrgrib:masterfrom
Conversation
Adds a Makefile that builds universal macOS binaries using lipo, enabling the workflow to run natively on both Intel and Apple Silicon Macs without requiring Rosetta translation. Targets: - `make` or `make all`: builds all universal binaries - `make workflow`: builds binaries and packages .alfredworkflow - `make clean`: removes build artifacts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Commit the 7 compiled universal binaries so the workflow can be packaged and distributed without requiring users to have Go installed. Remove binaries from .gitignore so they are tracked in the repo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makefilefor rebuilding universal binaries and packaging the.alfredworkflowWhat changed
search,csearch,create,setcursor,wiki-link,link,tocmake(build all),make workflow(build + package),make clean.gitignoreupdated: removed binary exclusions (now tracked), added*.alfredworkflow(build artifact)How the binaries are built
Each executable is compiled twice via Go cross-compilation with CGO enabled (needed for
go-sqlite3), then merged into a universal binary withlipo:CGO_ENABLED=1 GOARCH=arm64 go build -o name-arm64 ./cmd/name/ CGO_ENABLED=1 GOARCH=amd64 CC="clang -arch x86_64" go build -o name-amd64 ./cmd/name/ lipo -create -output name name-arm64 name-amd64Tested on
Mach-O universal binary with 2 architectures: [x86_64] [arm64]bs,bn,bcscommands working correctlyTo release
After merging, package and upload to GitHub Releases:
make workflow # produces alfred-bear.alfredworkflow🤖 Generated with Claude Code