2015-08-05 19:46:22 +00:00
|
|
|
|
|
|
|
DOCKER_BINARY_URL := https://github.com/rancher/docker/releases/download/v1.7.1-ros-1/docker-1.7.1
|
|
|
|
|
|
|
|
include common.make
|
|
|
|
|
|
|
|
|
|
|
|
bin/rancheros: bin
|
|
|
|
godep go build -tags netgo -ldflags "-X github.com/rancherio/os/config.VERSION $(VERSION) -linkmode external -extldflags -static" -o $@
|
|
|
|
strip --strip-all $@
|
|
|
|
|
|
|
|
|
|
|
|
pwd := $(shell pwd)
|
|
|
|
include scripts/build-common
|
|
|
|
CD := $(BUILD)/cd
|
|
|
|
|
|
|
|
assets bin $(DIST)/artifacts $(CD)/boot/isolinux:
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
|
|
|
|
DOCKER_BINARY := $(shell basename $(DOCKER_BINARY_URL))
|
|
|
|
|
|
|
|
assets/$(DOCKER_BINARY): assets
|
|
|
|
cd assets && curl -OL "$(DOCKER_BINARY_URL)"
|
|
|
|
|
|
|
|
assets/docker: assets/$(DOCKER_BINARY)
|
|
|
|
mv assets/$(DOCKER_BINARY) $@
|
|
|
|
chmod +x $@
|
|
|
|
|
|
|
|
copy-images:
|
|
|
|
./scripts/copy-images
|
|
|
|
|
|
|
|
$(DIST)/artifacts/vmlinuz: $(DIST)/artifacts copy-images
|
|
|
|
mv $(BUILD)/kernel/vmlinuz $@
|
|
|
|
|
|
|
|
|
|
|
|
INITRD_DIR := $(BUILD)/initrd
|
|
|
|
|
|
|
|
$(INITRD_DIR)/images.tar: bin/rancheros
|
2015-08-05 20:58:32 +00:00
|
|
|
FORCE_PULL=$(FORCE_PULL) INITRD_DIR=$(INITRD_DIR) ./scripts/mk-images-tar.sh
|
2015-08-05 19:46:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
$(DIST)/artifacts/initrd: $(DIST)/artifacts bin/rancheros assets/docker copy-images $(INITRD_DIR)/images.tar
|
2015-08-05 20:58:32 +00:00
|
|
|
INITRD_DIR=$(INITRD_DIR) ./scripts/mk-initrd.sh
|
2015-08-05 19:46:22 +00:00
|
|
|
|
|
|
|
$(DIST)/artifacts/rancheros.iso: $(DIST)/artifacts/initrd $(CD)/boot/isolinux
|
2015-08-05 20:58:32 +00:00
|
|
|
CD=$(CD) ./scripts/mk-rancheros-iso.sh
|
2015-08-05 19:46:22 +00:00
|
|
|
|
|
|
|
$(DIST)/artifacts/iso-checksums.txt: $(DIST)/artifacts/rancheros.iso
|
2015-08-05 20:58:32 +00:00
|
|
|
./scripts/mk-iso-checksums-txt.sh
|
2015-08-05 19:46:22 +00:00
|
|
|
|
|
|
|
version:
|
|
|
|
@echo $(VERSION)
|
|
|
|
|
|
|
|
build-all: \
|
|
|
|
bin/rancheros \
|
|
|
|
$(DIST)/artifacts/initrd \
|
|
|
|
$(DIST)/artifacts/vmlinuz \
|
|
|
|
$(DIST)/artifacts/rancheros.iso \
|
|
|
|
$(DIST)/artifacts/iso-checksums.txt
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: build-all version copy-images
|