Skip to content

Commit 512c6a5

Browse files
authored
Merge pull request github#14718 from github/criemen/go-ub
Restructure go Makefile: Build the per-platform target.
2 parents 3586231 + 3f95dd6 commit 512c6a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

go/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ endif
4747
qhelp-to-markdown:
4848
scripts/qhelp-to-markdown.sh ql/src "$(QHELP_OUT_DIR)"
4949

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

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

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

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

0 commit comments

Comments
 (0)