Add constants for prebuilts
Change-Id: I17d4445b23878b9cba051f67ed6815ed294ce3a1
diff --git a/Makefile b/Makefile
index a243d98..76aea9d 100644
--- a/Makefile
+++ b/Makefile
@@ -236,26 +236,31 @@
## Generating/Updating prebuilts
##
+PREBUILTS_CROSVM_EXT4 := prebuilts/linux-aarch64/images/crosvm.ext4
+PREBUILTS_ROOTFS_EXT4 := prebuilts/linux-aarch64/images/rootfs.ext4
+PREBUILTS_QEMU_ROM := prebuilts/linux-aarch64/images/efi-virtio.rom
+PREBUILTS_QEMU_BIN := prebuilts/linux-x86/qemu
+
.PHONY:update-prebuilts
update-prebuilts: \
- prebuilts/linux-aarch64/images/crosvm.ext4 \
- prebuilts/linux-aarch64/images/efi-virtio.rom \
- prebuilts/linux-aarch64/images/rootfs.ext4 \
- prebuilts/linux-x86/qemu
+ $(PREBUILTS_ROOTFS_EXT4) \
+ $(PREBUILTS_CROSVM_EXT4) \
+ $(PREBUILTS_QEMU_ROM) \
+ $(PREBUILTS_QEMU_BIN)
-prebuilts/linux-aarch64/images/rootfs.ext4: buildroot
+$(PREBUILTS_ROOTFS_EXT4): buildroot
mkdir -p $(shell dirname $@)
cp $(BR_OUT)/images/rootfs.ext4 $@
-prebuilts/linux-aarch64/images/efi-virtio.rom: buildroot
+$(PREBUILTS_QEMU_ROM): buildroot
mkdir -p $(shell dirname $@)
cp $(BR_OUT)/per-package/host-qemu/host/share/qemu/efi-virtio.rom $@
CF_DOWNLOAD_AOSP_SH := $(ROOT_DIR)/build/cuttlefish/download-aosp.sh
CROSVM_IMG_SIZE_MB := 1024
-prebuilts/linux-aarch64/images/crosvm.ext4: TMP_DIR := $(shell mktemp -d)
-prebuilts/linux-aarch64/images/crosvm.ext4: $(CF_DOWNLOAD_AOSP_SH)
+$(PREBUILTS_CROSVM_EXT4): TMP_DIR := $(shell mktemp -d)
+$(PREBUILTS_CROSVM_EXT4): $(CF_DOWNLOAD_AOSP_SH)
mkdir -p $(shell dirname $@)
cd $(TMP_DIR) && $(CF_DOWNLOAD_AOSP_SH) -a arm64 -C
dd if=/dev/zero of=$@.tmp bs=1M count=$(CROSVM_IMG_SIZE_MB)
@@ -264,8 +269,8 @@
mv $@.tmp $@
# The qemu binary
-.PHONY:prebuilts/linux-x86/qemu
-prebuilts/linux-x86/qemu:
+.PHONY:$(PREBUILTS_QEMU_BIN)
+$(PREBUILTS_QEMU_BIN):
- rm -rf $@
${SCRIPTS_DIR}/aarch64/build_qemu.sh $(OUT_DIR)/qemu ${TOOLCHAIN_BIN}
mkdir -p $@/bin