2015-08-05 19:46:22 +00:00
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
DOCKER_BINARY_URL := https://github.com/rancher/docker/releases/download/v1.8.0-rc2-ros/docker-1.8.0-rc2
|
2015-08-05 19:46:22 +00:00
|
|
|
|
|
|
|
include common.make
|
|
|
|
|
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
bin/rancheros:
|
|
|
|
mkdir -p bin
|
|
|
|
godep go build -tags netgo -installsuffix netgo -ldflags "-X github.com/rancherio/os/config.VERSION $(VERSION) -linkmode external -extldflags -static" -o $@
|
2015-08-05 19:46:22 +00:00
|
|
|
strip --strip-all $@
|
|
|
|
|
|
|
|
|
|
|
|
pwd := $(shell pwd)
|
|
|
|
include scripts/build-common
|
|
|
|
CD := $(BUILD)/cd
|
|
|
|
|
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
assets/docker:
|
|
|
|
mkdir -p assets
|
|
|
|
curl -L "$(DOCKER_BINARY_URL)" > $@
|
2015-08-05 19:46:22 +00:00
|
|
|
chmod +x $@
|
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
|
2015-08-05 19:46:22 +00:00
|
|
|
copy-images:
|
|
|
|
./scripts/copy-images
|
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
|
|
|
|
$(DIST)/artifacts/vmlinuz: copy-images
|
|
|
|
mkdir -p $(DIST)/artifacts
|
2015-08-05 19:46:22 +00:00
|
|
|
mv $(BUILD)/kernel/vmlinuz $@
|
|
|
|
|
|
|
|
|
|
|
|
INITRD_DIR := $(BUILD)/initrd
|
|
|
|
|
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
$(BUILD)/images.tar: bin/rancheros os-config.yml
|
|
|
|
FORCE_PULL=$(FORCE_PULL) BUILD=$(BUILD) ./scripts/mk-images-tar.sh
|
2015-08-05 19:46:22 +00:00
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
|
|
|
|
$(DIST)/artifacts/initrd: bin/rancheros assets/docker copy-images $(BUILD)/images.tar
|
|
|
|
mkdir -p $(DIST)/artifacts
|
2015-08-05 20:58:32 +00:00
|
|
|
INITRD_DIR=$(INITRD_DIR) ./scripts/mk-initrd.sh
|
2015-08-05 19:46:22 +00:00
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
|
|
|
|
$(DIST)/artifacts/rancheros.iso: $(DIST)/artifacts/initrd
|
2015-08-05 20:58:32 +00:00
|
|
|
CD=$(CD) ./scripts/mk-rancheros-iso.sh
|
2015-08-05 19:46:22 +00:00
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
|
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
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
|
2015-08-05 19:46:22 +00:00
|
|
|
version:
|
|
|
|
@echo $(VERSION)
|
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
|
2015-08-05 19:46:22 +00:00
|
|
|
build-all: \
|
|
|
|
bin/rancheros \
|
|
|
|
$(DIST)/artifacts/initrd \
|
|
|
|
$(DIST)/artifacts/vmlinuz \
|
|
|
|
$(DIST)/artifacts/rancheros.iso \
|
|
|
|
$(DIST)/artifacts/iso-checksums.txt
|
|
|
|
|
|
|
|
|
2015-08-06 07:04:46 +00:00
|
|
|
.PHONY: build-all version copy-images os-config.yml
|