mirror of
https://github.com/genuinetools/reg.git
synced 2024-08-21 06:10:23 -04:00
34 lines
1.2 KiB
Makefile
34 lines
1.2 KiB
Makefile
![]() |
SHELL:=/bin/bash
|
||
|
ENGINE_DIR:=$(CURDIR)/../engine
|
||
|
CLI_DIR:=$(CURDIR)/../cli
|
||
|
VERSION?=0.0.0-dev
|
||
|
DOCKER_GITCOMMIT:=abcdefg
|
||
|
|
||
|
.PHONY: help clean rpm deb static
|
||
|
|
||
|
help: ## show make targets
|
||
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
||
|
|
||
|
clean: ## remove build artifacts
|
||
|
$(MAKE) -C rpm clean
|
||
|
$(MAKE) -C deb clean
|
||
|
$(MAKE) -C static clean
|
||
|
|
||
|
rpm: DOCKER_BUILD_PKGS:=fedora-27 fedora-26 fedora-25 centos-7
|
||
|
rpm: ## build rpm packages
|
||
|
for p in $(DOCKER_BUILD_PKGS); do \
|
||
|
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) $${p}; \
|
||
|
done
|
||
|
|
||
|
deb: DOCKER_BUILD_PKGS:=ubuntu-zesty ubuntu-xenial ubuntu-trusty debian-buster debian-stretch debian-wheezy debian-jessie raspbian-stretch raspbian-jessie
|
||
|
deb: ## build deb packages
|
||
|
for p in $(DOCKER_BUILD_PKGS); do \
|
||
|
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) $${p}; \
|
||
|
done
|
||
|
|
||
|
static: DOCKER_BUILD_PKGS:=static-linux cross-mac cross-win cross-arm
|
||
|
static: ## build static-compiled packages
|
||
|
for p in $(DOCKER_BUILD_PKGS); do \
|
||
|
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) $${p}; \
|
||
|
done
|