include common.make DOCKER_BINARY_URL := https://github.com/rancher/docker/releases/download/v1.8.1-ros/docker-1.8.1 KERNEL_URL := https://github.com/rancher/os-kernel/releases/download/Ubuntu-3.19.0-27.29-ros1/linux-3.19.8-ckt5-rancher-x86.tar.gz DFS_IMAGE := rancher/docker:1.8.1 bin/rancheros: mkdir -p $(dir $@) godep go build -tags netgo -installsuffix 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 assets/docker: mkdir -p $(dir $@) curl -L "$(DOCKER_BINARY_URL)" > $@ chmod +x $@ $(DIST)/artifacts/vmlinuz: $(BUILD)/kernel/ mkdir -p $(dir $@) mv $(BUILD)/kernel/boot/vmlinuz* $@ $(BUILD)/kernel/: mkdir -p $@ && curl -L "$(KERNEL_URL)" | tar -xzf - -C $@ --strip=0 $(BUILD)/images.tar: bin/rancheros FORCE_PULL=$(FORCE_PULL) ./scripts/mk-images-tar.sh $(DIST)/artifacts/initrd: bin/rancheros assets/docker $(BUILD)/kernel/ $(BUILD)/images.tar mkdir -p $(dir $@) DFS_IMAGE=$(DFS_IMAGE) ./scripts/mk-initrd.sh $(DIST)/artifacts/rancheros.iso: $(DIST)/artifacts/initrd $(DIST)/artifacts/vmlinuz ./scripts/mk-rancheros-iso.sh $(DIST)/artifacts/iso-checksums.txt: $(DIST)/artifacts/rancheros.iso ./scripts/mk-iso-checksums-txt.sh version: @echo $(VERSION) installer: $(DIST)/artifacts/initrd $(DIST)/artifacts/vmlinuz docker build -t rancher/os:$(VERSION) . build-all: \ installer \ bin/rancheros \ $(DIST)/artifacts/initrd \ $(DIST)/artifacts/vmlinuz \ $(DIST)/artifacts/rancheros.iso \ $(DIST)/artifacts/iso-checksums.txt .PHONY: build-all installer version bin/rancheros