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