Skip to content

Commit

Permalink
Merge pull request #14718 from github/criemen/go-ub
Browse files Browse the repository at this point in the history
Restructure go Makefile: Build the per-platform target.
  • Loading branch information
criemen authored Nov 8, 2023
2 parents 3586231 + 3f95dd6 commit 512c6a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ endif
qhelp-to-markdown:
scripts/qhelp-to-markdown.sh ql/src "$(QHELP_OUT_DIR)"

tools: $(addsuffix $(EXE),$(addprefix tools/bin/,$(BINARIES))) tools/tokenizer.jar
tools: tools-codeql tools/tokenizer.jar

.PHONY: $(addsuffix $(EXE),$(addprefix tools/bin/,$(BINARIES)))
$(addsuffix $(EXE),$(addprefix tools/bin/,$(BINARIES))):
Expand All @@ -67,7 +67,10 @@ tools-osx64: $(addprefix tools/osx64/,$(BINARIES))

.PHONY: $(addprefix tools/osx64/,$(BINARIES))
$(addprefix tools/osx64/,$(BINARIES)):
GOOS=darwin GOARCH=amd64 go build -C extractor -mod=vendor -o ../$@ ./cli/$(@F)
GOOS=darwin GOARCH=amd64 go build -C extractor -mod=vendor -o ../$@.amd64 ./cli/$(@F)
GOOS=darwin GOARCH=arm64 go build -C extractor -mod=vendor -o ../$@.arm64 ./cli/$(@F)
lipo -create $@.amd64 $@.arm64 -output $@
rm $@.amd64 $@.arm64

tools-win64: $(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES)))

Expand Down

0 comments on commit 512c6a5

Please sign in to comment.