Makefile.vm (1dfcff294e44d4b45813288ef4095c36abb22f0e) | Makefile.vm (89585511cc052643a774f64f6450d18e7dd51d4a) |
---|---|
1# 2# $FreeBSD$ 3# 4# 5# Makefile for building virtual machine and cloud provider disk images. 6# 7 8VMTARGETS= vm-image 9VMFORMATS?= vhd vmdk qcow2 raw 10VMSIZE?= 5120m | 1# 2# $FreeBSD$ 3# 4# 5# Makefile for building virtual machine and cloud provider disk images. 6# 7 8VMTARGETS= vm-image 9VMFORMATS?= vhd vmdk qcow2 raw 10VMSIZE?= 5120m |
11VMFS?= ufs |
|
11SWAPSIZE?= 1g 12VMBASE?= vm 13 14VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image 15VMDK_DESC= VMWare, VirtualBox disk image 16QCOW2_DESC= Qemu, KVM disk image 17RAW_DESC= Unformatted raw disk image 18 --- 62 unchanged lines hidden (view full) --- 81${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf 82. endif 83 84cw-${_CW:tl}: emulator-portinstall 85 mkdir -p ${.OBJDIR}/${.TARGET} 86 env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ 87 QEMUSTATIC=${QEMUSTATIC} \ 88 ${.CURDIR}/scripts/mk-vmimage.sh \ | 12SWAPSIZE?= 1g 13VMBASE?= vm 14 15VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image 16VMDK_DESC= VMWare, VirtualBox disk image 17QCOW2_DESC= Qemu, KVM disk image 18RAW_DESC= Unformatted raw disk image 19 --- 62 unchanged lines hidden (view full) --- 82${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf 83. endif 84 85cw-${_CW:tl}: emulator-portinstall 86 mkdir -p ${.OBJDIR}/${.TARGET} 87 env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ 88 QEMUSTATIC=${QEMUSTATIC} \ 89 ${.CURDIR}/scripts/mk-vmimage.sh \ |
89 -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ | 90 -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${VMFS} \ |
90 -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ 91 -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}IMAGE} -c ${${_CW:tu}CONF} 92 touch ${.TARGET} 93 94cw${_CW:tl}-package: 95 @# Special target to handle packaging cloud images in the formats 96 @# specific to each hosting provider. 97.if exists(${.CURDIR}/tools/${_CW:tl}-package.sh) --- 17 unchanged lines hidden (view full) --- 115vm-base: vm-image 116 117vm-image: 118.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) 119. for FORMAT in ${VMFORMATS} 120 mkdir -p ${.OBJDIR}/${.TARGET} 121 env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ 122 ${.CURDIR}/scripts/mk-vmimage.sh \ | 91 -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ 92 -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}IMAGE} -c ${${_CW:tu}CONF} 93 touch ${.TARGET} 94 95cw${_CW:tl}-package: 96 @# Special target to handle packaging cloud images in the formats 97 @# specific to each hosting provider. 98.if exists(${.CURDIR}/tools/${_CW:tl}-package.sh) --- 17 unchanged lines hidden (view full) --- 116vm-base: vm-image 117 118vm-image: 119.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) 120. for FORMAT in ${VMFORMATS} 121 mkdir -p ${.OBJDIR}/${.TARGET} 122 env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ 123 ${.CURDIR}/scripts/mk-vmimage.sh \ |
123 -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ | 124 -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${VMFS} \ |
124 -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ 125 -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} 126. endfor 127.endif 128 touch ${.TARGET} 129 130vm-cloudware: ${CLOUDTARGETS} 131 --- 50 unchanged lines hidden --- | 125 -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ 126 -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} 127. endfor 128.endif 129 touch ${.TARGET} 130 131vm-cloudware: ${CLOUDTARGETS} 132 --- 50 unchanged lines hidden --- |