1 # $NetBSD: Makefile.liveimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $ 2 # 3 # Common Makefile to create a bootable FS image for USB flash or emulators 4 # 5 6 # 7 # Required variables: 8 # LIVEIMGBASE 9 # Basename of the liveimage 10 # 11 # See Makefile.bootimage for other variables. 12 # 13 14 .if !target(check_LIVEIMGBASE) 15 check_LIVEIMGBASE: .PHONY .NOTMAIN 16 .if !defined(LIVEIMGBASE) 17 @echo "Error: LIVEIMGBASE is not set" 18 @false 19 .else 20 @true 21 .endif 22 .endif 23 24 IMGBASE= ${LIVEIMGBASE} 25 26 .include "${NETBSDSRCDIR}/distrib/common/bootimage/Makefile.bootimage" 27 28 # LIVEIMG_RELEASEDIR specifies where to install ${LIVEIMGBASE}.img.gz. 29 # This should be passed from etc/Makefile or etc/etc.${MACHINE}/Makefile.inc 30 # but also set default here for manual builds. 31 LIVEIMG_RELEASEDIR?= ${RELEASEMACHINEDIR}/installation/liveimage 32 33 # should be defined elsewhere? 34 MKDIR?= mkdir -p 35 36 live_image: check_LIVEIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz 37 ${MKDIR} ${LIVEIMG_RELEASEDIR} 38 ${RELEASE_INSTALL} ${IMGBASE}.img.gz ${LIVEIMG_RELEASEDIR} 39 # note ${MAKESUM} will be calculated in src/etc/Makefile 40 41 release: 42 43