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