# Build all by default, even if it's not first
.DEFAULT_GOAL := all

.PHONY: all
all: tidy gen build 

ROOT_PACKAGE=github.com/pincap-inc/pinsights

include script/make-rules/common.mk
include script/make-rules/golang.mk
include script/make-rules/gen.mk

## gen: Generate all necessary files, such as error code files.
.PHONY: gen
gen:
	@$(MAKE) gen.run

.PHONY: build
build:
	@$(MAKE) go.build.p7s-apiserver
	@$(MAKE) go.build.p7s-larkbot

.PHONY: tidy
tidy:
	@$(GO) mod tidy
