tools/Makefile
Dean Troyer 62bd0253f0 Add build tools
This includes Docker containers to perform the StarlingX build
and a set of scripts to maintain a local mirror of binary CentOS
and other packages required to populate the final ISO file.

Change-Id: I8140fd8fa2d00e7aa98c895a8e4962ab3748669d
2018-06-08 17:01:43 -05:00

61 lines
1.4 KiB
Makefile

# TC Build container
# Set defaults that may be overridden in the buidrc
MY_TC_RELEASE := tis-r5-pike
UID := $(shell id -u)
USER := $(shell id -un)
MYUNAME := builder
BASE_CONTAINER := centos73
BASE_CONTAINER_TAG := local/dev-centos:7.3
BASE_DOCKERFILE := Dockerfile.centos73
TC_CONTAINER_NAME := $(USER)-centos-builder
TC_CONTAINER_TAG := local/$(USER)-stx-builder:7.3
TC_DOCKERFILE := Dockerfile.centos73.TC-builder
# Import the build config
NULL := $(shell bash -c "source buildrc; set | sed -E '/^[[:alnum:]_]+/s/=/:=/' | sed 's/^//' > .makeenv")
include .makeenv
# Base CentOS container
base-build:
docker build \
--ulimit core=0 \
-t $(BASE_CONTAINER_TAG) \
-f $(BASE_DOCKERFILE) \
.
base-clean:
docker image rm $(BASE_CONTAINER_TAG)
# TC builder container
build:
docker build \
--build-arg MYUID=$(UID) \
--build-arg MYUNAME=$(MYUNAME) \
--ulimit core=0 \
-t $(TC_CONTAINER_TAG) \
-f $(TC_DOCKERFILE) \
.
clean:
docker rm $(TC_CONTAINER_NAME) || true
docker image rm $(TC_CONTAINER_TAG)
env:
@echo "TC_DOCKERFILE=$(TC_DOCKERFILE)"
@echo "TC_CONTAINER_NAME=$(TC_CONTAINER_NAME)"
@echo "TC_CONTAINER_TAG=$(TC_CONTAINER_TAG)"
@echo "SOURCE_REMOTE_NAME=$(SOURCE_REMOTE_NAME)"
@echo "SOURCE_REMOTE_URI=$(SOURCE_REMOTE_URI)"
@echo "HOST_MIRROR_DIR=$(HOST_MIRROR_DIR)"
@echo "MY_TC_RELEASE=$(MY_TC_RELEASE)"
@echo "LOCALDISK=${LOCALDISK}"
@echo "GUEST_LOCALDISK=${GUEST_LOCALDISK}"
.PHONY: base-build base-clean build clean env