add make target to build geranos

This commit is contained in:
Benjamin Elder 2023-05-16 13:07:58 -07:00
parent 26b6e8af13
commit d1a05a362e
1 changed files with 10 additions and 4 deletions

View File

@ -45,10 +45,13 @@ SHELL:=env PATH=$(subst $(SPACE),\$(SPACE),$(PATH)) $(SHELL)
# ============================== OPTIONS ======================================= # ============================== OPTIONS =======================================
# the output binary name, overridden when cross compiling # the output binary name, overridden when cross compiling
ARCHEIO_BINARY_NAME?=archeio ARCHEIO_BINARY_NAME?=archeio
GERANOS_BINARY_NAME?=geranos
# build flags for the archeio binary # build flags for the archeio binary
# - reproducible builds: -trimpath # - reproducible builds: -trimpath
# - smaller binaries: -w (trim debugger data, but not panics) # - smaller binaries: -w (trim debugger data, but not panics)
ARCHEIO_BUILD_FLAGS?=-trimpath -ldflags="-w" GO_BUILD_FLAGS?=-trimpath -ldflags="-w"
ARCHEIO_BUILD_FLAGS?=$(GO_BUILD_FLAGS)
GERANOS_BUILD_FLAGS?=$(GO_BUILD_FLAGS)
################################################################################ ################################################################################
# ================================= Building =================================== # ================================= Building ===================================
# standard "make" target -> builds # standard "make" target -> builds
@ -56,8 +59,11 @@ all: build
# builds archeio, outputs to $(OUT_DIR) # builds archeio, outputs to $(OUT_DIR)
archeio: archeio:
go build -v -o "$(OUT_DIR)/$(ARCHEIO_BINARY_NAME)" $(ARCHEIO_BUILD_FLAGS) ./cmd/archeio go build -v -o "$(OUT_DIR)/$(ARCHEIO_BINARY_NAME)" $(ARCHEIO_BUILD_FLAGS) ./cmd/archeio
# alias for building archeio # builds geranos, outputs to $(OUT_DIR)
build: archeio geranos:
go build -v -o "$(OUT_DIR)/$(GERANOS_BINARY_NAME)" $(GERANOS_BUILD_FLAGS) ./cmd/geranos
# alias for building binaries
build: archeio geranos
# build images to local tarball # build images to local tarball
images: images:
hack/make-rules/images.sh hack/make-rules/images.sh
@ -119,4 +125,4 @@ lint:
shellcheck: shellcheck:
hack/make-rules/shellcheck.sh hack/make-rules/shellcheck.sh
################################################################################# #################################################################################
.PHONY: all archeio build unit integration test e2e-test clean update gofmt verify verify-generated lint shellcheck .PHONY: all archeio geranos build unit integration test e2e-test clean update gofmt verify verify-generated lint shellcheck