-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
linxianqin
committed
Apr 13, 2023
1 parent
04a1d72
commit d0d62f8
Showing
2 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
BINARY := openai-wechat | ||
LDFLAGS := -ldflags "-w -s" | ||
ENV := | ||
|
||
build: | ||
[ -n "${ENV}" ] && export ${ENV}; \ | ||
go build -o ${BINARY} ${LDFLAGS} ./; \ | ||
|
||
linux-env: | ||
$(eval ENV := CGO_ENABLED=0 GOOS=linux GOARCH=amd64) | ||
linux: linux-env build | ||
|
||
|
||
windows-env: | ||
$(eval ENV := CGO_ENABLED=0 GOOS=windows GOARCH=arm64) | ||
|
||
windows : windows-env build | ||
|
||
clean: | ||
rm -f "${BINARY}" | ||
|
||
.PHONY: clean |
This file contains 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