-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (32 loc) · 1.01 KB
/
Makefile
File metadata and controls
37 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
M = $(shell printf "\033[34;1m▶\033[0m")
SHELL := /bin/bash
GIT_BRANCH ?= $(shell git branch --show-current)
GIT_COMMIT_SHA = $(shell git rev-parse HEAD)
OWNER ?= uniget-org
PROJECT ?= uniget
REGISTRY ?= ghcr.io
REPOSITORY_PREFIX ?= $(OWNER)/$(PROJECT)/
HELPER = helper
BIN = $(HELPER)/usr/local/bin
export PATH := $(BIN):$(PATH)
SUPPORTED_ARCH := x86_64 aarch64
SUPPORTED_ALT_ARCH := amd64 arm64
ARCH ?= $(shell uname -m)
ifeq ($(ARCH),x86_64)
ALT_ARCH := amd64
endif
ifeq ($(ARCH),aarch64)
ALT_ARCH := arm64
endif
ifndef ALT_ARCH
$(error ERROR: Unable to determine alternative name for architecture ($(ARCH)))
endif
check_defined = \
$(strip $(foreach 1,$1, \
$(call __check_defined,$1,$(strip $(value 2)))))
__check_defined = \
$(if $(value $1),, \
$(error Undefined $1$(if $2, ($2))))
include make/go.mk
include make/release.mk
include make/git.mk