1# $NetBSD: Makefile,v 1.17 2004/12/24 10:56:23 joff Exp $ 2 3.include <bsd.own.mk> 4.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" 5 6.include <bsd.kernobj.mk> 7 8 9# TARGETS is a list of: 10# KERNEL_name GZBOOT_name GZIMG_name 11# RELOC_ADDR WHICH_kernel 12# 13.if ${MACHINE_ARCH} == "arm" 14# Little endian platforms. 15TARGETS= ADI_BRH ADI_BRH ADI_BRH_sd0 \ 16 0x00140000 netbsd-sd0 \ 17 \ 18 ADI_BRH ADI_BRH ADI_BRH_wd0 \ 19 0x00140000 netbsd-wd0 \ 20 \ 21 IQ80310 IQ80310 IQ80310_sd0 \ 22 0x00080000 netbsd-sd0 \ 23 \ 24 IQ80310 IQ80310 IQ80310_wd0 \ 25 0x00080000 netbsd-wd0 \ 26 \ 27 IQ80321 IQ80321 IQ80321_sd0 \ 28 0xf0080000 netbsd-sd0 \ 29 \ 30 IQ80321 IQ80321 IQ80321_wd0 \ 31 0xf0080000 netbsd-wd0 \ 32 \ 33 TEAMASA_NPWR IQ80310 TEAMASA_NPWR_sd0 \ 34 0x00080000 netbsd-sd0 \ 35 \ 36 TS7200 TS7200 TS7200_wd0 \ 37 0x60660000 netbsd-wd0 \ 38 \ 39 SMDK2800 SMDK2800 SMDK2800 \ 40 0x00000000 netbsd 41.else 42# Big endian platforms. 43TARGETS= ADI_BRH ADI_BRH ADI_BRH_sd0 \ 44 0x00140000 netbsd-sd0 \ 45 \ 46 ADI_BRH ADI_BRH ADI_BRH_wd0 \ 47 0x00140000 netbsd-wd0 48.endif 49 50.for K G I R W in ${TARGETS} # { 51 52GZB${G}= ${DESTDIR}/usr/mdec/gzboot_${G}_${R}.bin 53 54GZIMGS+= gzimg_${I}_flash_${R}.gz 55 56gzimg_${I}_flash_${R}: .NOTMAIN ${GZB${G}} ${KERNOBJDIR}/${K}/${W}.bin 57 @echo "Populating ${.TARGET}" 58 -rm -f ${.TARGET}.kern.gz 59 gzip -9c ${KERNOBJDIR}/${K}/${W}.bin > ${.TARGET}.kern.gz 60 ${TOOL_CAT} ${GZB${G}} ${.TARGET}.kern.gz > ${.TARGET} 61 62gzimg_${I}_flash_${R}.gz: .NOTMAIN gzimg_${I}_flash_${R} 63 -rm -f ${.TARGET} 64 gzip -9c ${.ALLSRC} > ${.TARGET} 65 66CLEANFILES+= gzimg_${I}_flash_${R}.kern gzimg_${I}_flash_${R}.kern.gz \ 67 gzimg_${I}_flash_${R} 68 69.endfor # } 70 71CLEANFILES+= ${GZIMGS} 72 73 74realall: ${GZIMGS} 75 76release: check_RELEASEDIR .WAIT ${GZIMGS} 77.for img in ${GZIMGS} 78 ${RELEASE_INSTALL} ${img} ${RELEASEDIR}/${MACHINE}/binary/gzimg 79.endfor 80 81.include <bsd.prog.mk> 82