head	1.31;
access;
symbols
	netbsd-11-0-RC3:1.29
	netbsd-11-0-RC2:1.29
	netbsd-11-0-RC1:1.29
	perseant-exfatfs-base-20250801:1.29
	netbsd-11:1.29.0.12
	netbsd-11-base:1.29
	netbsd-10-1-RELEASE:1.29
	perseant-exfatfs-base-20240630:1.29
	perseant-exfatfs:1.29.0.10
	perseant-exfatfs-base:1.29
	netbsd-8-3-RELEASE:1.20.48.1
	netbsd-9-4-RELEASE:1.24
	netbsd-10-0-RELEASE:1.29
	netbsd-10-0-RC6:1.29
	netbsd-10-0-RC5:1.29
	netbsd-10-0-RC4:1.29
	netbsd-10-0-RC3:1.29
	netbsd-10-0-RC2:1.29
	thorpej-ifq:1.29.0.8
	thorpej-ifq-base:1.29
	thorpej-altq-separation:1.29.0.6
	thorpej-altq-separation-base:1.29
	netbsd-10-0-RC1:1.29
	netbsd-10:1.29.0.4
	netbsd-10-base:1.29
	bouyer-sunxi-drm:1.29.0.2
	bouyer-sunxi-drm-base:1.29
	netbsd-9-3-RELEASE:1.24
	thorpej-i2c-spi-conf2:1.27.0.16
	thorpej-i2c-spi-conf2-base:1.27
	thorpej-futex2:1.27.0.14
	thorpej-futex2-base:1.27
	thorpej-cfargs2:1.27.0.12
	thorpej-cfargs2-base:1.27
	cjep_sun2x-base1:1.27
	cjep_sun2x:1.27.0.10
	cjep_sun2x-base:1.27
	cjep_staticlib_x-base1:1.27
	netbsd-9-2-RELEASE:1.24
	cjep_staticlib_x:1.27.0.8
	cjep_staticlib_x-base:1.27
	thorpej-i2c-spi-conf:1.27.0.6
	thorpej-i2c-spi-conf-base:1.27
	thorpej-cfargs:1.27.0.4
	thorpej-cfargs-base:1.27
	thorpej-futex:1.27.0.2
	thorpej-futex-base:1.27
	netbsd-9-1-RELEASE:1.24
	bouyer-xenpvh-base2:1.24
	phil-wifi-20200421:1.24
	bouyer-xenpvh-base1:1.24
	phil-wifi-20200411:1.24
	bouyer-xenpvh:1.24.0.10
	bouyer-xenpvh-base:1.24
	is-mlppp:1.24.0.8
	is-mlppp-base:1.24
	phil-wifi-20200406:1.24
	netbsd-8-2-RELEASE:1.20.48.1
	ad-namecache-base3:1.24
	netbsd-9-0-RELEASE:1.24
	netbsd-9-0-RC2:1.24
	ad-namecache-base2:1.24
	ad-namecache-base1:1.24
	ad-namecache:1.24.0.6
	ad-namecache-base:1.24
	netbsd-9-0-RC1:1.24
	phil-wifi-20191119:1.24
	netbsd-9:1.24.0.4
	netbsd-9-base:1.24
	phil-wifi-20190609:1.24
	netbsd-8-1-RELEASE:1.20.48.1
	netbsd-8-1-RC1:1.20.48.1
	isaki-audio2:1.24.0.2
	isaki-audio2-base:1.24
	pgoyette-compat-merge-20190127:1.21.2.2
	pgoyette-compat-20190127:1.24
	pgoyette-compat-20190118:1.24
	pgoyette-compat-1226:1.24
	pgoyette-compat-1126:1.24
	pgoyette-compat-1020:1.24
	pgoyette-compat-0930:1.24
	pgoyette-compat-0906:1.22
	netbsd-7-2-RELEASE:1.20
	pgoyette-compat-0728:1.22
	netbsd-8-0-RELEASE:1.20.48.1
	phil-wifi:1.22.0.2
	phil-wifi-base:1.22
	pgoyette-compat-0625:1.22
	netbsd-8-0-RC2:1.20.48.1
	pgoyette-compat-0521:1.22
	pgoyette-compat-0502:1.22
	pgoyette-compat-0422:1.22
	netbsd-8-0-RC1:1.20.48.1
	pgoyette-compat-0415:1.22
	pgoyette-compat-0407:1.22
	pgoyette-compat-0330:1.22
	pgoyette-compat-0322:1.22
	pgoyette-compat-0315:1.22
	netbsd-7-1-2-RELEASE:1.20
	pgoyette-compat:1.21.0.2
	pgoyette-compat-base:1.21
	netbsd-7-1-1-RELEASE:1.20
	tls-maxphys-base-20171202:1.20
	matt-nb8-mediatek:1.20.0.52
	matt-nb8-mediatek-base:1.20
	nick-nhusb-base-20170825:1.20
	perseant-stdc-iso10646:1.20.0.50
	perseant-stdc-iso10646-base:1.20
	netbsd-8:1.20.0.48
	netbsd-8-base:1.20
	prg-localcount2-base3:1.20
	prg-localcount2-base2:1.20
	prg-localcount2-base1:1.20
	prg-localcount2:1.20.0.46
	prg-localcount2-base:1.20
	pgoyette-localcount-20170426:1.20
	bouyer-socketcan-base1:1.20
	jdolecek-ncq:1.20.0.44
	jdolecek-ncq-base:1.20
	pgoyette-localcount-20170320:1.20
	netbsd-7-1:1.20.0.42
	netbsd-7-1-RELEASE:1.20
	netbsd-7-1-RC2:1.20
	nick-nhusb-base-20170204:1.20
	netbsd-7-nhusb-base-20170116:1.20
	bouyer-socketcan:1.20.0.40
	bouyer-socketcan-base:1.20
	pgoyette-localcount-20170107:1.20
	netbsd-7-1-RC1:1.20
	nick-nhusb-base-20161204:1.20
	pgoyette-localcount-20161104:1.20
	netbsd-7-0-2-RELEASE:1.20
	nick-nhusb-base-20161004:1.20
	localcount-20160914:1.20
	netbsd-7-nhusb:1.20.0.38
	netbsd-7-nhusb-base:1.20
	pgoyette-localcount-20160806:1.20
	pgoyette-localcount-20160726:1.20
	pgoyette-localcount:1.20.0.36
	pgoyette-localcount-base:1.20
	nick-nhusb-base-20160907:1.20
	nick-nhusb-base-20160529:1.20
	netbsd-7-0-1-RELEASE:1.20
	nick-nhusb-base-20160422:1.20
	nick-nhusb-base-20160319:1.20
	nick-nhusb-base-20151226:1.20
	netbsd-7-0:1.20.0.34
	netbsd-7-0-RELEASE:1.20
	nick-nhusb-base-20150921:1.20
	netbsd-7-0-RC3:1.20
	netbsd-7-0-RC2:1.20
	netbsd-7-0-RC1:1.20
	nick-nhusb-base-20150606:1.20
	nick-nhusb-base-20150406:1.20
	nick-nhusb:1.20.0.32
	nick-nhusb-base:1.20
	netbsd-5-2-3-RELEASE:1.19
	netbsd-5-1-5-RELEASE:1.19
	netbsd-6-0-6-RELEASE:1.20
	netbsd-6-1-5-RELEASE:1.20
	netbsd-7:1.20.0.30
	netbsd-7-base:1.20
	yamt-pagecache-base9:1.20
	yamt-pagecache-tag8:1.20
	netbsd-6-1-4-RELEASE:1.20
	netbsd-6-0-5-RELEASE:1.20
	tls-earlyentropy:1.20.0.28
	tls-earlyentropy-base:1.20
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.20
	riastradh-drm2-base3:1.20
	netbsd-6-1-3-RELEASE:1.20
	netbsd-6-0-4-RELEASE:1.20
	netbsd-5-2-2-RELEASE:1.19
	netbsd-5-1-4-RELEASE:1.19
	netbsd-6-1-2-RELEASE:1.20
	netbsd-6-0-3-RELEASE:1.20
	netbsd-5-2-1-RELEASE:1.19
	netbsd-5-1-3-RELEASE:1.19
	rmind-smpnet-nbase:1.20
	netbsd-6-1-1-RELEASE:1.20
	riastradh-drm2-base2:1.20
	riastradh-drm2-base1:1.20
	riastradh-drm2:1.20.0.26
	riastradh-drm2-base:1.20
	rmind-smpnet:1.20.0.18
	rmind-smpnet-base:1.20
	netbsd-6-1:1.20.0.24
	netbsd-6-0-2-RELEASE:1.20
	netbsd-6-1-RELEASE:1.20
	khorben-n900:1.20.0.22
	netbsd-6-1-RC4:1.20
	netbsd-6-1-RC3:1.20
	agc-symver:1.20.0.20
	agc-symver-base:1.20
	netbsd-6-1-RC2:1.20
	netbsd-6-1-RC1:1.20
	yamt-pagecache-base8:1.20
	netbsd-5-2:1.19.0.42
	netbsd-6-0-1-RELEASE:1.20
	yamt-pagecache-base7:1.20
	netbsd-5-2-RELEASE:1.19
	netbsd-5-2-RC1:1.19
	matt-nb6-plus-nbase:1.20
	yamt-pagecache-base6:1.20
	netbsd-6-0:1.20.0.16
	netbsd-6-0-RELEASE:1.20
	netbsd-6-0-RC2:1.20
	tls-maxphys:1.20.0.14
	tls-maxphys-base:1.20
	matt-nb6-plus:1.20.0.12
	matt-nb6-plus-base:1.20
	netbsd-6-0-RC1:1.20
	jmcneill-usbmp-base10:1.20
	yamt-pagecache-base5:1.20
	jmcneill-usbmp-base9:1.20
	yamt-pagecache-base4:1.20
	jmcneill-usbmp-base8:1.20
	jmcneill-usbmp-base7:1.20
	jmcneill-usbmp-base6:1.20
	jmcneill-usbmp-base5:1.20
	jmcneill-usbmp-base4:1.20
	jmcneill-usbmp-base3:1.20
	jmcneill-usbmp-pre-base2:1.20
	jmcneill-usbmp-base2:1.20
	netbsd-6:1.20.0.10
	netbsd-6-base:1.20
	netbsd-5-1-2-RELEASE:1.19
	netbsd-5-1-1-RELEASE:1.19
	jmcneill-usbmp:1.20.0.8
	jmcneill-usbmp-base:1.20
	jmcneill-audiomp3:1.20.0.6
	jmcneill-audiomp3-base:1.20
	yamt-pagecache-base3:1.20
	yamt-pagecache-base2:1.20
	yamt-pagecache:1.20.0.4
	yamt-pagecache-base:1.20
	rmind-uvmplock-nbase:1.20
	cherry-xenmp:1.20.0.2
	cherry-xenmp-base:1.20
	uebayasi-xip-base7:1.20
	bouyer-quota2-nbase:1.20
	bouyer-quota2:1.19.0.40
	bouyer-quota2-base:1.20
	jruoho-x86intr:1.19.0.38
	jruoho-x86intr-base:1.19
	matt-mips64-premerge-20101231:1.19
	matt-nb5-mips64-premerge-20101231:1.19
	matt-nb5-pq3:1.19.0.36
	matt-nb5-pq3-base:1.19
	netbsd-5-1:1.19.0.34
	uebayasi-xip-base6:1.19
	uebayasi-xip-base5:1.19
	netbsd-5-1-RELEASE:1.19
	uebayasi-xip-base4:1.19
	uebayasi-xip-base3:1.19
	yamt-nfs-mp-base11:1.19
	netbsd-5-1-RC4:1.19
	matt-nb5-mips64-k15:1.19
	uebayasi-xip-base2:1.19
	yamt-nfs-mp-base10:1.19
	netbsd-5-1-RC3:1.19
	netbsd-5-1-RC2:1.19
	uebayasi-xip-base1:1.19
	netbsd-5-1-RC1:1.19
	rmind-uvmplock:1.19.0.32
	rmind-uvmplock-base:1.20
	yamt-nfs-mp-base9:1.19
	uebayasi-xip:1.19.0.30
	uebayasi-xip-base:1.19
	netbsd-5-0-2-RELEASE:1.19
	matt-nb5-mips64-premerge-20091211:1.19
	matt-premerge-20091211:1.19
	yamt-nfs-mp-base8:1.19
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.19
	matt-nb4-mips64-k7-u2a-k9b:1.19
	matt-nb5-mips64-u1-k1-k5:1.19
	yamt-nfs-mp-base7:1.19
	matt-nb5-mips64:1.19.0.28
	netbsd-5-0-1-RELEASE:1.19
	jymxensuspend-base:1.19
	yamt-nfs-mp-base6:1.19
	yamt-nfs-mp-base5:1.19
	yamt-nfs-mp-base4:1.19
	jym-xensuspend-nbase:1.20
	yamt-nfs-mp-base3:1.19
	nick-hppapmap-base4:1.19
	nick-hppapmap-base3:1.19
	netbsd-5-0:1.19.0.26
	netbsd-5-0-RELEASE:1.19
	netbsd-5-0-RC4:1.19
	netbsd-5-0-RC3:1.19
	nick-hppapmap-base2:1.19
	netbsd-5-0-RC2:1.19
	jym-xensuspend:1.19.0.24
	jym-xensuspend-base:1.20
	netbsd-5-0-RC1:1.19
	haad-dm-base2:1.19
	haad-nbase2:1.19
	ad-audiomp2:1.19.0.22
	ad-audiomp2-base:1.19
	netbsd-5:1.19.0.20
	netbsd-5-base:1.19
	nick-hppapmap:1.19.0.18
	nick-hppapmap-base:1.19
	matt-mips64-base2:1.19
	haad-dm-base1:1.19
	wrstuden-revivesa-base-4:1.19
	netbsd-4-0-1-RELEASE:1.18
	wrstuden-revivesa-base-3:1.19
	wrstuden-revivesa-base-2:1.19
	wrstuden-fixsa-newbase:1.18
	nick-csl-alignment-base5:1.18
	haad-dm:1.19.0.16
	haad-dm-base:1.19
	wrstuden-revivesa-base-1:1.19
	simonb-wapbl-nbase:1.19
	yamt-pf42-base4:1.19
	simonb-wapbl:1.19.0.14
	simonb-wapbl-base:1.19
	yamt-pf42-base3:1.19
	hpcarm-cleanup-nbase:1.19
	yamt-pf42-baseX:1.19
	yamt-pf42-base2:1.19
	yamt-nfs-mp-base2:1.19
	wrstuden-revivesa:1.19.0.12
	wrstuden-revivesa-base:1.19
	yamt-nfs-mp:1.19.0.10
	yamt-nfs-mp-base:1.19
	yamt-pf42:1.19.0.8
	yamt-pf42-base:1.19
	ad-socklock-base1:1.19
	yamt-lazymbuf-base15:1.19
	yamt-lazymbuf-base14:1.19
	keiichi-mipv6-nbase:1.19
	mjf-devfs2:1.19.0.6
	mjf-devfs2-base:1.19
	nick-net80211-sync:1.19.0.4
	nick-net80211-sync-base:1.19
	keiichi-mipv6:1.19.0.2
	keiichi-mipv6-base:1.19
	bouyer-xeni386-merge1:1.18
	matt-armv6-prevmlocking:1.18
	wrstuden-fixsa-base-1:1.18
	vmlocking2-base3:1.18
	netbsd-4-0:1.18.0.68
	netbsd-4-0-RELEASE:1.18
	bouyer-xeni386-nbase:1.19
	yamt-kmem-base3:1.18
	cube-autoconf:1.18.0.66
	cube-autoconf-base:1.18
	yamt-kmem-base2:1.18
	bouyer-xeni386:1.18.0.64
	bouyer-xeni386-base:1.18
	yamt-kmem:1.18.0.62
	yamt-kmem-base:1.18
	vmlocking2-base2:1.18
	reinoud-bufcleanup-nbase:1.18
	vmlocking2:1.18.0.60
	vmlocking2-base1:1.18
	netbsd-4-0-RC5:1.18
	matt-nb4-arm:1.18.0.58
	matt-nb4-arm-base:1.18
	matt-armv6-nbase:1.19
	jmcneill-base:1.18
	netbsd-4-0-RC4:1.18
	mjf-devfs:1.18.0.56
	mjf-devfs-base:1.19
	bouyer-xenamd64-base2:1.18
	vmlocking-nbase:1.18
	yamt-x86pmap-base4:1.18
	bouyer-xenamd64:1.18.0.54
	bouyer-xenamd64-base:1.18
	netbsd-4-0-RC3:1.18
	yamt-x86pmap-base3:1.18
	yamt-x86pmap-base2:1.18
	netbsd-4-0-RC2:1.18
	yamt-x86pmap:1.18.0.52
	yamt-x86pmap-base:1.18
	netbsd-4-0-RC1:1.18
	matt-armv6:1.18.0.50
	matt-armv6-base:1.18
	jmcneill-pm:1.18.0.48
	jmcneill-pm-base:1.18
	hpcarm-cleanup:1.18.0.46
	hpcarm-cleanup-base:1.19
	nick-csl-alignment:1.18.0.44
	nick-csl-alignment-base:1.18
	matt-mips64:1.18.0.42
	matt-mips64-base:1.18
	netbsd-3-1-1-RELEASE:1.16
	netbsd-3-0-3-RELEASE:1.16
	yamt-idlelwp-base8:1.18
	wrstuden-fixsa:1.18.0.40
	wrstuden-fixsa-base:1.18
	ppcoea-renovation:1.18.0.38
	ppcoea-renovation-base:1.18
	thorpej-atomic:1.18.0.36
	thorpej-atomic-base:1.18
	reinoud-bufcleanup:1.18.0.34
	reinoud-bufcleanup-base:1.18
	mjf-ufs-trans:1.18.0.32
	mjf-ufs-trans-base:1.18
	vmlocking:1.18.0.30
	vmlocking-base:1.18
	ad-audiomp:1.18.0.28
	ad-audiomp-base:1.18
	yamt-idlelwp:1.18.0.26
	post-newlock2-merge:1.18
	newlock2-nbase:1.18
	yamt-splraiseipl-base5:1.18
	yamt-splraiseipl-base4:1.18
	yamt-splraiseipl-base3:1.18
	abandoned-netbsd-4-base:1.18
	abandoned-netbsd-4:1.18.0.18
	netbsd-3-1:1.16.0.14
	netbsd-3-1-RELEASE:1.16
	netbsd-3-0-2-RELEASE:1.16
	yamt-splraiseipl-base2:1.18
	netbsd-3-1-RC4:1.16
	yamt-splraiseipl:1.18.0.22
	yamt-splraiseipl-base:1.18
	netbsd-3-1-RC3:1.16
	yamt-pdpolicy-base9:1.18
	newlock2:1.18.0.20
	newlock2-base:1.18
	yamt-pdpolicy-base8:1.18
	netbsd-3-1-RC2:1.16
	netbsd-3-1-RC1:1.16
	yamt-pdpolicy-base7:1.18
	netbsd-4:1.18.0.24
	netbsd-4-base:1.18
	yamt-pdpolicy-base6:1.18
	chap-midi-nbase:1.18
	netbsd-3-0-1-RELEASE:1.16
	gdamore-uart:1.18.0.16
	gdamore-uart-base:1.18
	simonb-timcounters-final:1.18
	yamt-pdpolicy-base5:1.18
	chap-midi:1.18.0.14
	chap-midi-base:1.18
	yamt-pdpolicy-base4:1.18
	yamt-pdpolicy-base3:1.18
	peter-altq-base:1.18
	peter-altq:1.18.0.12
	yamt-pdpolicy-base2:1.18
	elad-kernelauth-base:1.18
	elad-kernelauth:1.18.0.10
	yamt-pdpolicy:1.18.0.8
	yamt-pdpolicy-base:1.18
	yamt-uio_vmspace-base5:1.18
	simonb-timecounters:1.18.0.6
	simonb-timecounters-base:1.18
	rpaulo-netinet-merge-pcb:1.18.0.4
	rpaulo-netinet-merge-pcb-base:1.18
	yamt-uio_vmspace:1.18.0.2
	netbsd-3-0:1.16.0.12
	netbsd-3-0-RELEASE:1.16
	netbsd-3-0-RC6:1.16
	yamt-readahead-base3:1.17
	netbsd-3-0-RC5:1.16
	netbsd-3-0-RC4:1.16
	netbsd-3-0-RC3:1.16
	yamt-readahead-base2:1.17
	netbsd-3-0-RC2:1.16
	yamt-readahead-pervnode:1.17
	yamt-readahead-perfile:1.17
	yamt-readahead:1.17.0.8
	yamt-readahead-base:1.17
	netbsd-3-0-RC1:1.16
	yamt-vop-base3:1.17
	netbsd-2-0-3-RELEASE:1.15
	netbsd-2-1:1.15.10.1.0.2
	yamt-vop-base2:1.17
	thorpej-vnode-attr:1.17.0.6
	thorpej-vnode-attr-base:1.17
	netbsd-2-1-RELEASE:1.15.10.1
	yamt-vop:1.17.0.4
	yamt-vop-base:1.17
	netbsd-2-1-RC6:1.15.10.1
	netbsd-2-1-RC5:1.15.10.1
	netbsd-2-1-RC4:1.15.10.1
	netbsd-2-1-RC3:1.15.10.1
	netbsd-2-1-RC2:1.15.10.1
	netbsd-2-1-RC1:1.15.10.1
	yamt-lazymbuf:1.17.0.2
	yamt-km-base4:1.16
	netbsd-2-0-2-RELEASE:1.15
	yamt-km-base3:1.16
	netbsd-3:1.16.0.10
	netbsd-3-base:1.16
	yamt-km-base2:1.16
	yamt-km:1.16.0.6
	yamt-km-base:1.16
	kent-audio2:1.16.0.4
	kent-audio2-base:1.16
	netbsd-2-0-1-RELEASE:1.15
	kent-audio1-beforemerge:1.16
	netbsd-2:1.15.0.10
	netbsd-2-base:1.15
	kent-audio1:1.16.0.2
	kent-audio1-base:1.16
	netbsd-2-0-RELEASE:1.15
	netbsd-2-0-RC5:1.15
	netbsd-2-0-RC4:1.15
	netbsd-2-0-RC3:1.15
	netbsd-2-0-RC2:1.15
	netbsd-2-0-RC1:1.15
	netbsd-2-0:1.15.0.8
	netbsd-2-0-base:1.15
	netbsd-1-6-PATCH002-RELEASE:1.12
	netbsd-1-6-PATCH002:1.12
	netbsd-1-6-PATCH002-RC4:1.12
	netbsd-1-6-PATCH002-RC3:1.12
	netbsd-1-6-PATCH002-RC2:1.12
	netbsd-1-6-PATCH002-RC1:1.12
	ktrace-lwp:1.15.0.6
	ktrace-lwp-base:1.17
	netbsd-1-6-PATCH001:1.12
	netbsd-1-6-PATCH001-RELEASE:1.12
	netbsd-1-6-PATCH001-RC3:1.12
	netbsd-1-6-PATCH001-RC2:1.12
	netbsd-1-6-PATCH001-RC1:1.12
	nathanw_sa_end:1.7.2.6
	nathanw_sa_before_merge:1.15
	fvdl_fs64_base:1.15
	gmcgarry_ctxsw:1.15.0.4
	gmcgarry_ctxsw_base:1.15
	gmcgarry_ucred:1.15.0.2
	gmcgarry_ucred_base:1.15
	nathanw_sa_base:1.15
	kqueue-aftermerge:1.14
	kqueue-beforemerge:1.14
	netbsd-1-6-RELEASE:1.12
	netbsd-1-6-RC3:1.12
	netbsd-1-6-RC2:1.12
	netbsd-1-6-RC1:1.12
	netbsd-1-6:1.12.0.10
	netbsd-1-6-base:1.12
	gehenna-devsw:1.12.0.8
	gehenna-devsw-base:1.13
	eeh-devprop:1.12.0.6
	eeh-devprop-base:1.12
	newlock:1.12.0.4
	newlock-base:1.12
	ifpoll-base:1.12
	nathanw_sa:1.7.0.2
	thorpej-mips-cache:1.6.0.2
	thorpej-mips-cache-base:1.7
	thorpej-devvp-base3:1.5
	thorpej-devvp-base2:1.5
	post-chs-ubcperf:1.5
	pre-chs-ubcperf:1.5
	thorpej-devvp:1.5.0.2
	thorpej-devvp-base:1.5
	kqueue:1.4.0.2
	kqueue-base:1.13
	thorpej_scsipi_beforemerge:1.2
	thorpej_scsipi_base:1.2
	thorpej_scsipi:1.2.0.2
	thorpej_scsipi_nbase:1.2;
locks; strict;
comment	@# @;


1.31
date	2026.04.20.09.47.46;	author thorpej;	state Exp;
branches;
next	1.30;
commitid	gHqDysuna5nrhGCG;

1.30
date	2026.03.21.20.14.57;	author thorpej;	state Exp;
branches;
next	1.29;
commitid	etOtJrKRuTo8ISyG;

1.29
date	2021.08.30.19.01.05;	author christos;	state Exp;
branches;
next	1.28;
commitid	4yU6IbJ2xdZkN17D;

1.28
date	2021.08.30.18.59.57;	author christos;	state Exp;
branches;
next	1.27;
commitid	b2QyFTIz0PymM17D;

1.27
date	2020.10.05.10.42.53;	author rin;	state Exp;
branches;
next	1.26;
commitid	JqRBAsnyfWV2CHqC;

1.26
date	2020.09.08.00.51.29;	author mrg;	state Exp;
branches;
next	1.25;
commitid	PbCwtlZsoPEZcbnC;

1.25
date	2020.08.10.06.28.42;	author rin;	state Exp;
branches;
next	1.24;
commitid	b9vvANiaupvv0ujC;

1.24
date	2018.09.22.12.24.03;	author rin;	state Exp;
branches;
next	1.23;
commitid	oPiNEJ7VnAF626TA;

1.23
date	2018.09.22.12.05.52;	author rin;	state Exp;
branches;
next	1.22;
commitid	sncfykYl9apYY5TA;

1.22
date	2018.03.07.15.20.50;	author maya;	state Exp;
branches
	1.22.2.1;
next	1.21;
commitid	a4LWikazEgMDsxtA;

1.21
date	2018.03.03.03.19.18;	author mrg;	state Exp;
branches
	1.21.2.1;
next	1.20;
commitid	4FOCjkpZe79HAXsA;

1.20
date	2011.01.21.15.59.09;	author joerg;	state Exp;
branches
	1.20.48.1;
next	1.19;

1.19
date	2008.01.22.15.24.50;	author joerg;	state Exp;
branches
	1.19.32.1
	1.19.38.1
	1.19.40.1;
next	1.18;

1.18
date	2005.12.11.12.19.16;	author christos;	state Exp;
branches
	1.18.50.1
	1.18.56.1
	1.18.64.1;
next	1.17;

1.17
date	2005.05.31.04.03.11;	author christos;	state Exp;
branches
	1.17.2.1;
next	1.16;

1.16
date	2004.06.04.04.45.51;	author thorpej;	state Exp;
branches;
next	1.15;

1.15
date	2002.11.26.18.51.17;	author thorpej;	state Exp;
branches
	1.15.6.1
	1.15.10.1;
next	1.14;

1.14
date	2002.10.20.02.37.33;	author chs;	state Exp;
branches;
next	1.13;

1.13
date	2002.06.04.21.39.12;	author thorpej;	state Exp;
branches;
next	1.12;

1.12
date	2002.01.28.21.29.46;	author thorpej;	state Exp;
branches
	1.12.8.1;
next	1.11;

1.11
date	2001.12.01.15.23.18;	author fredette;	state Exp;
branches;
next	1.10;

1.10
date	2001.11.30.15.54.33;	author fredette;	state Exp;
branches;
next	1.9;

1.9
date	2001.11.20.12.56.40;	author lukem;	state Exp;
branches;
next	1.8;

1.8
date	2001.11.20.08.43.38;	author lukem;	state Exp;
branches;
next	1.7;

1.7
date	2001.10.26.06.45.40;	author jmc;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2001.10.23.19.26.46;	author thorpej;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2001.09.06.20.04.16;	author fredette;	state Exp;
branches;
next	1.4;

1.4
date	2001.06.27.17.03.10;	author fredette;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2001.05.29.02.20.26;	author mrg;	state Exp;
branches;
next	1.2;

1.2
date	2001.04.06.17.17.58;	author fredette;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2001.03.29.21.07.58;	author fredette;	state Exp;
branches;
next	;

1.22.2.1
date	2019.06.10.22.06.48;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;

1.21.2.1
date	2018.03.15.09.12.04;	author pgoyette;	state Exp;
branches;
next	1.21.2.2;
commitid	lb7w3QtkrVH4axuA;

1.21.2.2
date	2018.09.30.01.45.47;	author pgoyette;	state Exp;
branches;
next	;
commitid	SQ44grEPCeKPh4UA;

1.20.48.1
date	2018.04.12.14.10.57;	author martin;	state Exp;
branches;
next	;
commitid	G5lNntxdirZ7V9yA;

1.19.32.1
date	2011.03.05.20.52.10;	author rmind;	state Exp;
branches;
next	;

1.19.38.1
date	2011.06.06.09.06.54;	author jruoho;	state Exp;
branches;
next	;

1.19.40.1
date	2011.02.08.16.19.42;	author bouyer;	state Exp;
branches;
next	;

1.18.50.1
date	2008.03.23.02.04.24;	author matt;	state Exp;
branches;
next	;

1.18.56.1
date	2008.02.18.21.05.07;	author mjf;	state Exp;
branches;
next	;

1.18.64.1
date	2008.01.23.19.27.26;	author bouyer;	state Exp;
branches;
next	;

1.17.2.1
date	2008.02.04.09.22.36;	author yamt;	state Exp;
branches;
next	;

1.15.6.1
date	2004.08.03.10.41.48;	author skrll;	state Exp;
branches;
next	1.15.6.2;

1.15.6.2
date	2004.09.18.14.41.28;	author skrll;	state Exp;
branches;
next	1.15.6.3;

1.15.6.3
date	2004.09.21.13.23.07;	author skrll;	state Exp;
branches;
next	1.15.6.4;

1.15.6.4
date	2005.11.10.13.59.38;	author skrll;	state Exp;
branches;
next	;

1.15.10.1
date	2005.02.06.07.45.26;	author jmc;	state Exp;
branches;
next	;

1.12.8.1
date	2002.07.15.01.22.05;	author gehenna;	state Exp;
branches;
next	;

1.7.2.1
date	2001.10.26.06.45.40;	author nathanw;	state dead;
branches;
next	1.7.2.2;

1.7.2.2
date	2002.01.08.00.28.07;	author nathanw;	state Exp;
branches;
next	1.7.2.3;

1.7.2.3
date	2002.02.28.04.12.20;	author nathanw;	state Exp;
branches;
next	1.7.2.4;

1.7.2.4
date	2002.06.20.03.41.37;	author nathanw;	state Exp;
branches;
next	1.7.2.5;

1.7.2.5
date	2002.11.11.22.05.02;	author nathanw;	state Exp;
branches;
next	1.7.2.6;

1.7.2.6
date	2002.12.11.06.12.31;	author thorpej;	state Exp;
branches;
next	;

1.6.2.1
date	2001.11.12.21.17.36;	author thorpej;	state Exp;
branches;
next	;

1.4.2.1
date	2001.09.13.01.14.45;	author thorpej;	state Exp;
branches;
next	1.4.2.2;

1.4.2.2
date	2002.01.10.19.49.34;	author thorpej;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	2002.02.11.20.09.14;	author jdolecek;	state Exp;
branches;
next	1.4.2.4;

1.4.2.4
date	2002.06.23.17.42.28;	author jdolecek;	state Exp;
branches;
next	;

1.2.2.1
date	2001.04.06.17.17.58;	author bouyer;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2001.04.21.17.54.46;	author bouyer;	state Exp;
branches;
next	;


desc
@@


1.31
log
@Re-factor genassym.cf into common m68k definitions and platform-specific
ones.
@
text
@# $NetBSD: Makefile.sun2,v 1.30 2026/03/21 20:14:57 thorpej Exp $

# Makefile for NetBSD
#
# This makefile is constructed from a machine description:
#	config machineid
# Most changes should be made in the machine description
#	/sys/arch/sun2/conf/``machineid''
# after which you should do
#	config machineid
# Machine generic makefile changes should be made in
#	/sys/arch/sun2/conf/Makefile.sun2
# after which config should be rerun for all machines of that type.
#
# To specify debugging, add the config line: makeoptions DEBUG="-g"
# A better way is to specify -g only for a few files.
#
#	makeoptions DEBUGLIST="uvm* trap if_*"

MACHINE_ARCH=m68000
USETOOLS?=	no
NEED_OWN_INSTALL_TARGET?=no
.include <bsd.own.mk>

##
## (1) port identification
##
SUN2=		$S/arch/sun2
GENASSYM_CONF=	$S/arch/m68k/m68k/genassym.cf
GENASSYM_EXTRAS+= ${SUN2}/sun2/genassym.cf

##
## (2) compile settings
##
CPPFLAGS+=	-Dsun2
CFLAGS+=	-msoft-float -fno-defer-pop
AFLAGS+=	-x assembler-with-cpp

# XXX
COPTS.promlib.c+=${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=array-bounds :}

##
## (3) libkern and compat
##
OPT_MODULAR=	%MODULAR%
# XXX lib/libkern/arch/m68k/Makefile.inc needs to know that
# XXX our MACHINE_ARCH is m68000, and not m68k.  --fredette
KERNMISCMAKEFLAGS=	MACHINE_ARCH=${MACHINE_ARCH}

##
## (4) local objects, compile rules, and dependencies
##
.include "$S/arch/m68k/conf/Makefile.kern.m68k.inc"

MD_OBJS=	locore.o
MD_CFILES=
MD_SFILES=	${SUN2}/sun2/locore.s

locore.o: ${SUN2}/sun2/locore.s
	${NORMAL_S}

##
## (5) link settings
##
LINKFORMAT=	-N
TEXTADDR?=	00006000

##
## (6) port specific target dependencies
##

# For cross-compilation, the "gcc -M" mkdep script is convenient,
# but that does not correctly make rules from *.s files.  The
# easiest work-around is to just list those dependencies here.
locore.o:   assym.h m68k/asm.h m68k/trap.h
copy.o:     assym.h m68k/asm.h $S/sys/errno.h
bcopy.o:    assym.h m68k/asm.h
copypage.o: assym.h m68k/asm.h
lock_stubs.o: assym.h

# depend on CPU configuration
db_machdep.o dvma.o machdep.o pmap.o sun2_startup.o vm_machdep.o: Makefile

# depends on DDB, etc.
stub.o: Makefile

##
## (7) misc settings
##

##
## (8) config(8) generated machinery
##
%INCLUDES

%OBJS

%CFILES

%SFILES

%LOAD

%RULES

##
## (9) port independent kernel machinery
##
.include "$S/conf/Makefile.kern.inc"

##
## (10) Appending make options.
##
%MAKEOPTIONSAPPEND
@


1.30
log
@Re-factor m68k FP exception handling:

- Move the FP exception stubs into the shared trap_subr.s.  Remove as
  many conditionals from the stubs as feasible, having separate stubs
  for each case that needs to be handled.  This doesn't really result
  in any more (or duplicated) code, and makes it all a lot easier to
  read.
- All platforms now call the new fpu_init() function, which is renamed
  from fpu_probe(), and centralizes all of the FP-related initialization.
  Platforms that don't need to probe for the FPU aren't forced to do so;
  the probe only occurs if the fputype is FPU_UNKNOWN at the time fpu_init()
  is called.
- Even on platforms that don't actually need to probe the FPU, make sure
  the "nofault" code is present in trap() to do so; this is meant to reduce
  diffs that need to be resolved later then the trap() function is re-factored.

- On Amiga and Atari, remove the bespoke vectab code and just use the shared
  vec_init().  Additional cleanup is possible in this area.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.29 2021/08/30 19:01:05 christos Exp $
d29 2
a30 1
GENASSYM_CONF=	${SUN2}/sun2/genassym.cf
@


1.29
log
@Only use the ldscript for the RAMDISK kernel for now.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.28 2021/08/30 18:59:57 christos Exp $
d52 2
@


1.28
log
@use -ffunction-sections -fdata-sections --gc-sections with an ldscript
that keeps _start. This deletes all unused code and shrinks the RAMDISK
kernel enough to be able to boot again:

-rwxr-xr-x  1 root  src  2519436 Aug 30 06:38 RAMDISK.1/netbsd*
-rwxr-xr-x  1 root  src  2104440 Aug 30 07:41 RAMDISK/netbsd*

   text    data     bss     dec     hex filename
   1525412  686252   63552 2275216  22b790 RAMDISK.1/netbsd
   1098524  686400   67008 1851932  1c421c RAMDISK/netbsd
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.27 2020/10/05 10:42:53 rin Exp $
a36 2
KERNLDSCRIPT?= ${SUN2}/conf/kern.ldscript

@


1.27
log
@Kernel without -fno-omit-frame-pointer works fine now, both for GCC8 and 9.
Not sure which commit ``fixed'' the problem although...
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.26 2020/09/08 00:51:29 mrg Exp $
d37 2
@


1.26
log
@don't warn about array bounds for dodgy diagnostic code.
fixes gcc9 builds.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.25 2020/08/10 06:28:42 rin Exp $
a38 1
COPTS+=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -fno-omit-frame-pointer :}
@


1.25
log
@Compile sun2 kernel with -fno-omit-frame-pointer for GCC8 as a work
around for reproducible kernel freezes just after ``Starting postfix.'',
where I cannot even enter DDB nor obtain crash dump.

I still haven't figured out why. Possibly something wrong with -Os
optimization level for GCC/m68k, cf.,
http://mail-index.netbsd.org/port-sun3/2020/07/19/msg000166.html
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.24 2018/09/22 12:24:03 rin Exp $
d39 2
a40 3
.if ${HAVE_GCC:U0} >= 8
COPTS+=		-fno-omit-frame-pointer
.endif
@


1.24
log
@- Determine KERN_AS automatically depending on whether OPT_MODULAR is
  set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

Now, KERN_AS=library is used for kernels without module(7) for all ports.

OK christos
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.23 2018/09/22 12:05:52 rin Exp $
d38 5
@


1.23
log
@No need to specify COMPAT_AS anymore.
Now, it is automatically determined from OPT_MODULAR.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.22 2018/03/07 15:20:50 maya Exp $
a41 5
.if !empty(OPT_MODULAR)
KERN_AS=	obj
.else
KERN_AS=	library
.endif
@


1.22
log
@Remove more unused functions with COMPAT_AS=library
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.21 2018/03/03 03:19:18 mrg Exp $
a43 1
COMPAT_AS=	obj
a45 1
COMPAT_AS=	library
@


1.22.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.24 2018/09/22 12:24:03 rin Exp $
d42 7
@


1.21
log
@sun2/sun3:
- build libkern as an archive for non modular builds.  from maya@@
sun3:
- cut down GENERIC a bunch to bring below 2MB.
- reduce UBC_NWINS, MAXEXEC, and PAGER_MAP_DEFAULT_SIZE to recover
  enough lost VA to actually run basic tests.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.20 2011/01/21 15:59:09 joerg Exp $
d41 1
a41 1
OPT_MODULAR=   %MODULAR%
d43 2
a44 1
KERN_AS=       obj
d46 2
a47 1
KERN_AS=       library
@


1.21.2.1
log
@Synch with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.22 2018/03/07 15:20:50 maya Exp $
d41 1
a41 1
OPT_MODULAR=	%MODULAR%
d43 1
a43 2
KERN_AS=	obj
COMPAT_AS=	obj
d45 1
a45 2
KERN_AS=	library
COMPAT_AS=	library
@


1.21.2.2
log
@Ssync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.24 2018/09/22 12:24:03 rin Exp $
d42 7
@


1.20
log
@Switch remaining platforms to modern CPP for assembler.
@
text
@d1 1
a1 1
# $NetBSD: src/sys/arch/sun2/conf/Makefile.sun2,v 1.19 2008-01-22 15:24:50 joerg Exp $
d41 6
a46 1
KERN_AS=	obj
@


1.20.48.1
log
@Pull up following revision(s) (requested by mrg in ticket #746):

	sys/arch/sun2/conf/Makefile.sun2: revision 1.21-1.22

sun2/sun3:
- build libkern as an archive for non modular builds.  from maya@@
sun3:
- cut down GENERIC a bunch to bring below 2MB.
- reduce UBC_NWINS, MAXEXEC, and PAGER_MAP_DEFAULT_SIZE to recover
  enough lost VA to actually run basic tests.

Remove more unused functions with COMPAT_AS=library
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.20 2011/01/21 15:59:09 joerg Exp $
a40 2
OPT_MODULAR=	%MODULAR%
.if !empty(OPT_MODULAR)
a41 5
COMPAT_AS=	obj
.else
KERN_AS=	library
COMPAT_AS=	library
.endif
@


1.19
log
@Missing assym.h dependency.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.18 2005/12/11 12:19:16 christos Exp $
d36 1
a36 1
AFLAGS+=	-x assembler-with-cpp -traditional-cpp
@


1.19.38.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.20 2011/01/21 15:59:09 joerg Exp $
d36 1
a36 1
AFLAGS+=	-x assembler-with-cpp
@


1.19.32.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD$
d36 1
a36 1
AFLAGS+=	-x assembler-with-cpp
@


1.19.40.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.20 2011/01/21 15:59:09 joerg Exp $
d36 1
a36 1
AFLAGS+=	-x assembler-with-cpp
@


1.18
log
@merge ktrace-lwp.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.15.6.4 2005/11/10 13:59:38 skrll Exp $
d73 1
@


1.18.50.1
log
@sync with HEAD
@
text
@d1 1
a1 1
# Makefile.sun2,v 1.18 2005/12/11 12:19:16 christos Exp
a72 1
lock_stubs.o: assym.h
@


1.18.56.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.19 2008/01/22 15:24:50 joerg Exp $
a72 1
lock_stubs.o: assym.h
@


1.18.64.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
# $NetBSD$
a72 1
lock_stubs.o: assym.h
@


1.17
log
@s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.16 2004/06/04 04:45:51 thorpej Exp $
@


1.17.2.1
log
@sync with head.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.17 2005/05/31 04:03:11 christos Exp $
a72 1
lock_stubs.o: assym.h
@


1.16
log
@Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.15 2002/11/26 18:51:17 thorpej Exp $
d29 1
a29 1
GENASSYM=	${SUN2}/sun2/genassym.cf
@


1.15
log
@The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.14 2002/10/20 02:37:33 chs Exp $
d103 5
@


1.15.10.1
log
@Pull up patch (requested by martti in ticket #1086)
Move ipf to sys/dist/ipf and sync w. trunk
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.15 2002/11/26 18:51:17 thorpej Exp $
a102 5

##
## (10) IPF source directory
##
CPPFLAGS+=	-I$S/dist/ipf
@


1.15.6.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.16 2004/06/04 04:45:51 thorpej Exp $
a102 5

##
## (10) Appending make options.
##
%MAKEOPTIONSAPPEND
@


1.15.6.2
log
@Sync with HEAD.
@
text
@@


1.15.6.3
log
@Fix the sync with head I botched.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.15.6.1 2004/08/03 10:41:48 skrll Exp $
@


1.15.6.4
log
@Sync with HEAD. Here we go again...
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.15.6.3 2004/09/21 13:23:07 skrll Exp $
d29 1
a29 1
GENASSYM_CONF=	${SUN2}/sun2/genassym.cf
@


1.14
log
@merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
 - use m68k/cacheops.*, remove duplicates from cpu.h.
 - centralize a few declarations in (all the copies of) cpu.h.
 - define M68K_VAC on platforms which have a VAC.
 - switch the sun platforms to the (now common) proc_trampoline().
 - do the phys_map thang on the sun platforms too, no reason not to.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.13 2002/06/04 21:39:12 thorpej Exp $
a35 3
.if defined(HAVE_GCC3)
AFLAGS+=	-x assembler-with-cpp
.else
a36 1
.endif
@


1.13
log
@Don't use -traditional-cpp if HAVE_GCC3.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.12 2002/01/28 21:29:46 thorpej Exp $
d20 1
@


1.12
log
@Clean up CPP flags.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.11 2001/12/01 15:23:18 fredette Exp $
a32 2
# Override CPP defaults entirely, so cross-compilation works.
# Keep -nostdinc before all -I flags, similar for -undef ...
d35 5
a39 7
APPFLAGS=	-x assembler-with-cpp -P -traditional ${CPPFLAGS} -D_LOCORE

# Do NOT assume the compiler does "-x funny_format" (gcc-specific)
# This needs an intermediate file.  The original file is always
# safe in some far away directory, so just use the base name.
NORMAL_S=	${CPP} ${APPFLAGS} $< > $*.s ;\
		${AS} -o $@@ $*.s ; rm $*.s
a85 1
MKDEP_AFLAGS=	${APPFLAGS}
@


1.12.8.1
log
@catch up with -current.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.13 2002/06/04 21:39:12 thorpej Exp $
d33 2
d37 7
a43 5
.if defined(HAVE_GCC3)
AFLAGS+=	-x assembler-with-cpp
.else
AFLAGS+=	-x assembler-with-cpp -traditional-cpp
.endif
d90 1
@


1.11
log
@Abstract out a large chunk of the kernel build machinery so that new
build features (such as ross's DEBUGLIST) can easily be applied to all
ports.  This should reduce the complexity of each port's kernel
Makefile considerably.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.91 2001/11/20 12:56:41 lukem Exp $
a19 1
MACHINE_ARCH=m68000
d35 1
a35 3
XDEFS=		-undef -D__NetBSD__ -Dm68k -Dmc68000 -D__ELF__ -D__SVR4_ABI__
DEFINES=	-Dsun2
CPPFLAGS+=	${XDEFS} ${DEFINES}
@


1.10
log
@In kernel config files, now mention the options SCSI_OLD_NOINQUIRY,
NFS_V2_ONLY, and VNODE_OP_NOINLINE, commented out as appropriate
for each configuration.
Convert to use genassym.cf and genassym.sh, as other ports do.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.9 2001/11/20 12:56:40 lukem Exp $
d15 2
a16 2
# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
#	IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
d18 1
a18 2
# -DTRACE	compile in kernel tracing hooks
# -DQUOTA	compile in file system quotas
d22 1
a22 1

d25 9
a33 26
# DEBUG is set to -g if debugging.
# PROF is set to -pg if profiling.

AR?=	ar
AS?=	as
CC?=	cc
CPP?=	cpp
LD?=	ld
LORDER?=lorder
MKDEP?=	mkdep
NM?=	nm
RANLIB?=ranlib
SIZE?=	size
STRIP?=	strip
TSORT?=	tsort -q

COPTS?=	-O2 -fno-defer-pop

# source tree is located via $S relative to the compilation directory
.ifndef S
S!=	cd ../../../..; pwd
.endif
SUN2=	$S/arch/sun2

TEXTADDR=00006000

a35 2
HAVE_EGCS!=	${CC} --version | egrep "^(2\.[89]|egcs)" ; echo
INCLUDES=	-nostdinc -I. -I$S/arch -I$S
d37 3
a39 12
DEFINES=	-D_KERNEL -D_KERNEL_OPT -Dsun2
CPPFLAGS=	${INCLUDES} ${XDEFS} ${DEFINES} ${IDENT} ${PARAM}
# Make it easy to override this on the command line...
CWARNFLAGS?= 	-Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
		-Wpointer-arith
# XXX Delete -Wuninitialized for now, since the compiler doesn't
# XXX always get it right.  --thorpej
CWARNFLAGS+=	-Wno-uninitialized
.if (${HAVE_EGCS} != "")
CWARNFLAGS+=	-Wno-main
.endif
CFLAGS= 	${DEBUG} ${COPTS} -msoft-float ${CWARNFLAGS}
a40 3
AFLAGS=
LINKFLAGS=	-N -Ttext ${TEXTADDR} -e start
STRIPFLAGS=	-g
d42 5
a46 1
%INCLUDES
d48 3
a50 1
### find out what to use for libkern
a54 14
.include "$S/lib/libkern/Makefile.inc"
.ifndef PROF
LIBKERN=	${KERNLIB}
.else
LIBKERN=	${KERNLIB_PROF}
.endif

### find out what to use for libcompat
.include "$S/compat/common/Makefile.inc"
.ifndef PROF
LIBCOMPAT=	${COMPATLIB}
.else
LIBCOMPAT=	${COMPATLIB_PROF}
.endif
d56 6
a61 2
# compile rules: rules are named NORMAL_${SUFFIX} where SUFFIX is
# the file suffix, capitalized (e.g. C for a .c file).
d63 2
a64 49
NORMAL_C=	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NOPROF_C=	${CC} ${CFLAGS} ${CPPFLAGS} -c $<

# Do NOT assume the compiler does "-x funny_format" (gcc-specific)
# This needs an intermediate file.  The original file is always
# safe in some far away directory, so just use the base name.
NORMAL_S=	${CPP} ${APPFLAGS} $< > $*.s ;\
		${AS} ${AFLAGS} -o $@@ $*.s ; rm $*.s

# These comments help identify sections in the generated Makefile.
# OBJS, CFILES, SFILES follow:

%OBJS

%CFILES

%SFILES

# OBJS, CFILES, SFILES done.

# load lines for config "xxx" will be emitted as:
# xxx: ${SYSTEM_DEP} swapxxx.o
#	${SYSTEM_LD_HEAD}
#	${SYSTEM_LD} swapxxx.o
#	${SYSTEM_LD_TAIL}
SYSTEM_OBJ=	locore.o \
		param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
SYSTEM_DEP=	Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD=	@@rm -f $@@
SYSTEM_LD=	@@echo ${LD} ${LINKFLAGS} -o $@@ '$${SYSTEM_OBJ}' vers.o; \
		${LD} ${LINKFLAGS} -o $@@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL=	@@${SIZE} $@@; chmod 755 $@@

DEBUG?=
.if ${DEBUG} == "-g"
LINKFLAGS+=	-X
SYSTEM_LD_TAIL+=; \
		echo mv -f $@@ $@@.gdb; mv -f $@@ $@@.gdb; \
		echo ${STRIP} ${STRIPFLAGS} -o $@@ $@@.gdb; \
		${STRIP} ${STRIPFLAGS} -o $@@ $@@.gdb
.else
LINKFLAGS+=	-S
.endif

# LOAD+

%LOAD

# LOAD-
d66 9
a74 4
assym.h: $S/kern/genassym.sh ${SUN2}/sun2/genassym.cf
	sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
	    < ${SUN2}/sun2/genassym.cf > assym.h.tmp && \
	mv -f assym.h.tmp assym.h
a75 60
param.c: $S/conf/param.c
	rm -f param.c
	cp $S/conf/param.c .

param.o: param.c Makefile
	${NORMAL_C}

ioconf.o: ioconf.c
	${NORMAL_C}

newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
	sh $S/conf/newvers.sh
	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c

__CLEANKERNEL: .USE
	@@echo "${.TARGET}ing the kernel objects"
	rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
	    [Ee]rrs linterrs makelinks assym.h.tmp assym.h

__CLEANDEPEND: .USE
	rm -f .depend

clean: __CLEANKERNEL

cleandir distclean: __CLEANKERNEL __CLEANDEPEND

lint:
	@@lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
	    ${CFILES} ioconf.c param.c | \
	    grep -v 'static function .* unused'

tags:
	@@echo "see $S/kern/Makefile for tags"

links:
	egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
	  sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
	echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
	  sort -u | comm -23 - dontlink | \
	  sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
	sh makelinks && rm -f dontlink

SRCS=	${SUN2}/sun2/locore.s \
	param.c ioconf.c ${CFILES} ${SFILES}

depend: .depend
.depend: ${SRCS} assym.h param.c
	${MKDEP} ${CPPFLAGS} param.c ioconf.c ${CFILES}
	sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
	  ${CPPFLAGS} < ${SUN2}/sun2/genassym.cf
	@@sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
	@@rm -f assym.dep

dependall: depend all


# XXX - see below
#	${MKDEP} -a ${APPFLAGS} ${SUN2}/sun2/locore.s
#	${MKDEP} -a ${APPFLAGS} ${SFILES}
#
a83 9
# depend on root or device configuration
conf.o: Makefile

# depend on network or filesystem configuration
uipc_proto.o vfs_conf.o: Makefile

# depend on maxusers
machdep.o: Makefile

d90 13
a102 2
locore.o: ${SUN2}/sun2/locore.s
	${NORMAL_S}
d104 1
a104 1
# Generated rules follow:
d106 1
a106 11
# The install target can be redefined by putting a
# install-kernel-${MACHINE_NAME} target into /etc/mk.conf
MACHINE_NAME!=  uname -n
install: install-kernel-${MACHINE_NAME}
.if !target(install-kernel-${MACHINE_NAME}})
install-kernel-${MACHINE_NAME}:
	rm -f /onetbsd
	ln /netbsd /onetbsd
	cp netbsd /nnetbsd
	mv /nnetbsd /netbsd
.endif
d109 5
@


1.9
log
@cleanup:
	options SPACE TAB
	makeoptions TAB
	psuedo-device TAB
	remove trailing whitespace
	replace multiple spaces -> tabs
	options "FOO" -> options FOO
	options "FOO=bar" -> options FOO=bar
	options "FOO=\"bar\"" -> options FOO="\"bar\""
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.8 2001/11/20 08:43:38 lukem Exp $
d149 4
a152 11
# Use awk to cross-build assym.h from the genassym.s file.
assym.h: genassym.o $S/kern/genassym.awk
	awk -f $S/kern/genassym.awk < genassym.s > assym.h.tmp
	mv -f assym.h.tmp $@@

# The above rule lists genassym.o as a prerequisite so that the
# generated .depend rule is effective, even though we actually
# use genassym.s instead.   This always creates both.
genassym.o: ${SUN2}/sun2/genassym.c
	${CC} ${CPPFLAGS} -S $<
	${CC} -c $*.s
d202 4
a205 1
	${MKDEP} -a ${CPPFLAGS} ${SUN2}/sun2/genassym.c
@


1.8
log
@- pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
	KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
	DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for  options KGDB_DEVNAME="\"com\""
- use correct quotes for  options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.7 2001/10/26 06:45:40 jmc Exp $
d54 1
a54 1
HAVE_EGCS!=	${CC} --version | egrep "^(2\.[89]|egcs)" ; echo 
d63 1
a63 1
# XXX always get it right.  --thorpej 
d228 3
a230 3
 
# depend on network or filesystem configuration 
uipc_proto.o vfs_conf.o: Makefile 
d235 1
a235 1
# depend on CPU configuration 
@


1.7
log
@Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.6 2001/10/23 19:26:46 thorpej Exp $
a236 3

# depends on KGDBDEV, KGDBRATE
kgdb_stub.o: Makefile
@


1.7.2.1
log
@file Makefile.sun2 was added on branch nathanw_sa on 2002-01-08 00:28:07 +0000
@
text
@d1 261
@


1.7.2.2
log
@Catch up to -current.
@
text
@a0 113
# $NetBSD: Makefile.sun2,v 1.7.2.1 2002/01/08 00:28:07 nathanw Exp $

# Makefile for NetBSD
#
# This makefile is constructed from a machine description:
#	config machineid
# Most changes should be made in the machine description
#	/sys/arch/sun2/conf/``machineid''
# after which you should do
#	config machineid
# Machine generic makefile changes should be made in
#	/sys/arch/sun2/conf/Makefile.sun2
# after which config should be rerun for all machines of that type.
#
# To specify debugging, add the config line: makeoptions DEBUG="-g"
# A better way is to specify -g only for a few files.
#
#	makeoptions DEBUGLIST="uvm* trap if_*"

MACHINE_ARCH=m68000
USETOOLS?=	no
NEED_OWN_INSTALL_TARGET?=no
.include <bsd.own.mk>

##
## (1) port identification
##
SUN2=		$S/arch/sun2
GENASSYM=	${SUN2}/sun2/genassym.cf

##
## (2) compile settings
##
# Override CPP defaults entirely, so cross-compilation works.
# Keep -nostdinc before all -I flags, similar for -undef ...
XDEFS=		-undef -D__NetBSD__ -Dm68k -Dmc68000 -D__ELF__ -D__SVR4_ABI__
DEFINES=	-Dsun2
CPPFLAGS+=	${XDEFS} ${DEFINES}
CFLAGS+=	-msoft-float -fno-defer-pop
APPFLAGS=	-x assembler-with-cpp -P -traditional ${CPPFLAGS} -D_LOCORE

# Do NOT assume the compiler does "-x funny_format" (gcc-specific)
# This needs an intermediate file.  The original file is always
# safe in some far away directory, so just use the base name.
NORMAL_S=	${CPP} ${APPFLAGS} $< > $*.s ;\
		${AS} -o $@@ $*.s ; rm $*.s

##
## (3) libkern and compat
##
KERN_AS=	obj
# XXX lib/libkern/arch/m68k/Makefile.inc needs to know that
# XXX our MACHINE_ARCH is m68000, and not m68k.  --fredette
KERNMISCMAKEFLAGS=	MACHINE_ARCH=${MACHINE_ARCH}

##
## (4) local objects, compile rules, and dependencies
##
MD_OBJS=	locore.o
MD_CFILES=
MD_SFILES=	${SUN2}/sun2/locore.s

locore.o: ${SUN2}/sun2/locore.s
	${NORMAL_S}

##
## (5) link settings
##
LINKFORMAT=	-N
TEXTADDR?=	00006000

##
## (6) port specific target dependencies
##

# For cross-compilation, the "gcc -M" mkdep script is convenient,
# but that does not correctly make rules from *.s files.  The
# easiest work-around is to just list those dependencies here.
locore.o:   assym.h m68k/asm.h m68k/trap.h
copy.o:     assym.h m68k/asm.h $S/sys/errno.h
bcopy.o:    assym.h m68k/asm.h
copypage.o: assym.h m68k/asm.h

# depend on CPU configuration
db_machdep.o dvma.o machdep.o pmap.o sun2_startup.o vm_machdep.o: Makefile

# depends on DDB, etc.
stub.o: Makefile

##
## (7) misc settings
##
MKDEP_AFLAGS=	${APPFLAGS}

##
## (8) config(8) generated machinery
##
%INCLUDES

%OBJS

%CFILES

%SFILES

%LOAD

%RULES

##
## (9) port independent kernel machinery
##
.include "$S/conf/Makefile.kern.inc"
@


1.7.2.3
log
@Catch up to -current.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.7.2.2 2002/02/28 04:12:20 nathanw Exp $
d20 1
d36 3
a38 1
CPPFLAGS+=	-Dsun2
@


1.7.2.4
log
@Catch up to -current.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.7.2.3 2002/06/20 03:41:37 nathanw Exp $
d33 2
d37 7
a43 5
.if defined(HAVE_GCC3)
AFLAGS+=	-x assembler-with-cpp
.else
AFLAGS+=	-x assembler-with-cpp -traditional-cpp
.endif
d90 1
@


1.7.2.5
log
@Catch up to -current
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.7.2.4 2002/11/11 22:05:02 nathanw Exp $
a19 1
MACHINE_ARCH=m68000
@


1.7.2.6
log
@Sync with HEAD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.7.2.5 2002/12/11 06:12:31 thorpej Exp $
d36 3
d40 1
@


1.6
log
@Set MACHINE_ARCH explicitly in Makefiles for which it is constant.
Also, since config(8) now explcitly sets MACHINE, there is no need
to do it here in the Makefile.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.5 2001/09/06 20:04:16 fredette Exp $
d22 3
@


1.6.2.1
log
@Sync the thorpej-mips-cache branch with -current.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.7 2001/10/26 06:45:40 jmc Exp $
a21 3
USETOOLS?=	no

.include <bsd.own.mk>
@


1.5
log
@Added -D__SVR4_ABI__ to XDEFS.  Without it, m68k libkern assembly
functions don't return pointer values in %a0.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.4 2001/06/27 17:03:10 fredette Exp $
d21 2
a24 4

# XXX - Make cross-build work...
MACHINE_ARCH=m68000
MACHINE=sun2
@


1.4
log
@Updated for ELF support.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.3 2001/05/29 02:20:26 mrg Exp $
d55 1
a55 1
XDEFS=		-undef -D__NetBSD__ -Dm68k -Dmc68000 -D__ELF__
@


1.4.2.1
log
@Update the kqueue branch to HEAD.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.5 2001/09/06 20:04:16 fredette Exp $
d55 1
a55 1
XDEFS=		-undef -D__NetBSD__ -Dm68k -Dmc68000 -D__ELF__ -D__SVR4_ABI__
@


1.4.2.2
log
@Sync kqueue branch with -current.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.4.2.1 2001/09/13 01:14:45 thorpej Exp $
d15 2
a16 2
# To specify debugging, add the config line: makeoptions DEBUG="-g"
# A better way is to specify -g only for a few files.
d18 2
a19 1
#	makeoptions DEBUGLIST="uvm* trap if_*"
d21 4
d26 25
a50 13
USETOOLS?=	no
NEED_OWN_INSTALL_TARGET?=no
.include <bsd.own.mk>

##
## (1) port identification
##
SUN2=		$S/arch/sun2
GENASSYM=	${SUN2}/sun2/genassym.cf

##
## (2) compile settings
##
d53 2
d56 12
a67 3
DEFINES=	-Dsun2
CPPFLAGS+=	${XDEFS} ${DEFINES}
CFLAGS+=	-msoft-float -fno-defer-pop
d69 31
d105 61
a165 1
		${AS} -o $@@ $*.s ; rm $*.s
d167 37
a203 7
##
## (3) libkern and compat
##
KERN_AS=	obj
# XXX lib/libkern/arch/m68k/Makefile.inc needs to know that
# XXX our MACHINE_ARCH is m68000, and not m68k.  --fredette
KERNMISCMAKEFLAGS=	MACHINE_ARCH=${MACHINE_ARCH}
d205 4
a208 6
##
## (4) local objects, compile rules, and dependencies
##
MD_OBJS=	locore.o
MD_CFILES=
MD_SFILES=	${SUN2}/sun2/locore.s
d210 1
a210 2
locore.o: ${SUN2}/sun2/locore.s
	${NORMAL_S}
a211 9
##
## (5) link settings
##
LINKFORMAT=	-N
TEXTADDR?=	00006000

##
## (6) port specific target dependencies
##
d213 4
d225 10
a234 1
# depend on CPU configuration
d237 3
d243 2
a244 9
##
## (7) misc settings
##
MKDEP_AFLAGS=	${APPFLAGS}

##
## (8) config(8) generated machinery
##
%INCLUDES
d246 1
a246 3
%OBJS

%CFILES
d248 11
a258 3
%SFILES

%LOAD
a260 5

##
## (9) port independent kernel machinery
##
.include "$S/conf/Makefile.kern.inc"
@


1.4.2.3
log
@Sync w/ -current.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.4.2.2 2002/01/10 19:49:34 thorpej Exp $
d20 1
d36 3
a38 1
CPPFLAGS+=	-Dsun2
@


1.4.2.4
log
@catch up with -current on kqueue branch
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.4.2.3 2002/02/11 20:09:14 jdolecek Exp $
d33 2
d37 7
a43 5
.if defined(HAVE_GCC3)
AFLAGS+=	-x assembler-with-cpp
.else
AFLAGS+=	-x assembler-with-cpp -traditional-cpp
.endif
d90 1
@


1.3
log
@define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.2 2001/04/06 17:17:58 fredette Exp $
d49 1
a49 1
TEXTADDR=0000C000
d55 1
a55 1
XDEFS=		-undef -D__NetBSD__ -Dm68k -Dmc68000
d77 2
@


1.2
log
@A successful compile is near.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.sun2,v 1.1 2001/03/29 21:07:58 fredette Exp $
d56 1
a56 1
DEFINES=	-D_KERNEL -Dsun2
@


1.2.2.1
log
@file Makefile.sun2 was added on branch thorpej_scsipi on 2001-04-21 17:54:46 +0000
@
text
@d1 258
@


1.2.2.2
log
@Sync with HEAD
@
text
@a0 258
# $NetBSD: Makefile.sun2,v 1.2.2.1 2001/04/21 17:54:46 bouyer Exp $

# Makefile for NetBSD
#
# This makefile is constructed from a machine description:
#	config machineid
# Most changes should be made in the machine description
#	/sys/arch/sun2/conf/``machineid''
# after which you should do
#	config machineid
# Machine generic makefile changes should be made in
#	/sys/arch/sun2/conf/Makefile.sun2
# after which config should be rerun for all machines of that type.
#
# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
#	IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
#
# -DTRACE	compile in kernel tracing hooks
# -DQUOTA	compile in file system quotas

# DEBUG is set to -g if debugging.
# PROF is set to -pg if profiling.

# XXX - Make cross-build work...
MACHINE_ARCH=m68000
MACHINE=sun2

AR?=	ar
AS?=	as
CC?=	cc
CPP?=	cpp
LD?=	ld
LORDER?=lorder
MKDEP?=	mkdep
NM?=	nm
RANLIB?=ranlib
SIZE?=	size
STRIP?=	strip
TSORT?=	tsort -q

COPTS?=	-O2 -fno-defer-pop

# source tree is located via $S relative to the compilation directory
.ifndef S
S!=	cd ../../../..; pwd
.endif
SUN2=	$S/arch/sun2

TEXTADDR=0000C000

# Override CPP defaults entirely, so cross-compilation works.
# Keep -nostdinc before all -I flags, similar for -undef ...
HAVE_EGCS!=	${CC} --version | egrep "^(2\.[89]|egcs)" ; echo 
INCLUDES=	-nostdinc -I. -I$S/arch -I$S
XDEFS=		-undef -D__NetBSD__ -Dm68k -Dmc68000
DEFINES=	-D_KERNEL -Dsun2
CPPFLAGS=	${INCLUDES} ${XDEFS} ${DEFINES} ${IDENT} ${PARAM}
# Make it easy to override this on the command line...
CWARNFLAGS?= 	-Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
		-Wpointer-arith
# XXX Delete -Wuninitialized for now, since the compiler doesn't
# XXX always get it right.  --thorpej 
CWARNFLAGS+=	-Wno-uninitialized
.if (${HAVE_EGCS} != "")
CWARNFLAGS+=	-Wno-main
.endif
CFLAGS= 	${DEBUG} ${COPTS} -msoft-float ${CWARNFLAGS}
APPFLAGS=	-x assembler-with-cpp -P -traditional ${CPPFLAGS} -D_LOCORE
AFLAGS=
LINKFLAGS=	-N -Ttext ${TEXTADDR} -e start
STRIPFLAGS=	-g

%INCLUDES

### find out what to use for libkern
KERN_AS=	obj
KERNMISCMAKEFLAGS=	MACHINE_ARCH=${MACHINE_ARCH}
.include "$S/lib/libkern/Makefile.inc"
.ifndef PROF
LIBKERN=	${KERNLIB}
.else
LIBKERN=	${KERNLIB_PROF}
.endif

### find out what to use for libcompat
.include "$S/compat/common/Makefile.inc"
.ifndef PROF
LIBCOMPAT=	${COMPATLIB}
.else
LIBCOMPAT=	${COMPATLIB_PROF}
.endif

# compile rules: rules are named NORMAL_${SUFFIX} where SUFFIX is
# the file suffix, capitalized (e.g. C for a .c file).

NORMAL_C=	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NOPROF_C=	${CC} ${CFLAGS} ${CPPFLAGS} -c $<

# Do NOT assume the compiler does "-x funny_format" (gcc-specific)
# This needs an intermediate file.  The original file is always
# safe in some far away directory, so just use the base name.
NORMAL_S=	${CPP} ${APPFLAGS} $< > $*.s ;\
		${AS} ${AFLAGS} -o $@@ $*.s ; rm $*.s

# These comments help identify sections in the generated Makefile.
# OBJS, CFILES, SFILES follow:

%OBJS

%CFILES

%SFILES

# OBJS, CFILES, SFILES done.

# load lines for config "xxx" will be emitted as:
# xxx: ${SYSTEM_DEP} swapxxx.o
#	${SYSTEM_LD_HEAD}
#	${SYSTEM_LD} swapxxx.o
#	${SYSTEM_LD_TAIL}
SYSTEM_OBJ=	locore.o \
		param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
SYSTEM_DEP=	Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD=	@@rm -f $@@
SYSTEM_LD=	@@echo ${LD} ${LINKFLAGS} -o $@@ '$${SYSTEM_OBJ}' vers.o; \
		${LD} ${LINKFLAGS} -o $@@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL=	@@${SIZE} $@@; chmod 755 $@@

DEBUG?=
.if ${DEBUG} == "-g"
LINKFLAGS+=	-X
SYSTEM_LD_TAIL+=; \
		echo mv -f $@@ $@@.gdb; mv -f $@@ $@@.gdb; \
		echo ${STRIP} ${STRIPFLAGS} -o $@@ $@@.gdb; \
		${STRIP} ${STRIPFLAGS} -o $@@ $@@.gdb
.else
LINKFLAGS+=	-S
.endif

# LOAD+

%LOAD

# LOAD-

# Use awk to cross-build assym.h from the genassym.s file.
assym.h: genassym.o $S/kern/genassym.awk
	awk -f $S/kern/genassym.awk < genassym.s > assym.h.tmp
	mv -f assym.h.tmp $@@

# The above rule lists genassym.o as a prerequisite so that the
# generated .depend rule is effective, even though we actually
# use genassym.s instead.   This always creates both.
genassym.o: ${SUN2}/sun2/genassym.c
	${CC} ${CPPFLAGS} -S $<
	${CC} -c $*.s

param.c: $S/conf/param.c
	rm -f param.c
	cp $S/conf/param.c .

param.o: param.c Makefile
	${NORMAL_C}

ioconf.o: ioconf.c
	${NORMAL_C}

newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
	sh $S/conf/newvers.sh
	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c

__CLEANKERNEL: .USE
	@@echo "${.TARGET}ing the kernel objects"
	rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
	    [Ee]rrs linterrs makelinks assym.h.tmp assym.h

__CLEANDEPEND: .USE
	rm -f .depend

clean: __CLEANKERNEL

cleandir distclean: __CLEANKERNEL __CLEANDEPEND

lint:
	@@lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
	    ${CFILES} ioconf.c param.c | \
	    grep -v 'static function .* unused'

tags:
	@@echo "see $S/kern/Makefile for tags"

links:
	egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
	  sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
	echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
	  sort -u | comm -23 - dontlink | \
	  sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
	sh makelinks && rm -f dontlink

SRCS=	${SUN2}/sun2/locore.s \
	param.c ioconf.c ${CFILES} ${SFILES}

depend: .depend
.depend: ${SRCS} assym.h param.c
	${MKDEP} ${CPPFLAGS} param.c ioconf.c ${CFILES}
	${MKDEP} -a ${CPPFLAGS} ${SUN2}/sun2/genassym.c

dependall: depend all


# XXX - see below
#	${MKDEP} -a ${APPFLAGS} ${SUN2}/sun2/locore.s
#	${MKDEP} -a ${APPFLAGS} ${SFILES}
#
# For cross-compilation, the "gcc -M" mkdep script is convenient,
# but that does not correctly make rules from *.s files.  The
# easiest work-around is to just list those dependencies here.
locore.o:   assym.h m68k/asm.h m68k/trap.h
copy.o:     assym.h m68k/asm.h $S/sys/errno.h
bcopy.o:    assym.h m68k/asm.h
copypage.o: assym.h m68k/asm.h

# depend on root or device configuration
conf.o: Makefile
 
# depend on network or filesystem configuration 
uipc_proto.o vfs_conf.o: Makefile 

# depend on maxusers
machdep.o: Makefile

# depend on CPU configuration 
db_machdep.o dvma.o machdep.o pmap.o sun2_startup.o vm_machdep.o: Makefile

# depends on KGDBDEV, KGDBRATE
kgdb_stub.o: Makefile

# depends on DDB, etc.
stub.o: Makefile

locore.o: ${SUN2}/sun2/locore.s
	${NORMAL_S}

# Generated rules follow:

# The install target can be redefined by putting a
# install-kernel-${MACHINE_NAME} target into /etc/mk.conf
MACHINE_NAME!=  uname -n
install: install-kernel-${MACHINE_NAME}
.if !target(install-kernel-${MACHINE_NAME}})
install-kernel-${MACHINE_NAME}:
	rm -f /onetbsd
	ln /netbsd /onetbsd
	cp netbsd /nnetbsd
	mv /nnetbsd /netbsd
.endif

%RULES
@


1.1
log
@Added.
@
text
@d1 1
a1 1
# $NetBSD$
d77 1
@
