Makefile revision 1.5
1#	$NetBSD: Makefile,v 1.5 2002/04/24 21:17:31 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	GZBOOT_name	RELOC_ADDR	WHICH_kernel
11#	
12TARGETS=	IQ80310		IQ80310		0x00080000	netbsd     \
13		IQ80321		IQ80321		0xf0080000	netbsd
14
15.for K G R W in ${TARGETS}				# {
16
17GZB${G}DIR!=	cd ${.CURDIR}/../gzboot_${G}_flash_${R} && ${PRINTOBJDIR}
18GZB${G}=	${GZB${K}DIR}/gzboot_${G}_${R}.sym
19
20GZIMGS+=	gzimg_${G}_flash_${R}.gz
21
22gzimg_${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
35CLEANFILES+=	netbsd.tmp netbsd.tmp.gz gzboot.sym \
36		gzboot.bin gzboot.bin.gz ${GZIMGS}
37
38
39#	do the work
40#
41realall: ${GZIMGS}
42
43ITARGET=	${RELEASEDIR}/binary/gzimg
44
45release: check_RELEASEDIR
46.for img in ${GZIMGS}
47	${RELINSTALL} ${img} ${ITARGET}/.
48.endfor
49
50.include <bsd.prog.mk>
51