2002-04-26 19:50:21 +04:00
|
|
|
# $NetBSD: Makefile,v 1.6 2002/04/26 15:50:30 lukem Exp $
|
2002-04-11 16:19:41 +04:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
2002-04-26 19:50:21 +04:00
|
|
|
.include "${NETBSDSRCDIR}/distrib/Makefile.inc"
|
2002-04-11 16:19:41 +04:00
|
|
|
|
|
|
|
.include <bsd.kernobj.mk>
|
|
|
|
|
|
|
|
|
|
|
|
# TARGETS is a list of:
|
2002-04-25 01:17:31 +04:00
|
|
|
# KERNEL_name GZBOOT_name RELOC_ADDR WHICH_kernel
|
2002-04-11 16:19:41 +04:00
|
|
|
#
|
2002-04-25 01:17:31 +04:00
|
|
|
TARGETS= IQ80310 IQ80310 0x00080000 netbsd \
|
|
|
|
IQ80321 IQ80321 0xf0080000 netbsd
|
2002-04-11 16:19:41 +04:00
|
|
|
|
2002-04-25 01:17:31 +04:00
|
|
|
.for K G R W in ${TARGETS} # {
|
2002-04-11 16:19:41 +04:00
|
|
|
|
2002-04-25 01:17:31 +04:00
|
|
|
GZB${G}DIR!= cd ${.CURDIR}/../gzboot_${G}_flash_${R} && ${PRINTOBJDIR}
|
|
|
|
GZB${G}= ${GZB${K}DIR}/gzboot_${G}_${R}.sym
|
2002-04-11 16:19:41 +04:00
|
|
|
|
2002-04-25 01:17:31 +04:00
|
|
|
GZIMGS+= gzimg_${G}_flash_${R}.gz
|
2002-04-11 16:19:41 +04:00
|
|
|
|
2002-04-25 01:17:31 +04:00
|
|
|
gzimg_${G}_flash_${R}.gz: .NOTMAIN ${GZB${G}} ${KERNOBJDIR}/${K}/${W}.bin
|
2002-04-11 16:19:41 +04:00
|
|
|
@echo "Populating ${.TARGET}"
|
2002-04-25 01:09:57 +04:00
|
|
|
cp ${KERNOBJDIR}/${K}/${W}.bin netbsd.tmp
|
2002-04-12 03:36:49 +04:00
|
|
|
gzip -9f netbsd.tmp
|
2002-04-25 01:17:31 +04:00
|
|
|
cp ${GZB${G}} gzboot.sym
|
2002-04-11 16:19:41 +04:00
|
|
|
${MDSETIMAGE} -v -s gzboot.sym netbsd.tmp.gz
|
|
|
|
${OBJCOPY} -O binary gzboot.sym gzboot.bin
|
2002-04-12 03:36:49 +04:00
|
|
|
gzip -9f gzboot.bin
|
2002-04-11 16:19:41 +04:00
|
|
|
mv gzboot.bin.gz ${.TARGET}
|
2002-04-25 01:17:31 +04:00
|
|
|
rm gzboot.sym netbsd.tmp.gz
|
2002-04-11 16:19:41 +04:00
|
|
|
|
|
|
|
.endfor # }
|
|
|
|
|
|
|
|
CLEANFILES+= netbsd.tmp netbsd.tmp.gz gzboot.sym \
|
|
|
|
gzboot.bin gzboot.bin.gz ${GZIMGS}
|
|
|
|
|
|
|
|
|
|
|
|
# do the work
|
|
|
|
#
|
|
|
|
realall: ${GZIMGS}
|
|
|
|
|
2002-04-13 20:40:32 +04:00
|
|
|
ITARGET= ${RELEASEDIR}/binary/gzimg
|
|
|
|
|
|
|
|
release: check_RELEASEDIR
|
|
|
|
.for img in ${GZIMGS}
|
|
|
|
${RELINSTALL} ${img} ${ITARGET}/.
|
|
|
|
.endfor
|
|
|
|
|
2002-04-11 16:19:41 +04:00
|
|
|
.include <bsd.prog.mk>
|