2017-05-20 08:11:06 +03:00
|
|
|
SHELL:=/bin/bash
|
|
|
|
ENGINE_DIR:=$(CURDIR)/../engine
|
|
|
|
CLI_DIR:=$(CURDIR)/../cli
|
2017-12-08 01:25:41 +03:00
|
|
|
VERSION?=0.0.0-dev
|
2017-05-20 08:11:06 +03:00
|
|
|
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
|
|
|
|
|
2017-11-14 22:13:47 +03:00
|
|
|
rpm: DOCKER_BUILD_PKGS:=fedora-27 fedora-26 fedora-25 centos-7
|
2017-05-20 08:11:06 +03:00
|
|
|
rpm: ## build rpm packages
|
|
|
|
for p in $(DOCKER_BUILD_PKGS); do \
|
2017-07-25 01:52:49 +03:00
|
|
|
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) $${p}; \
|
2017-05-20 08:11:06 +03:00
|
|
|
done
|
|
|
|
|
2017-09-15 18:35:51 +03:00
|
|
|
deb: DOCKER_BUILD_PKGS:=ubuntu-zesty ubuntu-xenial ubuntu-trusty debian-buster debian-stretch debian-wheezy debian-jessie raspbian-stretch raspbian-jessie
|
2017-05-20 08:11:06 +03:00
|
|
|
deb: ## build deb packages
|
|
|
|
for p in $(DOCKER_BUILD_PKGS); do \
|
2017-07-25 01:52:49 +03:00
|
|
|
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) $${p}; \
|
2017-05-20 08:11:06 +03:00
|
|
|
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 \
|
2017-07-25 01:52:49 +03:00
|
|
|
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) $${p}; \
|
2017-05-20 08:11:06 +03:00
|
|
|
done
|