head	1.20;
access;
symbols
	netbsd-11-0-RC4:1.19
	netbsd-11-0-RC3:1.19
	netbsd-11-0-RC2:1.19
	netbsd-11-0-RC1:1.19
	perseant-exfatfs-base-20250801:1.19
	netbsd-11:1.19.0.4
	netbsd-11-base:1.19
	netbsd-10-1-RELEASE:1.18
	perseant-exfatfs-base-20240630:1.19
	perseant-exfatfs:1.19.0.2
	perseant-exfatfs-base:1.19
	netbsd-8-3-RELEASE:1.17
	netbsd-9-4-RELEASE:1.17.18.1
	netbsd-10-0-RELEASE:1.18
	netbsd-10-0-RC6:1.18
	netbsd-10-0-RC5:1.18
	netbsd-10-0-RC4:1.18
	netbsd-10-0-RC3:1.18
	netbsd-10-0-RC2:1.18
	thorpej-ifq:1.18.0.24
	thorpej-ifq-base:1.18
	thorpej-altq-separation:1.18.0.22
	thorpej-altq-separation-base:1.18
	netbsd-10-0-RC1:1.18
	netbsd-10:1.18.0.20
	netbsd-10-base:1.18
	bouyer-sunxi-drm:1.18.0.18
	bouyer-sunxi-drm-base:1.18
	netbsd-9-3-RELEASE:1.17.18.1
	thorpej-i2c-spi-conf2:1.18.0.16
	thorpej-i2c-spi-conf2-base:1.18
	thorpej-futex2:1.18.0.14
	thorpej-futex2-base:1.18
	thorpej-cfargs2:1.18.0.12
	thorpej-cfargs2-base:1.18
	cjep_sun2x-base1:1.18
	cjep_sun2x:1.18.0.10
	cjep_sun2x-base:1.18
	cjep_staticlib_x-base1:1.18
	netbsd-9-2-RELEASE:1.17.18.1
	cjep_staticlib_x:1.18.0.8
	cjep_staticlib_x-base:1.18
	thorpej-i2c-spi-conf:1.18.0.6
	thorpej-i2c-spi-conf-base:1.18
	thorpej-cfargs:1.18.0.4
	thorpej-cfargs-base:1.18
	thorpej-futex:1.18.0.2
	thorpej-futex-base:1.18
	netbsd-9-1-RELEASE:1.17.18.1
	bouyer-xenpvh-base2:1.17
	phil-wifi-20200421:1.17
	bouyer-xenpvh-base1:1.17
	phil-wifi-20200411:1.17
	bouyer-xenpvh:1.17.0.24
	bouyer-xenpvh-base:1.17
	is-mlppp:1.17.0.22
	is-mlppp-base:1.17
	phil-wifi-20200406:1.17
	netbsd-8-2-RELEASE:1.17
	ad-namecache-base3:1.17
	netbsd-9-0-RELEASE:1.17
	netbsd-9-0-RC2:1.17
	ad-namecache-base2:1.17
	ad-namecache-base1:1.17
	ad-namecache:1.17.0.20
	ad-namecache-base:1.17
	netbsd-9-0-RC1:1.17
	phil-wifi-20191119:1.17
	netbsd-9:1.17.0.18
	netbsd-9-base:1.17
	phil-wifi-20190609:1.17
	netbsd-8-1-RELEASE:1.17
	netbsd-8-1-RC1:1.17
	isaki-audio2:1.17.0.16
	isaki-audio2-base:1.17
	pgoyette-compat-merge-20190127:1.17
	pgoyette-compat-20190127:1.17
	pgoyette-compat-20190118:1.17
	pgoyette-compat-1226:1.17
	pgoyette-compat-1126:1.17
	pgoyette-compat-1020:1.17
	pgoyette-compat-0930:1.17
	pgoyette-compat-0906:1.17
	netbsd-7-2-RELEASE:1.15
	pgoyette-compat-0728:1.17
	netbsd-8-0-RELEASE:1.17
	phil-wifi:1.17.0.14
	phil-wifi-base:1.17
	pgoyette-compat-0625:1.17
	netbsd-8-0-RC2:1.17
	pgoyette-compat-0521:1.17
	pgoyette-compat-0502:1.17
	pgoyette-compat-0422:1.17
	netbsd-8-0-RC1:1.17
	pgoyette-compat-0415:1.17
	pgoyette-compat-0407:1.17
	pgoyette-compat-0330:1.17
	pgoyette-compat-0322:1.17
	pgoyette-compat-0315:1.17
	netbsd-7-1-2-RELEASE:1.15
	pgoyette-compat:1.17.0.12
	pgoyette-compat-base:1.17
	netbsd-7-1-1-RELEASE:1.15
	tls-maxphys-base-20171202:1.17
	matt-nb8-mediatek:1.17.0.10
	matt-nb8-mediatek-base:1.17
	nick-nhusb-base-20170825:1.17
	perseant-stdc-iso10646:1.17.0.8
	perseant-stdc-iso10646-base:1.17
	netbsd-8:1.17.0.6
	netbsd-8-base:1.17
	prg-localcount2-base3:1.17
	prg-localcount2-base2:1.17
	prg-localcount2-base1:1.17
	prg-localcount2:1.17.0.4
	prg-localcount2-base:1.17
	pgoyette-localcount-20170426:1.17
	bouyer-socketcan-base1:1.17
	jdolecek-ncq:1.17.0.2
	jdolecek-ncq-base:1.17
	pgoyette-localcount-20170320:1.16
	netbsd-7-1:1.15.0.14
	netbsd-7-1-RELEASE:1.15
	netbsd-7-1-RC2:1.15
	nick-nhusb-base-20170204:1.16
	netbsd-7-nhusb-base-20170116:1.15
	bouyer-socketcan:1.16.0.2
	bouyer-socketcan-base:1.16
	pgoyette-localcount-20170107:1.16
	netbsd-7-1-RC1:1.15
	nick-nhusb-base-20161204:1.16
	pgoyette-localcount-20161104:1.16
	netbsd-7-0-2-RELEASE:1.15
	nick-nhusb-base-20161004:1.16
	localcount-20160914:1.16
	netbsd-7-nhusb:1.15.0.12
	netbsd-7-nhusb-base:1.15
	pgoyette-localcount-20160806:1.15
	pgoyette-localcount-20160726:1.15
	pgoyette-localcount:1.15.0.10
	pgoyette-localcount-base:1.15
	nick-nhusb-base-20160907:1.15
	nick-nhusb-base-20160529:1.15
	netbsd-7-0-1-RELEASE:1.15
	nick-nhusb-base-20160422:1.15
	nick-nhusb-base-20160319:1.15
	nick-nhusb-base-20151226:1.15
	netbsd-7-0:1.15.0.8
	netbsd-7-0-RELEASE:1.15
	nick-nhusb-base-20150921:1.15
	netbsd-7-0-RC3:1.15
	netbsd-7-0-RC2:1.15
	netbsd-7-0-RC1:1.15
	nick-nhusb-base-20150606:1.15
	nick-nhusb-base-20150406:1.15
	nick-nhusb:1.15.0.6
	nick-nhusb-base:1.15
	netbsd-5-2-3-RELEASE:1.6
	netbsd-5-1-5-RELEASE:1.6
	netbsd-6-0-6-RELEASE:1.13
	netbsd-6-1-5-RELEASE:1.13
	netbsd-7:1.15.0.4
	netbsd-7-base:1.15
	yamt-pagecache-base9:1.15
	yamt-pagecache-tag8:1.13
	netbsd-6-1-4-RELEASE:1.13
	netbsd-6-0-5-RELEASE:1.13
	tls-earlyentropy:1.15.0.2
	tls-earlyentropy-base:1.15
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.15
	riastradh-drm2-base3:1.15
	netbsd-6-1-3-RELEASE:1.13
	netbsd-6-0-4-RELEASE:1.13
	netbsd-5-2-2-RELEASE:1.6
	netbsd-5-1-4-RELEASE:1.6
	netbsd-6-1-2-RELEASE:1.13
	netbsd-6-0-3-RELEASE:1.13
	netbsd-5-2-1-RELEASE:1.6
	netbsd-5-1-3-RELEASE:1.6
	rmind-smpnet-nbase:1.15
	netbsd-6-1-1-RELEASE:1.13
	riastradh-drm2-base2:1.13
	riastradh-drm2-base1:1.13
	riastradh-drm2:1.13.0.24
	riastradh-drm2-base:1.13
	rmind-smpnet:1.13.0.16
	rmind-smpnet-base:1.15
	netbsd-6-1:1.13.0.22
	netbsd-6-0-2-RELEASE:1.13
	netbsd-6-1-RELEASE:1.13
	khorben-n900:1.13.0.20
	netbsd-6-1-RC4:1.13
	netbsd-6-1-RC3:1.13
	agc-symver:1.13.0.18
	agc-symver-base:1.13
	netbsd-6-1-RC2:1.13
	netbsd-6-1-RC1:1.13
	yamt-pagecache-base8:1.13
	netbsd-5-2:1.6.0.84
	netbsd-6-0-1-RELEASE:1.13
	yamt-pagecache-base7:1.13
	netbsd-5-2-RELEASE:1.6
	netbsd-5-2-RC1:1.6
	matt-nb6-plus-nbase:1.13
	yamt-pagecache-base6:1.13
	netbsd-6-0:1.13.0.14
	netbsd-6-0-RELEASE:1.13
	netbsd-6-0-RC2:1.13
	tls-maxphys:1.13.0.12
	tls-maxphys-base:1.15
	matt-nb6-plus:1.13.0.10
	matt-nb6-plus-base:1.13
	netbsd-6-0-RC1:1.13
	jmcneill-usbmp-base10:1.13
	yamt-pagecache-base5:1.13
	jmcneill-usbmp-base9:1.13
	yamt-pagecache-base4:1.13
	jmcneill-usbmp-base8:1.13
	jmcneill-usbmp-base7:1.13
	jmcneill-usbmp-base6:1.13
	jmcneill-usbmp-base5:1.13
	jmcneill-usbmp-base4:1.13
	jmcneill-usbmp-base3:1.13
	jmcneill-usbmp-pre-base2:1.13
	jmcneill-usbmp-base2:1.13
	netbsd-6:1.13.0.8
	netbsd-6-base:1.13
	netbsd-5-1-2-RELEASE:1.6
	netbsd-5-1-1-RELEASE:1.6
	jmcneill-usbmp:1.13.0.6
	jmcneill-usbmp-base:1.13
	jmcneill-audiomp3:1.13.0.4
	jmcneill-audiomp3-base:1.13
	yamt-pagecache-base3:1.13
	yamt-pagecache-base2:1.13
	yamt-pagecache:1.13.0.2
	yamt-pagecache-base:1.13
	rmind-uvmplock-nbase:1.12
	cherry-xenmp:1.12.0.2
	cherry-xenmp-base:1.12
	jym-xensuspend-nbase:1.12
	uebayasi-xip-base7:1.11
	bouyer-quota2-nbase:1.12
	bouyer-quota2:1.9.0.4
	bouyer-quota2-base:1.11
	jruoho-x86intr:1.9.0.2
	jruoho-x86intr-base:1.9
	matt-mips64-premerge-20101231:1.9
	matt-nb5-mips64-premerge-20101231:1.6
	matt-nb5-pq3:1.6.0.82
	matt-nb5-pq3-base:1.6
	netbsd-5-1:1.6.0.80
	uebayasi-xip-base6:1.9
	uebayasi-xip-base5:1.9
	netbsd-5-1-RELEASE:1.6
	uebayasi-xip-base4:1.9
	uebayasi-xip-base3:1.9
	yamt-nfs-mp-base11:1.9
	netbsd-5-1-RC4:1.6
	matt-nb5-mips64-k15:1.6
	uebayasi-xip-base2:1.9
	yamt-nfs-mp-base10:1.9
	netbsd-5-1-RC3:1.6
	netbsd-5-1-RC2:1.6
	uebayasi-xip-base1:1.8
	netbsd-5-1-RC1:1.6
	rmind-uvmplock:1.8.0.4
	rmind-uvmplock-base:1.12
	yamt-nfs-mp-base9:1.8
	uebayasi-xip:1.8.0.2
	uebayasi-xip-base:1.8
	netbsd-5-0-2-RELEASE:1.6
	matt-nb5-mips64-premerge-20091211:1.6
	matt-premerge-20091211:1.8
	yamt-nfs-mp-base8:1.8
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.6
	matt-nb4-mips64-k7-u2a-k9b:1.6
	matt-nb5-mips64-u1-k1-k5:1.6
	yamt-nfs-mp-base7:1.8
	matt-nb5-mips64:1.6.0.78
	netbsd-5-0-1-RELEASE:1.6
	jymxensuspend-base:1.8
	yamt-nfs-mp-base6:1.8
	yamt-nfs-mp-base5:1.8
	yamt-nfs-mp-base4:1.8
	yamt-nfs-mp-base3:1.8
	nick-hppapmap-base4:1.8
	nick-hppapmap-base3:1.8
	netbsd-5-0:1.6.0.76
	netbsd-5-0-RELEASE:1.6
	netbsd-5-0-RC4:1.6
	netbsd-5-0-RC3:1.6
	nick-hppapmap-base2:1.6
	netbsd-5-0-RC2:1.6
	jym-xensuspend:1.6.0.74
	jym-xensuspend-base:1.12
	netbsd-5-0-RC1:1.6
	haad-dm-base2:1.6
	haad-nbase2:1.6
	ad-audiomp2:1.6.0.72
	ad-audiomp2-base:1.6
	netbsd-5:1.6.0.70
	netbsd-5-base:1.6
	nick-hppapmap:1.6.0.68
	nick-hppapmap-base:1.8
	matt-mips64-base2:1.6
	haad-dm-base1:1.6
	wrstuden-revivesa-base-4:1.6
	netbsd-4-0-1-RELEASE:1.6
	wrstuden-revivesa-base-3:1.6
	wrstuden-revivesa-base-2:1.6
	wrstuden-fixsa-newbase:1.6
	nick-csl-alignment-base5:1.6
	haad-dm:1.6.0.66
	haad-dm-base:1.6
	wrstuden-revivesa-base-1:1.6
	simonb-wapbl-nbase:1.6
	yamt-pf42-base4:1.6
	simonb-wapbl:1.6.0.64
	simonb-wapbl-base:1.6
	yamt-pf42-base3:1.6
	hpcarm-cleanup-nbase:1.6
	yamt-pf42-baseX:1.6
	yamt-pf42-base2:1.6
	yamt-nfs-mp-base2:1.6
	wrstuden-revivesa:1.6.0.62
	wrstuden-revivesa-base:1.6
	yamt-nfs-mp:1.6.0.60
	yamt-nfs-mp-base:1.6
	yamt-pf42:1.6.0.58
	yamt-pf42-base:1.6
	ad-socklock-base1:1.6
	yamt-lazymbuf-base15:1.6
	yamt-lazymbuf-base14:1.6
	keiichi-mipv6-nbase:1.6
	mjf-devfs2:1.6.0.56
	mjf-devfs2-base:1.6
	nick-net80211-sync:1.6.0.54
	nick-net80211-sync-base:1.6
	keiichi-mipv6:1.6.0.52
	keiichi-mipv6-base:1.6
	bouyer-xeni386-merge1:1.6
	matt-armv6-prevmlocking:1.6
	wrstuden-fixsa-base-1:1.6
	vmlocking2-base3:1.6
	netbsd-4-0:1.6.0.50
	netbsd-4-0-RELEASE:1.6
	bouyer-xeni386-nbase:1.6
	yamt-kmem-base3:1.6
	cube-autoconf:1.6.0.48
	cube-autoconf-base:1.6
	yamt-kmem-base2:1.6
	bouyer-xeni386:1.6.0.46
	bouyer-xeni386-base:1.6
	yamt-kmem:1.6.0.44
	yamt-kmem-base:1.6
	vmlocking2-base2:1.6
	reinoud-bufcleanup-nbase:1.6
	vmlocking2:1.6.0.42
	vmlocking2-base1:1.6
	netbsd-4-0-RC5:1.6
	matt-nb4-arm:1.6.0.40
	matt-nb4-arm-base:1.6
	matt-armv6-nbase:1.6
	jmcneill-base:1.6
	netbsd-4-0-RC4:1.6
	mjf-devfs:1.6.0.38
	mjf-devfs-base:1.6
	bouyer-xenamd64-base2:1.6
	vmlocking-nbase:1.6
	yamt-x86pmap-base4:1.6
	bouyer-xenamd64:1.6.0.36
	bouyer-xenamd64-base:1.6
	netbsd-4-0-RC3:1.6
	yamt-x86pmap-base3:1.6
	yamt-x86pmap-base2:1.6
	netbsd-4-0-RC2:1.6
	yamt-x86pmap:1.6.0.34
	yamt-x86pmap-base:1.6
	netbsd-4-0-RC1:1.6
	matt-armv6:1.6.0.32
	matt-armv6-base:1.6
	jmcneill-pm:1.6.0.30
	jmcneill-pm-base:1.6
	hpcarm-cleanup:1.6.0.28
	hpcarm-cleanup-base:1.6
	nick-csl-alignment:1.6.0.26
	nick-csl-alignment-base:1.6
	matt-mips64:1.6.0.24
	matt-mips64-base:1.6
	yamt-idlelwp-base8:1.6
	wrstuden-fixsa:1.6.0.22
	wrstuden-fixsa-base:1.6
	ppcoea-renovation:1.6.0.20
	ppcoea-renovation-base:1.6
	thorpej-atomic:1.6.0.18
	thorpej-atomic-base:1.6
	reinoud-bufcleanup:1.6.0.16
	reinoud-bufcleanup-base:1.6
	mjf-ufs-trans:1.6.0.14
	mjf-ufs-trans-base:1.6
	vmlocking:1.6.0.12
	vmlocking-base:1.6
	ad-audiomp:1.6.0.10
	ad-audiomp-base:1.6
	yamt-idlelwp:1.6.0.8
	post-newlock2-merge:1.6
	newlock2-nbase:1.6
	yamt-splraiseipl-base5:1.6
	yamt-splraiseipl-base4:1.6
	yamt-splraiseipl-base3:1.6
	abandoned-netbsd-4-base:1.5
	abandoned-netbsd-4:1.5.0.2
	yamt-splraiseipl-base2:1.6
	yamt-splraiseipl:1.6.0.4
	yamt-splraiseipl-base:1.6
	yamt-pdpolicy-base9:1.6
	newlock2:1.6.0.2
	newlock2-base:1.6
	yamt-pdpolicy-base8:1.6
	yamt-pdpolicy-base7:1.5
	netbsd-4:1.6.0.6
	netbsd-4-base:1.6
	yamt-pdpolicy-base6:1.4
	chap-midi-nbase:1.4
	gdamore-uart:1.4.0.16
	gdamore-uart-base:1.4
	simonb-timcounters-final:1.4
	yamt-pdpolicy-base5:1.4
	chap-midi:1.4.0.14
	chap-midi-base:1.4
	yamt-pdpolicy-base4:1.4
	yamt-pdpolicy-base3:1.4
	peter-altq-base:1.4
	peter-altq:1.4.0.12
	yamt-pdpolicy-base2:1.4
	elad-kernelauth-base:1.4
	elad-kernelauth:1.4.0.10
	yamt-pdpolicy:1.4.0.8
	yamt-pdpolicy-base:1.4
	yamt-uio_vmspace-base5:1.4
	simonb-timecounters:1.4.0.6
	simonb-timecounters-base:1.4
	rpaulo-netinet-merge-pcb:1.4.0.4
	rpaulo-netinet-merge-pcb-base:1.6
	yamt-uio_vmspace:1.4.0.2
	yamt-readahead-base3:1.2
	yamt-readahead-base2:1.2
	yamt-readahead-pervnode:1.2
	yamt-readahead-perfile:1.2
	yamt-readahead:1.2.0.10
	yamt-readahead-base:1.2
	ktrace-lwp-base:1.2
	ktrace-lwp:1.2.0.8
	yamt-vop-base3:1.2
	yamt-vop-base2:1.2
	thorpej-vnode-attr:1.2.0.6
	thorpej-vnode-attr-base:1.2
	yamt-vop:1.2.0.4
	yamt-vop-base:1.2
	yamt-lazymbuf:1.2.0.2
	kent-audio2-base:1.1
	kent-audio2:1.1.0.2;
locks; strict;
comment	@# @;


1.20
date	2026.05.05.08.38.21;	author mrg;	state Exp;
branches;
next	1.19;
commitid	rlRx7EygNIlRpBEG;

1.19
date	2024.06.29.08.02.06;	author rin;	state Exp;
branches;
next	1.18;
commitid	Bn8WjI0IK6DyUQfF;

1.18
date	2020.06.03.11.33.38;	author tsutsui;	state Exp;
branches;
next	1.17;
commitid	hx1tOVd3ZebISLaC;

1.17
date	2017.04.08.19.53.20;	author christos;	state Exp;
branches
	1.17.18.1;
next	1.16;
commitid	mAo8FJwd588QFLMz;

1.16
date	2016.09.08.14.36.13;	author christos;	state Exp;
branches
	1.16.2.1;
next	1.15;
commitid	bFW6i30wLyuEJulz;

1.15
date	2014.01.16.01.15.33;	author christos;	state Exp;
branches
	1.15.6.1
	1.15.10.1;
next	1.14;
commitid	eohV5AOa1lR3mhlx;

1.14
date	2014.01.12.15.26.28;	author tsutsui;	state Exp;
branches;
next	1.13;
commitid	YjbnVt32CCoKaQkx;

1.13
date	2011.07.13.14.09.36;	author mrg;	state Exp;
branches
	1.13.2.1
	1.13.12.1
	1.13.16.1;
next	1.12;

1.12
date	2011.02.20.07.52.43;	author matt;	state Exp;
branches;
next	1.11;

1.11
date	2011.01.22.19.19.16;	author joerg;	state Exp;
branches;
next	1.10;

1.10
date	2011.01.21.15.59.05;	author joerg;	state Exp;
branches;
next	1.9;

1.9
date	2010.05.27.06.58.12;	author dholland;	state Exp;
branches
	1.9.2.1
	1.9.4.1;
next	1.8;

1.8
date	2009.04.03.10.38.12;	author tsutsui;	state Exp;
branches
	1.8.2.1
	1.8.4.1;
next	1.7;

1.7
date	2009.03.15.13.57.57;	author tsutsui;	state Exp;
branches;
next	1.6;

1.6
date	2006.08.28.13.42.39;	author tsutsui;	state Exp;
branches
	1.6.60.1
	1.6.68.1
	1.6.74.1;
next	1.5;

1.5
date	2006.07.22.14.11.35;	author tsutsui;	state Exp;
branches;
next	1.4;

1.4
date	2005.12.28.08.04.44;	author skrll;	state Exp;
branches
	1.4.4.1
	1.4.8.1;
next	1.3;

1.3
date	2005.12.11.12.16.41;	author christos;	state Exp;
branches;
next	1.2;

1.2
date	2005.05.11.16.55.31;	author jmc;	state Exp;
branches
	1.2.2.1
	1.2.8.1;
next	1.1;

1.1
date	2005.04.18.16.27.54;	author tsutsui;	state Exp;
branches
	1.1.2.1;
next	;

1.17.18.1
date	2020.06.07.16.59.04;	author martin;	state Exp;
branches;
next	;
commitid	MMlWlpQ7KR6oyjbC;

1.16.2.1
date	2017.04.21.16.53.22;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.15.6.1
date	2016.10.05.20.55.24;	author skrll;	state Exp;
branches;
next	1.15.6.2;
commitid	uuAdz3JYHQmaWZoz;

1.15.6.2
date	2017.08.28.17.51.29;	author skrll;	state Exp;
branches;
next	;
commitid	UQQpnjvcNkUZn05A;

1.15.10.1
date	2017.04.26.02.53.00;	author pgoyette;	state Exp;
branches;
next	;
commitid	ojV02aOSdzvBqZOz;

1.13.2.1
date	2014.05.22.11.39.30;	author yamt;	state Exp;
branches;
next	;
commitid	VUUXuyNWnt3AKwBx;

1.13.12.1
date	2014.08.20.00.02.44;	author tls;	state Exp;
branches;
next	1.13.12.2;
commitid	jTnpym9Qu0o4R1Nx;

1.13.12.2
date	2017.12.03.11.35.50;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;

1.13.16.1
date	2014.05.18.17.44.56;	author rmind;	state Exp;
branches;
next	;
commitid	mL5ZYSzpqK6QS2Bx;

1.9.2.1
date	2011.06.06.09.05.00;	author jruoho;	state Exp;
branches;
next	;

1.9.4.1
date	2011.02.08.16.19.12;	author bouyer;	state Exp;
branches;
next	1.9.4.2;

1.9.4.2
date	2011.03.05.15.09.31;	author bouyer;	state Exp;
branches;
next	;

1.8.2.1
date	2010.08.17.06.44.00;	author uebayasi;	state Exp;
branches;
next	;

1.8.4.1
date	2010.05.30.05.16.37;	author rmind;	state Exp;
branches;
next	1.8.4.2;

1.8.4.2
date	2011.03.05.20.49.27;	author rmind;	state Exp;
branches;
next	;

1.6.60.1
date	2009.05.04.08.10.37;	author yamt;	state Exp;
branches;
next	1.6.60.2;

1.6.60.2
date	2010.08.11.22.51.38;	author yamt;	state Exp;
branches;
next	;

1.6.68.1
date	2009.04.28.07.33.42;	author skrll;	state Exp;
branches;
next	;

1.6.74.1
date	2009.05.13.17.16.12;	author jym;	state Exp;
branches;
next	;

1.4.4.1
date	2006.09.09.02.37.53;	author rpaulo;	state Exp;
branches;
next	;

1.4.8.1
date	2006.08.11.15.41.10;	author yamt;	state Exp;
branches;
next	1.4.8.2;

1.4.8.2
date	2006.09.03.15.22.42;	author yamt;	state Exp;
branches;
next	;

1.2.2.1
date	2006.06.21.14.49.08;	author yamt;	state Exp;
branches;
next	;

1.2.8.1
date	2005.05.11.16.55.31;	author skrll;	state dead;
branches;
next	1.2.8.2;

1.2.8.2
date	2005.11.10.13.55.09;	author skrll;	state Exp;
branches;
next	;

1.1.2.1
date	2005.04.18.16.27.54;	author kent;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2005.04.29.11.28.02;	author kent;	state Exp;
branches;
next	;


desc
@@


1.20
log
@swap libz and libkern so that libz finds __moddi3().
@
text
@# $NetBSD: Makefile,v 1.19 2024/06/29 08:02:06 rin Exp $

.include <bsd.init.mk>

S!= cd ${.CURDIR}/../../../..; pwd

PROG= boot
MKMAN= no		# defined
STRIPFLAG=
BINMODE= 444

NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrelease.sh

.PATH:		${S}/dev/arcbios

SRCS=	start.S arcbios_calls.S
SRCS+=	boot.c bootinfo.c conf.c devopen.c disk.c getchar.c putchar.c

.include "${S}/dev/arcbios/Makefile.inc"

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBCRTI=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

AFLAGS=    -x assembler-with-cpp -mno-abicalls -mips2 -mabi=32
AFLAGS+=   -D_LOCORE -D_KERNEL
CFLAGS=    -Os -mmemcpy -G 1024
CFLAGS+=   -ffreestanding -mno-abicalls -msoft-float -mips2 -mabi=32
CFLAGS+=   -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
CPPFLAGS+= -nostdinc -I. -I${S}
CPPFLAGS+= -D_STANDALONE -DNO_ABICALLS -D${MACHINE}
CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
#CPPFLAGS+= -DBOOT_DEBUG
LDSCRIPT=  ${S}/arch/mips/conf/stand.ldscript
TEXTADDR=  0x80f00000
LD+=		-m elf32ltsmip

### find out what to use for libsa
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=   ${SALIB}

### find out what to use for libkern
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN= ${KERNLIB}

### find out what to use for libz
.include "${S}/lib/libz/Makefile.inc"
LIBZ=    ${ZLIB}

LIBS=	${LIBSA} ${LIBZ} ${LIBKERN}

cleandir distclean: .WAIT cleanlibdir
cleanlibdir:
	-rm -rf lib

${PROG}: ${OBJS} ${LIBS}
	${LD} -Map ${PROG}.map -N -x -Ttext ${TEXTADDR} -T ${LDSCRIPT} \
	    -e start -o ${PROG}.elf ${OBJS} ${LIBS}
	@@${SIZE} ${PROG}.elf
	${OBJCOPY} --impure -O ecoff-littlemips \
	    -R .pdr -R .mdebug.abi32 -R .comment -R .ident --strip-debug \
	    ${PROG}.elf ${.TARGET}

CLEANFILES+=	${PROG}.elf ${PROG}.map

.include "${S}/conf/newvers_stand.mk"

.include <bsd.klinks.mk>
.include <bsd.prog.mk>
@


1.19
log
@arc: stand: Switch to libsa/getopt, NFCI
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.18 2020/06/03 11:33:38 tsutsui Exp $
d54 1
a54 1
LIBS=  ${LIBSA} ${LIBKERN} ${LIBZ}
@


1.18
log
@Explicitly strip debug info on calling objdump for ecoff boot binaries.

As noted by martin@@ on tech-toolchain@@, release binaries are built
with MKDEBUG=yes so standalone binaries should explicitly remove
debug info generated by -g option.
 https://mail-index.netbsd.org/tech-toolchain/2020/06/02/msg003809.html

Should be pulled up to netbsd-9.
(ARC BIOS gets confused by debug info sections in ecoff binaries
 and boot binary in 9.0 doesn't work)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2017/04/08 19:53:20 christos Exp $
d17 1
a17 1
SRCS+=	boot.c bootinfo.c conf.c devopen.c disk.c getchar.c getopt.c putchar.c
@


1.17
log
@centralize vers.c building for standalone programs.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.16 2016/09/08 14:36:13 christos Exp $
d65 1
a65 1
	    -R .pdr -R .mdebug.abi32 -R .comment -R .ident \
@


1.17.18.1
log
@Pull up following revision(s) (requested by tsutsui in ticket #947):
	sys/arch/arc/stand/boot/Makefile: revision 1.18
Explicitly strip debug info on calling objdump for ecoff boot binaries.
As noted by martin@@ on tech-toolchain@@, release binaries are built
with MKDEBUG=yes so standalone binaries should explicitly remove
debug info generated by -g option.
 https://mail-index.netbsd.org/tech-toolchain/2020/06/02/msg003809.html
Should be pulled up to netbsd-9.
(ARC BIOS gets confused by debug info sections in ecoff binaries
 and boot binary in 9.0 doesn't work)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2017/04/08 19:53:20 christos Exp $
d65 1
a65 1
	    -R .pdr -R .mdebug.abi32 -R .comment -R .ident --strip-debug \
@


1.16
log
@Avoid the PIE
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2014/01/16 01:15:33 christos Exp $
a40 12
# if there is a 'version' file, add rule for vers.c and add it to SRCS
# and CLEANFILES
.if exists(version)
.PHONY: vers.c
vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${.CURDIR}/version ${MACHINE}

SRCS+=	vers.c
CLEANFILES+= vers.c
.endif

d70 2
@


1.16.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2017/04/08 19:53:20 christos Exp $
d41 12
a81 2
.include "${S}/conf/newvers_stand.mk"

@


1.15
log
@eliminate use of bsd.sys.mk from Makefiles
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2014/01/12 15:26:28 tsutsui Exp $
d3 1
a3 1
.include <bsd.own.mk>
@


1.15.10.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2017/04/08 19:53:20 christos Exp $
d41 12
a81 2
.include "${S}/conf/newvers_stand.mk"

@


1.15.6.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.16 2016/09/08 14:36:13 christos Exp $
d3 1
a3 1
.include <bsd.init.mk>
@


1.15.6.2
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15.6.1 2016/10/05 20:55:24 skrll Exp $
d41 12
a81 2
.include "${S}/conf/newvers_stand.mk"

@


1.14
log
@Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2011/07/13 14:09:36 mrg Exp $
a3 1
.include <bsd.sys.mk>	# for ${HOST_SH}
@


1.13
log
@build this as a o32 application.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2011/02/20 07:52:43 matt Exp $
d24 1
@


1.13.12.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
# $NetBSD$
d4 1
a23 1
LIBCRTI=
@


1.13.12.2
log
@update from HEAD
@
text
@d3 1
a3 1
.include <bsd.init.mk>
d41 12
a81 2
.include "${S}/conf/newvers_stand.mk"

@


1.13.2.1
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2011/07/13 14:09:36 mrg Exp $
d4 1
a23 1
LIBCRTI=
@


1.13.16.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2011/07/13 14:09:36 mrg Exp $
d4 1
a23 1
LIBCRTI=
@


1.12
log
@Merge forward from matt-nb5-mips64.
Adapt to new interrupt/spl framework.
Add LP64 support.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2011/01/22 19:19:16 joerg Exp $
d28 1
a28 1
AFLAGS=    -x assembler-with-cpp -mno-abicalls -mips2
d39 1
@


1.11
log
@Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh.  Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2011/01/21 15:59:05 joerg Exp $
d15 3
a17 1
SRCS=	start.S
d20 2
d31 1
a31 1
CFLAGS+=   -ffreestanding -mno-abicalls -msoft-float -mips2
@


1.10
log
@Switch remaining platforms to modern CPP for assembler.
@
text
@d1 1
a1 1
# $NetBSD: src/sys/arch/arc/stand/boot/Makefile,v 1.9 2010-05-27 06:58:12 dholland Exp $
d41 2
a42 1
	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE}
@


1.9
log
@Introduce .WAIT into the cleandir rule for blasting the libsa/libkern/etc.
trees, because it can race with the libsa/libkern/etc. makefiles' own
cleandir rules. I think I've found all of the uses of the offending idiom...
Closes PR 43360.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2009/04/03 10:38:12 tsutsui Exp $
d24 1
a24 1
AFLAGS=    -x assembler-with-cpp -traditional-cpp -mno-abicalls -mips2
@


1.9.2.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2011/02/20 07:52:43 matt Exp $
d15 1
a15 3
.PATH:		${S}/dev/arcbios

SRCS=	start.S arcbios_calls.S
a17 2
.include "${S}/dev/arcbios/Makefile.inc"

d24 1
a24 1
AFLAGS=    -x assembler-with-cpp -mno-abicalls -mips2
d27 1
a27 1
CFLAGS+=   -ffreestanding -mno-abicalls -msoft-float -mips2 -mabi=32
d41 1
a41 2
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${.CURDIR}/version ${MACHINE}
@


1.9.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2011/01/22 19:19:16 joerg Exp $
d24 1
a24 1
AFLAGS=    -x assembler-with-cpp -mno-abicalls -mips2
d41 1
a41 2
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${.CURDIR}/version ${MACHINE}
@


1.9.4.2
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD$
d15 1
a15 3
.PATH:		${S}/dev/arcbios

SRCS=	start.S arcbios_calls.S
a17 2
.include "${S}/dev/arcbios/Makefile.inc"

d27 1
a27 1
CFLAGS+=   -ffreestanding -mno-abicalls -msoft-float -mips2 -mabi=32
@


1.8
log
@Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2009/03/15 13:57:57 tsutsui Exp $
d62 1
a62 1
cleandir distclean: cleanlibdir
@


1.8.2.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
# $NetBSD$
d62 1
a62 1
cleandir distclean: .WAIT cleanlibdir
@


1.8.4.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2009/04/03 10:38:12 tsutsui Exp $
d62 1
a62 1
cleandir distclean: .WAIT cleanlibdir
@


1.8.4.2
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD$
d15 1
a15 3
.PATH:		${S}/dev/arcbios

SRCS=	start.S arcbios_calls.S
a17 2
.include "${S}/dev/arcbios/Makefile.inc"

d24 1
a24 1
AFLAGS=    -x assembler-with-cpp -mno-abicalls -mips2
d27 1
a27 1
CFLAGS+=   -ffreestanding -mno-abicalls -msoft-float -mips2 -mabi=32
d41 1
a41 2
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    ${.CURDIR}/version ${MACHINE}
@


1.7
log
@Use <bsd.klinks.mk> to create MD include dir symlinks.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2006/08/28 13:42:39 tsutsui Exp $
a30 1
CPPFLAGS+= -DLIBSA_USE_MEMSET -DLIBSA_USE_MEMCPY
@


1.6
log
@Revert previous, because header search path for src/common/include is
now handled in src/sys/lib/libkern/Makefile.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2006/07/22 14:11:35 tsutsui Exp $
a36 15
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN: machine mips
.NOPATH: machine mips

machine::
	-rm -f $@@
	ln -s ${S}/arch/${MACHINE}/include $@@

mips::
	-rm -f $@@
	ln -s ${S}/arch/mips/include $@@
.endif

CLEANFILES+= machine mips

d77 1
@


1.6.74.1
log
@Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2009/04/03 10:38:12 tsutsui Exp $
d31 1
d37 15
a91 1
.include <bsd.klinks.mk>
@


1.6.60.1
log
@sync with head.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2006/08/28 13:42:39 tsutsui Exp $
d31 1
d37 15
a91 1
.include <bsd.klinks.mk>
@


1.6.60.2
log
@sync with head.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6.60.1 2009/05/04 08:10:37 yamt Exp $
d62 1
a62 1
cleandir distclean: .WAIT cleanlibdir
@


1.6.68.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2009/04/03 10:38:12 tsutsui Exp $
d31 1
d37 15
a91 1
.include <bsd.klinks.mk>
@


1.5
log
@Add "-I${S}/../common/include" to CPPFLAGS for libprop sources in libkern.

XXX: shouldn't this be handled by sys/lib/libkern/Makefile.inc?
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2005/12/28 08:04:44 skrll Exp $
d29 1
a29 1
CPPFLAGS+= -nostdinc -I. -I${S} -I${S}/../common/include
@


1.4
log
@Don't try and create/cleanup symlinks before objdirs are created.

Doesn't everyone use ro src?
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2005/12/11 12:16:41 christos Exp $
d29 1
a29 1
CPPFLAGS+= -nostdinc -I. -I${S}
@


1.4.4.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2006/08/28 13:42:39 tsutsui Exp $
@


1.4.8.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2005/12/28 08:04:44 skrll Exp $
d29 1
a29 1
CPPFLAGS+= -nostdinc -I. -I${S} -I${S}/../common/include
@


1.4.8.2
log
@sync with head.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4.8.1 2006/08/11 15:41:10 yamt Exp $
d29 1
a29 1
CPPFLAGS+= -nostdinc -I. -I${S}
@


1.3
log
@merge ktrace-lwp.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2.8.1 2005/11/10 13:55:09 skrll Exp $
d37 1
d48 1
@


1.2
log
@Don't need realdepend/realall depends anymore now that .BEGIN is fixed
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2005/04/18 16:27:54 tsutsui Exp $
@


1.2.8.1
log
@file Makefile was added on branch ktrace-lwp on 2005-11-10 13:55:09 +0000
@
text
@d1 90
@


1.2.8.2
log
@Sync with HEAD. Here we go again...
@
text
@a0 90
# $NetBSD: Makefile,v 1.2.8.1 2005/11/10 13:55:09 skrll Exp $

.include <bsd.own.mk>
.include <bsd.sys.mk>	# for ${HOST_SH}

S!= cd ${.CURDIR}/../../../..; pwd

PROG= boot
MKMAN= no		# defined
STRIPFLAG=
BINMODE= 444

NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrelease.sh

SRCS=	start.S
SRCS+=	boot.c bootinfo.c conf.c devopen.c disk.c getchar.c getopt.c putchar.c

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

AFLAGS=    -x assembler-with-cpp -traditional-cpp -mno-abicalls -mips2
AFLAGS+=   -D_LOCORE -D_KERNEL
CFLAGS=    -Os -mmemcpy -G 1024
CFLAGS+=   -ffreestanding -mno-abicalls -msoft-float -mips2
CFLAGS+=   -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
CPPFLAGS+= -nostdinc -I. -I${S}
CPPFLAGS+= -D_STANDALONE -DNO_ABICALLS -D${MACHINE}
CPPFLAGS+= -DLIBSA_USE_MEMSET -DLIBSA_USE_MEMCPY
CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
#CPPFLAGS+= -DBOOT_DEBUG
LDSCRIPT=  ${S}/arch/mips/conf/stand.ldscript
TEXTADDR=  0x80f00000

.BEGIN: machine mips
.NOPATH: machine mips

machine::
	-rm -f $@@
	ln -s ${S}/arch/${MACHINE}/include $@@

mips::
	-rm -f $@@
	ln -s ${S}/arch/mips/include $@@

CLEANFILES+= machine mips

# if there is a 'version' file, add rule for vers.c and add it to SRCS
# and CLEANFILES
.if exists(version)
.PHONY: vers.c
vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE}

SRCS+=	vers.c
CLEANFILES+= vers.c
.endif

### find out what to use for libsa
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=   ${SALIB}

### find out what to use for libkern
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN= ${KERNLIB}

### find out what to use for libz
.include "${S}/lib/libz/Makefile.inc"
LIBZ=    ${ZLIB}

LIBS=  ${LIBSA} ${LIBKERN} ${LIBZ}

cleandir distclean: cleanlibdir
cleanlibdir:
	-rm -rf lib

${PROG}: ${OBJS} ${LIBS}
	${LD} -Map ${PROG}.map -N -x -Ttext ${TEXTADDR} -T ${LDSCRIPT} \
	    -e start -o ${PROG}.elf ${OBJS} ${LIBS}
	@@${SIZE} ${PROG}.elf
	${OBJCOPY} --impure -O ecoff-littlemips \
	    -R .pdr -R .mdebug.abi32 -R .comment -R .ident \
	    ${PROG}.elf ${.TARGET}

CLEANFILES+=	${PROG}.elf ${PROG}.map

.include <bsd.prog.mk>
@


1.2.2.1
log
@sync with head.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2005/05/11 16:55:31 jmc Exp $
a36 1
.if !make(obj) && !make(clean) && !make(cleandir)
a46 1
.endif
@


1.1
log
@Add a long-awaited standalone boot program for arc port to load
ELF kernels instead of booting ECOFF kernels directly by ARCBIOS.
Tested on my NEC-J96A and NEC-JC94, and ok'ed by soda.

XXX: Maybe we should share some of these sources with sgimips
XXX: (in sys/dev/arcbios/stand?)
@
text
@d1 1
a1 1
# $NetBSD$
a38 1
realdepend realall: machine mips
@


1.1.2.1
log
@file Makefile was added on branch kent-audio2 on 2005-04-29 11:28:02 +0000
@
text
@d1 91
@


1.1.2.2
log
@sync with -current
@
text
@a0 91
# $NetBSD: Makefile,v 1.1.2.1 2005/04/29 11:28:02 kent Exp $

.include <bsd.own.mk>
.include <bsd.sys.mk>	# for ${HOST_SH}

S!= cd ${.CURDIR}/../../../..; pwd

PROG= boot
MKMAN= no		# defined
STRIPFLAG=
BINMODE= 444

NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrelease.sh

SRCS=	start.S
SRCS+=	boot.c bootinfo.c conf.c devopen.c disk.c getchar.c getopt.c putchar.c

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

AFLAGS=    -x assembler-with-cpp -traditional-cpp -mno-abicalls -mips2
AFLAGS+=   -D_LOCORE -D_KERNEL
CFLAGS=    -Os -mmemcpy -G 1024
CFLAGS+=   -ffreestanding -mno-abicalls -msoft-float -mips2
CFLAGS+=   -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
CPPFLAGS+= -nostdinc -I. -I${S}
CPPFLAGS+= -D_STANDALONE -DNO_ABICALLS -D${MACHINE}
CPPFLAGS+= -DLIBSA_USE_MEMSET -DLIBSA_USE_MEMCPY
CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
#CPPFLAGS+= -DBOOT_DEBUG
LDSCRIPT=  ${S}/arch/mips/conf/stand.ldscript
TEXTADDR=  0x80f00000

.BEGIN: machine mips
.NOPATH: machine mips
realdepend realall: machine mips

machine::
	-rm -f $@@
	ln -s ${S}/arch/${MACHINE}/include $@@

mips::
	-rm -f $@@
	ln -s ${S}/arch/mips/include $@@

CLEANFILES+= machine mips

# if there is a 'version' file, add rule for vers.c and add it to SRCS
# and CLEANFILES
.if exists(version)
.PHONY: vers.c
vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version ${MACHINE}

SRCS+=	vers.c
CLEANFILES+= vers.c
.endif

### find out what to use for libsa
SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=   ${SALIB}

### find out what to use for libkern
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN= ${KERNLIB}

### find out what to use for libz
.include "${S}/lib/libz/Makefile.inc"
LIBZ=    ${ZLIB}

LIBS=  ${LIBSA} ${LIBKERN} ${LIBZ}

cleandir distclean: cleanlibdir
cleanlibdir:
	-rm -rf lib

${PROG}: ${OBJS} ${LIBS}
	${LD} -Map ${PROG}.map -N -x -Ttext ${TEXTADDR} -T ${LDSCRIPT} \
	    -e start -o ${PROG}.elf ${OBJS} ${LIBS}
	@@${SIZE} ${PROG}.elf
	${OBJCOPY} --impure -O ecoff-littlemips \
	    -R .pdr -R .mdebug.abi32 -R .comment -R .ident \
	    ${PROG}.elf ${.TARGET}

CLEANFILES+=	${PROG}.elf ${PROG}.map

.include <bsd.prog.mk>
@
