1 # $NetBSD: Makefile,v 1.6 2002/04/26 15:50:30 lukem Exp $ 2 3 .include <bsd.own.mk> 4 .include "${NETBSDSRCDIR}/distrib/Makefile.inc" 5 6 .include <bsd.kernobj.mk> 7 8 9 # TARGETS is a list of: 10 # KERNEL_name GZBOOT_name RELOC_ADDR WHICH_kernel 11 # 12 TARGETS= IQ80310 IQ80310 0x00080000 netbsd \ 13 IQ80321 IQ80321 0xf0080000 netbsd 14 15 .for K G R W in ${TARGETS} # { 16 17 GZB${G}DIR!= cd ${.CURDIR}/../gzboot_${G}_flash_${R} && ${PRINTOBJDIR} 18 GZB${G}= ${GZB${K}DIR}/gzboot_${G}_${R}.sym 19 20 GZIMGS+= gzimg_${G}_flash_${R}.gz 21 22 gzimg_${G}_flash_${R}.gz: .NOTMAIN ${GZB${G}} ${KERNOBJDIR}/${K}/${W}.bin 23 @echo "Populating ${.TARGET}" 24 cp ${KERNOBJDIR}/${K}/${W}.bin netbsd.tmp 25 gzip -9f netbsd.tmp 26 cp ${GZB${G}} gzboot.sym 27 ${MDSETIMAGE} -v -s gzboot.sym netbsd.tmp.gz 28 ${OBJCOPY} -O binary gzboot.sym gzboot.bin 29 gzip -9f gzboot.bin 30 mv gzboot.bin.gz ${.TARGET} 31 rm gzboot.sym netbsd.tmp.gz 32 33 .endfor # } 34 35 CLEANFILES+= netbsd.tmp netbsd.tmp.gz gzboot.sym \ 36 gzboot.bin gzboot.bin.gz ${GZIMGS} 37 38 39 # do the work 40 # 41 realall: ${GZIMGS} 42 43 ITARGET= ${RELEASEDIR}/binary/gzimg 44 45 release: check_RELEASEDIR 46 .for img in ${GZIMGS} 47 ${RELINSTALL} ${img} ${ITARGET}/. 48 .endfor 49 50 .include <bsd.prog.mk> 51