You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
419 B
Makefile

3 years ago
plat ?= darwin
plats = linux darwin windows
arch ?= amd64
archs = amd64 arm arm64
all: server wechat
define build_app
@echo 'building $(1) ...'
@GOOS=$(2) GOARCH=$(3) go build -o builder/$(1) ./cmd/$(1)
@echo 'build $(1) done'
endef
server:
$(call build_app,server,$(plat),$(arch))
.PHONY: server
wechat:
$(call build_app,wechat,$(plat),$(arch))
.PHONY: wechat
clean:
@rm -f builder/*