head	1.21;
access;
symbols
	perseant-exfatfs-base-20250801:1.21
	perseant-exfatfs-base-20240630:1.21
	perseant-exfatfs:1.21.0.130
	perseant-exfatfs-base:1.21
	bouyer-sunxi-drm:1.21.0.128
	bouyer-sunxi-drm-base:1.21
	cjep_sun2x:1.21.0.126
	cjep_sun2x-base:1.21
	cjep_staticlib_x-base1:1.21
	cjep_staticlib_x:1.21.0.124
	cjep_staticlib_x-base:1.21
	thorpej-futex-base:1.21
	bouyer-xenpvh-base2:1.21
	phil-wifi-20200421:1.21
	bouyer-xenpvh-base1:1.21
	phil-wifi-20200411:1.21
	bouyer-xenpvh:1.21.0.122
	bouyer-xenpvh-base:1.21
	phil-wifi-20200406:1.21
	ad-namecache-base3:1.21
	ad-namecache-base2:1.21
	ad-namecache-base1:1.21
	ad-namecache:1.21.0.120
	ad-namecache-base:1.21
	isaki-audio2:1.21.0.118
	isaki-audio2-base:1.21
	pgoyette-compat-merge-20190127:1.21
	pgoyette-compat-20190127:1.21
	pgoyette-compat-20190118:1.21
	pgoyette-compat-1226:1.21
	pgoyette-compat-1126:1.21
	pgoyette-compat-1020:1.21
	pgoyette-compat-0930:1.21
	pgoyette-compat-0906:1.21
	pgoyette-compat-0728:1.21
	pgoyette-compat-0625:1.21
	pgoyette-compat-0521:1.21
	pgoyette-compat-0502:1.21
	pgoyette-compat-0422:1.21
	pgoyette-compat-0415:1.21
	pgoyette-compat-0407:1.21
	pgoyette-compat-0330:1.21
	pgoyette-compat-0322:1.21
	pgoyette-compat-0315:1.21
	pgoyette-compat:1.21.0.116
	pgoyette-compat-base:1.21
	perseant-stdc-iso10646:1.21.0.114
	perseant-stdc-iso10646-base:1.21
	prg-localcount2-base3:1.21
	prg-localcount2-base2:1.21
	prg-localcount2-base1:1.21
	prg-localcount2:1.21.0.112
	prg-localcount2-base:1.21
	pgoyette-localcount-20170426:1.21
	bouyer-socketcan-base1:1.21
	pgoyette-localcount-20170320:1.21
	bouyer-socketcan:1.21.0.110
	bouyer-socketcan-base:1.21
	pgoyette-localcount-20170107:1.21
	pgoyette-localcount-20161104:1.21
	localcount-20160914:1.21
	pgoyette-localcount-20160806:1.21
	pgoyette-localcount-20160726:1.21
	pgoyette-localcount:1.21.0.108
	pgoyette-localcount-base:1.21
	netbsd-5-2-3-RELEASE:1.21
	netbsd-5-1-5-RELEASE:1.21
	yamt-pagecache-base9:1.21
	yamt-pagecache-tag8:1.21
	tls-earlyentropy:1.21.0.106
	tls-earlyentropy-base:1.21
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.21
	riastradh-drm2-base3:1.21
	netbsd-5-2-2-RELEASE:1.21
	netbsd-5-1-4-RELEASE:1.21
	netbsd-5-2-1-RELEASE:1.21
	netbsd-5-1-3-RELEASE:1.21
	rmind-smpnet-nbase:1.21
	rmind-smpnet:1.21.0.102
	rmind-smpnet-base:1.21
	agc-symver:1.21.0.104
	agc-symver-base:1.21
	tls-maxphys-base:1.21
	yamt-pagecache-base8:1.21
	netbsd-5-2:1.21.0.100
	yamt-pagecache-base7:1.21
	netbsd-5-2-RELEASE:1.21
	netbsd-5-2-RC1:1.21
	yamt-pagecache-base6:1.21
	yamt-pagecache-base5:1.21
	yamt-pagecache-base4:1.21
	netbsd-5-1-2-RELEASE:1.21
	netbsd-5-1-1-RELEASE:1.21
	jmcneill-usbmp:1.21.0.98
	jmcneill-usbmp-base:1.21
	jmcneill-audiomp3:1.21.0.96
	jmcneill-audiomp3-base:1.21
	yamt-pagecache-base3:1.21
	yamt-pagecache-base2:1.21
	yamt-pagecache:1.21.0.94
	yamt-pagecache-base:1.21
	rmind-uvmplock-nbase:1.21
	jym-xensuspend-nbase:1.21
	bouyer-quota2-nbase:1.21
	bouyer-quota2:1.21.0.92
	bouyer-quota2-base:1.21
	jruoho-x86intr:1.21.0.90
	jruoho-x86intr-base:1.21
	matt-nb5-pq3:1.21.0.88
	matt-nb5-pq3-base:1.21
	netbsd-5-1:1.21.0.86
	netbsd-5-1-RELEASE:1.21
	yamt-nfs-mp-base11:1.21
	netbsd-5-1-RC4:1.21
	uebayasi-xip-base2:1.21
	yamt-nfs-mp-base10:1.21
	netbsd-5-1-RC3:1.21
	netbsd-5-1-RC2:1.21
	netbsd-5-1-RC1:1.21
	rmind-uvmplock:1.21.0.84
	rmind-uvmplock-base:1.21
	yamt-nfs-mp-base9:1.21
	uebayasi-xip:1.21.0.82
	uebayasi-xip-base:1.21
	netbsd-5-0-2-RELEASE:1.21
	yamt-nfs-mp-base8:1.21
	yamt-nfs-mp-base7:1.21
	netbsd-5-0-1-RELEASE:1.21
	jymxensuspend-base:1.21
	yamt-nfs-mp-base6:1.21
	yamt-nfs-mp-base5:1.21
	yamt-nfs-mp-base4:1.21
	yamt-nfs-mp-base3:1.21
	netbsd-5-0:1.21.0.80
	netbsd-5-0-RELEASE:1.21
	netbsd-5-0-RC4:1.21
	netbsd-5-0-RC3:1.21
	netbsd-5-0-RC2:1.21
	jym-xensuspend:1.21.0.78
	jym-xensuspend-base:1.21
	netbsd-5-0-RC1:1.21
	haad-dm-base2:1.21
	haad-nbase2:1.21
	ad-audiomp2:1.21.0.76
	ad-audiomp2-base:1.21
	netbsd-5:1.21.0.74
	netbsd-5-base:1.21
	haad-dm-base1:1.21
	haad-dm:1.21.0.72
	haad-dm-base:1.21
	simonb-wapbl-nbase:1.21
	yamt-pf42-base4:1.21
	simonb-wapbl:1.21.0.70
	simonb-wapbl-base:1.21
	yamt-pf42-base3:1.21
	hpcarm-cleanup-nbase:1.21
	yamt-pf42-base2:1.21
	yamt-nfs-mp-base2:1.21
	yamt-nfs-mp:1.21.0.68
	yamt-nfs-mp-base:1.21
	yamt-pf42:1.21.0.66
	yamt-pf42-base:1.21
	ad-socklock-base1:1.21
	yamt-lazymbuf-base15:1.21
	yamt-lazymbuf-base14:1.21
	keiichi-mipv6-nbase:1.21
	mjf-devfs2:1.21.0.64
	mjf-devfs2-base:1.21
	keiichi-mipv6:1.21.0.62
	keiichi-mipv6-base:1.21
	bouyer-xeni386-merge1:1.21
	vmlocking2-base3:1.21
	bouyer-xeni386-nbase:1.21
	yamt-kmem-base3:1.21
	cube-autoconf:1.21.0.60
	cube-autoconf-base:1.21
	yamt-kmem-base2:1.21
	bouyer-xeni386:1.21.0.58
	bouyer-xeni386-base:1.21
	yamt-kmem:1.21.0.56
	yamt-kmem-base:1.21
	vmlocking2-base2:1.21
	reinoud-bufcleanup-nbase:1.21
	vmlocking2:1.21.0.54
	vmlocking2-base1:1.21
	jmcneill-base:1.21
	mjf-devfs:1.21.0.52
	mjf-devfs-base:1.21
	bouyer-xenamd64-base2:1.21
	vmlocking-nbase:1.21
	yamt-x86pmap-base4:1.21
	bouyer-xenamd64:1.21.0.50
	bouyer-xenamd64-base:1.21
	yamt-x86pmap-base3:1.21
	yamt-x86pmap-base2:1.21
	yamt-x86pmap:1.21.0.48
	yamt-x86pmap-base:1.21
	jmcneill-pm:1.21.0.46
	jmcneill-pm-base:1.21
	hpcarm-cleanup:1.21.0.44
	hpcarm-cleanup-base:1.21
	mjf-ufs-trans-base:1.21
	yamt-idlelwp-base8:1.21
	ppcoea-renovation:1.21.0.42
	ppcoea-renovation-base:1.21
	reinoud-bufcleanup-base:1.21
	vmlocking:1.21.0.40
	vmlocking-base:1.21
	ad-audiomp:1.21.0.38
	ad-audiomp-base:1.21
	yamt-idlelwp:1.21.0.36
	post-newlock2-merge:1.21
	newlock2-nbase:1.21
	yamt-splraiseipl-base5:1.21
	yamt-splraiseipl-base4:1.21
	yamt-splraiseipl-base3:1.21
	yamt-splraiseipl-base2:1.21
	yamt-splraiseipl:1.21.0.34
	yamt-splraiseipl-base:1.21
	newlock2:1.21.0.32
	newlock2-base:1.21
	yamt-pdpolicy-base8:1.21
	yamt-pdpolicy-base7:1.21
	yamt-pdpolicy-base6:1.21
	gdamore-uart:1.21.0.30
	gdamore-uart-base:1.21
	simonb-timcounters-final:1.21
	yamt-pdpolicy-base5:1.21
	elad-kernelauth-nbase:1.21
	yamt-pdpolicy-base4:1.21
	yamt-pdpolicy-base3:1.21
	yamt-pdpolicy-base2:1.21
	yamt-pdpolicy:1.21.0.28
	yamt-pdpolicy-base:1.21
	yamt-uio_vmspace-base5:1.21
	simonb-timecounters:1.21.0.26
	simonb-timecounters-base:1.21
	rpaulo-netinet-merge-pcb:1.21.0.24
	rpaulo-netinet-merge-pcb-base:1.21
	yamt-uio_vmspace:1.21.0.22
	yamt-readahead-base3:1.21
	yamt-readahead-base2:1.21
	yamt-readahead:1.21.0.20
	yamt-readahead-base:1.21
	yamt-vop-base3:1.21
	yamt-vop-base2:1.21
	thorpej-vnode-attr:1.21.0.18
	thorpej-vnode-attr-base:1.21
	yamt-vop:1.21.0.16
	yamt-vop-base:1.21
	yamt-lazymbuf:1.21.0.14
	yamt-km-base4:1.21
	yamt-km-base3:1.21
	yamt-km-base2:1.21
	yamt-km:1.21.0.12
	yamt-km-base:1.21
	kent-audio2:1.21.0.10
	kent-audio2-base:1.21
	ktrace-lwp:1.21.0.8
	ktrace-lwp-base:1.21
	nathanw_sa_end:1.12.2.5
	nathanw_sa_before_merge:1.21
	gmcgarry_ctxsw:1.21.0.6
	gmcgarry_ctxsw_base:1.21
	gmcgarry_ucred:1.21.0.4
	gmcgarry_ucred_base:1.21
	nathanw_sa_base:1.21
	gehenna-devsw:1.21.0.2
	gehenna-devsw-base:1.21
	netbsd-1-5-PATCH003:1.1
	eeh-devprop:1.20.0.4
	eeh-devprop-base:1.20
	newlock:1.20.0.2
	newlock-base:1.20
	ifpoll-base:1.19
	nathanw_sa:1.12.0.2
	thorpej-mips-cache:1.10.0.2
	thorpej-mips-cache-base:1.12
	thorpej-devvp-base3:1.8
	thorpej-devvp-base2:1.8
	post-chs-ubcperf:1.8
	pre-chs-ubcperf:1.8
	thorpej-devvp:1.8.0.2
	thorpej-devvp-base:1.8
	netbsd-1-5-PATCH002:1.1
	kqueue:1.7.0.2
	kqueue-base:1.20
	netbsd-1-5-PATCH001:1.1
	thorpej_scsipi_beforemerge:1.6
	thorpej_scsipi_nbase:1.6
	thorpej_scsipi_base:1.6
	thorpej_scsipi:1.3.0.2
	netbsd-1-5-RELEASE:1.1
	netbsd-1-5-BETA2:1.1
	netbsd-1-5-BETA:1.1
	netbsd-1-5-ALPHA2:1.1
	netbsd-1-5:1.1.0.4
	netbsd-1-5-base:1.1
	minoura-xpg4dl:1.1.0.2
	minoura-xpg4dl-base:1.1;
locks; strict;
comment	@# @;


1.21
date	2002.03.24.15.45.47;	author bjh21;	state dead;
branches;
next	1.20;

1.20
date	2002.03.07.23.15.23;	author bjh21;	state Exp;
branches;
next	1.19;

1.19
date	2002.01.07.21.15.50;	author bjh21;	state Exp;
branches;
next	1.18;

1.18
date	2001.12.19.18.35.35;	author thorpej;	state Exp;
branches;
next	1.17;

1.17
date	2001.12.09.05.00.42;	author atatat;	state Exp;
branches;
next	1.16;

1.16
date	2001.11.23.05.19.02;	author atatat;	state Exp;
branches;
next	1.15;

1.15
date	2001.11.20.12.56.22;	author lukem;	state Exp;
branches;
next	1.14;

1.14
date	2001.11.16.14.53.47;	author bjh21;	state Exp;
branches;
next	1.13;

1.13
date	2001.11.16.14.46.16;	author bjh21;	state Exp;
branches;
next	1.12;

1.12
date	2001.10.26.06.45.35;	author jmc;	state Exp;
branches
	1.12.2.1;
next	1.11;

1.11
date	2001.10.24.13.53.24;	author bjh21;	state Exp;
branches;
next	1.10;

1.10
date	2001.10.23.19.26.43;	author thorpej;	state Exp;
branches
	1.10.2.1;
next	1.9;

1.9
date	2001.10.23.17.32.36;	author thorpej;	state Exp;
branches;
next	1.8;

1.8
date	2001.07.28.13.48.32;	author bjh21;	state Exp;
branches;
next	1.7;

1.7
date	2001.05.29.02.20.21;	author mrg;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2001.02.17.19.38.36;	author bjh21;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2001.02.17.17.23.48;	author bjh21;	state Exp;
branches;
next	1.4;

1.4
date	2000.12.17.15.52.40;	author jdolecek;	state Exp;
branches;
next	1.3;

1.3
date	2000.09.18.18.33.33;	author bjh21;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2000.07.20.20.26.32;	author bjh21;	state Exp;
branches;
next	1.1;

1.1
date	2000.05.09.21.55.58;	author bjh21;	state Exp;
branches;
next	;

1.12.2.1
date	2001.10.26.06.45.35;	author nathanw;	state dead;
branches;
next	1.12.2.2;

1.12.2.2
date	2002.01.08.00.23.21;	author nathanw;	state Exp;
branches;
next	1.12.2.3;

1.12.2.3
date	2002.01.11.23.38.07;	author nathanw;	state Exp;
branches;
next	1.12.2.4;

1.12.2.4
date	2002.02.28.04.07.47;	author nathanw;	state Exp;
branches;
next	1.12.2.5;

1.12.2.5
date	2002.04.01.07.39.21;	author nathanw;	state dead;
branches;
next	;

1.10.2.1
date	2001.11.12.21.16.37;	author thorpej;	state Exp;
branches;
next	;

1.7.2.1
date	2001.08.03.04.11.04;	author lukem;	state Exp;
branches;
next	1.7.2.2;

1.7.2.2
date	2002.01.10.19.38.35;	author thorpej;	state Exp;
branches;
next	1.7.2.3;

1.7.2.3
date	2002.03.16.15.56.18;	author jdolecek;	state Exp;
branches;
next	1.7.2.4;

1.7.2.4
date	2002.06.23.17.35.02;	author jdolecek;	state dead;
branches;
next	;

1.6.2.1
date	2001.06.21.19.19.07;	author nathanw;	state Exp;
branches;
next	;

1.3.2.1
date	2000.09.18.18.33.33;	author bouyer;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2000.11.20.20.02.37;	author bouyer;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2001.01.05.17.34.02;	author bouyer;	state Exp;
branches;
next	1.3.2.4;

1.3.2.4
date	2001.03.12.13.27.29;	author bouyer;	state Exp;
branches;
next	;


desc
@@


1.21
log
@Rename NetBSD/arm26 to NetBSD/acorn26, so that the two Acorn/ARM ports have
matching names.  This commit might include some private hacks that have been
lurking in my tree a while.  They're all harmless, and this reduces the number
of gratuitous diffs I have to deal with.
@
text
@#	$NetBSD: Makefile.arm26,v 1.20 2002/03/07 23:15:23 bjh21 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/arm26/conf/``machineid''
# after which you should do
#	config machineid
# Machine generic makefile changes should be made in
#	/sys/arch/arm26/conf/Makefile.i386
# 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_*"

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

##
## (1) port identification
##
ARM=		$S/arch/arm
ARM26=		$S/arch/arm26
GENASSYM=	${ARM26}/arm26/genassym.cf

##
## (2) compile settings
##
CPPFLAGS+=	-Darm26
CWARNFLAGS+=	-Wcomment
LOOSE_PROTOTYPES= yes
# We'd like GCC to leave R14 alone as much as possible (so page faults in the
# kernel are safer).
CFLAGS+=	-ffixed-r14
# arm26 systems can safely do unaligned loads.
CFLAGS+=	-mshort-load-words
AFLAGS+=	-x assembler-with-cpp -traditional-cpp

##
## (3) libkern and compat
##

##
## (4) local objects, compile rules, and dependencies
##
MD_OBJS=	vectors.o locore.o
MD_CFILES=
MD_SFILES=	${ARM}/arm/vectors.S ${ARM26}/arm26/locore.S

locore.o: ${ARM26}/arm26/locore.S assym.h
	${NORMAL_S}

vectors.o: ${ARM}/arm/vectors.S
	${NORMAL_S}

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

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

##
## (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"
@


1.20
log
@Add a comment explaining why I use -ffixed-r14 (though actually I'm not sure
it's necessary).
Add -mshort-load-words, since that's safe on all arm26 systems.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.19 2002/01/07 21:15:50 bjh21 Exp $
@


1.19
log
@On arm26, vectors.S needs to be at the start of the kernel text, so that it's
on a page boundary and can be mapped straight into zero page.  This means it
has to be in MD_SFILES on arm26, and not in SFILES.

This probably leaves kernel_text in the wrong place, but it at least leaves the system bootable.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.18 2001/12/19 18:35:35 thorpej Exp $
d37 2
d40 2
@


1.18
log
@Delete MACHINE_ARCH assignment.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.17 2001/12/09 05:00:42 atatat Exp $
d27 1
d47 1
a47 1
MD_OBJS=	locore.o
d49 1
a49 1
MD_SFILES=	${ARM26}/arm26/locore.S
d52 3
@


1.17
log
@Roll the rest of the ports over to the new MI kernel build machinery.
Any problems reported by testers have been fixed, and massive
cross-compiling of kernels has shown that any problems that remain
with actually building kernels are not related to this.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.16 2001/11/23 05:19:02 atatat Exp $
a19 1
MACHINE_ARCH=	arm
@


1.16
log
@Instead of checking for previous usage, just append to some make
variables.  Tweak some variables to provide for more uniform defaults.
Minor adaption to makefiles for already converted ports.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.15 2001/11/20 12:56:22 lukem Exp $
d35 2
@


1.15
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.arm26,v 1.14 2001/11/16 14:53:47 bjh21 Exp $
a29 1
MD_CPPFLAGS=	-Darm26
d34 3
a36 5
CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT \
		${MD_CPPFLAGS}
COPTS?=		-O2
CFLAGS=		-ffixed-r14 ${DEBUG} ${COPTS} ${CWARNFLAGS}
AFLAGS=		-x assembler-with-cpp -traditional-cpp -D_LOCORE
a56 2
LINKFLAGS_DEBUG=	-X
LINKFLAGS_NORMAL=	-S
@


1.14
log
@Don't bother setting lint flags.  arm26 doesn't pass lint anyway, so we may
as well use the defaults.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.13 2001/11/16 14:46:16 bjh21 Exp $
d15 1
a15 1
# To specify debugging, add the config line: makeoptions DEBUG="-g" 
d42 1
a42 1
## (3) libkern and compat 
@


1.13
log
@Use the exciting new MI kernel building machinery on arm26.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.12 2001/10/26 06:45:35 jmc Exp $
a69 1
KERNLINTFLAGS=	-bceghnxzF
@


1.12
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.arm26,v 1.11 2001/10/24 13:53:24 bjh21 Exp $
d3 1
a3 1
# Makefile for NetBSD/arm26
d12 1
a12 1
#	/sys/arch/arm26/conf/Makefile.arm26
d14 5
d20 1
a20 1
MACHINE_ARCH=arm
d22 1
a22 1

d25 15
a39 2
# DEBUG is set to -g if debugging.
# PROF is set to -pg if profiling.
d41 10
a50 33
AR?=	ar
AS?=	as
CC?=	gcc
CPP?=	gcc -E
LD?=	ld
LORDER?=lorder
MKDEP?=	mkdep
NM?=	nm
RANLIB?=ranlib
SIZE?=	size
STRIP?=	strip
TSORT?=	tsort -q

COPTS?=	-O2

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

HAVE_EGCS!=	${CC} --version | egrep "^(2\.[89]|egcs)" ; echo 
INCLUDES=	-I. -I$S/arch -I$S -nostdinc
CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT -Darm26
CWARNFLAGS?=	-Werror -Wall -Wcomment -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=		-ffixed-r14 ${DEBUG} ${COPTS} ${CWARNFLAGS}
AFLAGS=		-x assembler-with-cpp -D_LOCORE
d52 2
a53 36
LOADADDRESS=	0x02098000
LINKFLAGS=	-N # No gap between text and data
.ifdef ROMTEXTBASE
LINKFLAGS+=	-Ttext ${ROMTEXTBASE} -Tdata ${LOADADDRESS} -e start
.else
LINKFLAGS+=	-Ttext ${LOADADDRESS} -e start
.endif
STRIPFLAGS=	-g

# Re-arrange for cross-compiling
HOSTED_CC=	cc
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS=	${CFLAGS}

### find out what to use for libkern
.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 ${TYPE}_${SUFFIX} where TYPE is NORMAL or
# HOSTED}, and 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 $<
NORMAL_S=	${CC} ${AFLAGS} ${CPPFLAGS} -c $<
d55 21
a75 1
HOSTED_C=	${HOSTED_CC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
a82 30
# load lines for config "xxx" will be emitted as:
# xxx: ${SYSTEM_DEP} swapxxx.o
#	${SYSTEM_LD_HEAD}
#	${SYSTEM_LD} swapxxx.o
#	${SYSTEM_LD_TAIL}
.ifdef MONITOR
SYSTEM_OBJ=	locore.o modedefs.o \
		param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
.else
SYSTEM_OBJ=	locore.o \
		param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
.endif
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
LINKFLAGS+=	-x
.endif

d85 1
a85 75
assym.h: $S/kern/genassym.sh ${ARM26}/arm26/genassym.cf
	sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
	    < ${ARM26}/arm26/genassym.cf > assym.h.tmp && \
	    mv -f assym.h.tmp assym.h

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 modedefs.c

__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=	${ARM26}/arm26/locore.S param.c ioconf.c ${CFILES} ${SFILES}
.ifdef MONITOR
SRCS+=	modedefs.c
.endif
depend: .depend
.depend: ${SRCS} assym.h param.c
	${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM26}/arm26/locore.S
	${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
	test -z "${SFILES}" || ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
	sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
	    ${CPPFLAGS} < ${ARM26}/arm26/genassym.cf
	@@sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
	@@rm -f assym.dep
.ifdef MONITOR
	${MKDEP} -a ${CFLAGS} ${CPPFLAGS} modedefs.c
.endif

dependall: depend all


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

# depend on maxusers
genassym.o machdep.o: Makefile
d87 4
a90 26
# depend on CPU configuration 
cpufunc.o cpufunc_asm.o cpuswitch.o fault.o machdep.o: Makefile


locore.o: ${ARM26}/arm26/locore.S assym.h
	${NORMAL_S}

modedefs.c: ${ARM32}/vidc/makemodes.awk ${ARM32}/conf/monitors/${MONITOR} Makefile
	awk -f ${ARM32}/vidc/makemodes.awk ${ARM32}/conf/monitors/${MONITOR} ${MODES} >modedefs.c

modedefs.o: modedefs.c
	${NORMAL_C}

# 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.12.2.1
log
@file Makefile.arm26 was added on branch nathanw_sa on 2002-01-08 00:23:21 +0000
@
text
@d1 235
@


1.12.2.2
log
@Catch up to -current.
@
text
@a0 85
#	$NetBSD: Makefile.arm26,v 1.12.2.1 2002/01/08 00:23:21 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/arm26/conf/``machineid''
# after which you should do
#	config machineid
# Machine generic makefile changes should be made in
#	/sys/arch/arm26/conf/Makefile.i386
# 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_*"

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

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

##
## (2) compile settings
##
CPPFLAGS+=	-Darm26
CWARNFLAGS+=	-Wcomment
LOOSE_PROTOTYPES= yes
CFLAGS+=	-ffixed-r14
AFLAGS+=	-x assembler-with-cpp -traditional-cpp

##
## (3) libkern and compat
##

##
## (4) local objects, compile rules, and dependencies
##
MD_OBJS=	locore.o
MD_CFILES=
MD_SFILES=	${ARM26}/arm26/locore.S

locore.o: ${ARM26}/arm26/locore.S assym.h
	${NORMAL_S}

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

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

##
## (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"
@


1.12.2.3
log
@More catchup.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.12.2.2 2002/01/11 23:38:07 nathanw Exp $
a26 1
ARM=		$S/arch/arm
d46 1
a46 1
MD_OBJS=	vectors.o locore.o
d48 1
a48 1
MD_SFILES=	${ARM}/arm/vectors.S ${ARM26}/arm26/locore.S
a52 3
vectors.o: ${ARM}/arm/vectors.S
	${NORMAL_S}

@


1.12.2.4
log
@Catch up to -current.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.12.2.3 2002/02/28 04:07:47 nathanw Exp $
@


1.12.2.5
log
@Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
@
text
@d1 89
@


1.11
log
@We set MACHINE_ARCH to "arm" on arm26 now.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.10 2001/10/23 19:26:43 thorpej Exp $
d16 1
@


1.10
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.arm26,v 1.9 2001/10/23 17:32:36 thorpej Exp $
d15 1
a15 1
MACHINE_ARCH=arm26
@


1.10.2.1
log
@Sync the thorpej-mips-cache branch with -current.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.12 2001/10/26 06:45:35 jmc Exp $
d15 1
a15 2
MACHINE_ARCH=arm
USETOOLS?=	no
@


1.9
log
@Pull in <bsd.own.mk> to get the correct toolchain definitions for
the USE_NEW_TOOLCHAIN case.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.8 2001/07/28 13:48:32 bjh21 Exp $
d15 2
a20 3

MACHINE=arm26
MACHINE_ARCH=arm26
@


1.8
log
@Use ld -N (OMAGIC), since this saves the 32k of RAM (by not putting a gap
between text and data) and means that loadfile only needs one backward seek
to load the file rather than two (which is important for gzipped kernels).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.7 2001/05/29 02:20:21 mrg Exp $
d14 2
@


1.7
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.arm26,v 1.6 2001/02/17 19:38:36 bjh21 Exp $
d56 1
d58 1
a58 1
LINKFLAGS=	-Ttext ${ROMTEXTBASE} -Tdata ${LOADADDRESS} -e start
d60 1
a60 1
LINKFLAGS=	-Ttext ${LOADADDRESS} -e start
@


1.7.2.1
log
@update to -current
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.8 2001/07/28 13:48:32 bjh21 Exp $
a55 1
LINKFLAGS=	-N # No gap between text and data
d57 1
a57 1
LINKFLAGS+=	-Ttext ${ROMTEXTBASE} -Tdata ${LOADADDRESS} -e start
d59 1
a59 1
LINKFLAGS+=	-Ttext ${LOADADDRESS} -e start
@


1.7.2.2
log
@Sync kqueue branch with -current.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.7.2.1 2001/08/03 04:11:04 lukem Exp $
d3 1
a3 1
# Makefile for NetBSD
d12 1
a12 1
#	/sys/arch/arm26/conf/Makefile.i386
a13 5
#
# 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_*"
d15 2
a16 30
USETOOLS?=	no
NEED_OWN_INSTALL_TARGET?=no
.include <bsd.own.mk>

##
## (1) port identification
##
ARM=		$S/arch/arm
ARM26=		$S/arch/arm26
GENASSYM=	${ARM26}/arm26/genassym.cf

##
## (2) compile settings
##
CPPFLAGS+=	-Darm26
CWARNFLAGS+=	-Wcomment
LOOSE_PROTOTYPES= yes
CFLAGS+=	-ffixed-r14
AFLAGS+=	-x assembler-with-cpp -traditional-cpp

##
## (3) libkern and compat
##

##
## (4) local objects, compile rules, and dependencies
##
MD_OBJS=	vectors.o locore.o
MD_CFILES=
MD_SFILES=	${ARM}/arm/vectors.S ${ARM26}/arm26/locore.S
d18 2
a19 2
locore.o: ${ARM26}/arm26/locore.S assym.h
	${NORMAL_S}
d21 70
a90 2
vectors.o: ${ARM}/arm/vectors.S
	${NORMAL_S}
d92 1
a92 18
##
## (5) link settings
##
TEXTADDR?=	0x02098000
LINKFORMAT=	-N

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

##
## (7) misc settings
##

##
## (8) config(8) generated machinery
##
%INCLUDES
d100 30
d132 101
a233 5

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


1.7.2.3
log
@Catch up with -current.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.7.2.2 2002/01/10 19:38:35 thorpej Exp $
a36 2
# We'd like GCC to leave R14 alone as much as possible (so page faults in the
# kernel are safer).
a37 2
# arm26 systems can safely do unaligned loads.
CFLAGS+=	-mshort-load-words
@


1.7.2.4
log
@catch up with -current on kqueue branch
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.7.2.3 2002/03/16 15:56:18 jdolecek Exp $
@


1.6
log
@Move the RAM base address of the kernel into a variable.
Set CPPFLAGSm CWARNFLAGS and STRIPFLAGS to the same as arm32 uses.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.5 2001/02/17 17:23:48 bjh21 Exp $
d44 1
a44 1
CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Darm26
@


1.6.2.1
log
@Catch up to -current.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.6 2001/02/17 19:38:36 bjh21 Exp $
d44 1
a44 1
CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT -Darm26
@


1.5
log
@Reduce unnecessary differences between this and Makefile.arm32.
Also (more significantly), use the compiler's default -mcpu setting.  This
means I can now build APCS-32 kernels.  They work, too.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.4 2000/12/17 15:52:40 jdolecek Exp $
d44 8
a51 2
CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Darm26  -Wcomment
CWARNFLAGS=	-Wall -Wstrict-prototypes -Wmissing-prototypes
d55 1
d57 1
a57 1
LINKFLAGS=	-Ttext ${ROMTEXTBASE} -Tdata 02098000 -e start
d59 1
a59 1
LINKFLAGS=	-Ttext 02098000 -e start
d61 1
a61 1
STRIPFLAGS=	-d
@


1.4
log
@delete obsolete comment
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.3 2000/09/18 18:33:33 bjh21 Exp $
d26 1
a26 1
LORDER?= lorder
d42 1
d46 1
a46 1
CFLAGS=		-mcpu=arm2 -ffixed-r14 ${DEBUG} ${COPTS} ${CWARNFLAGS}
d81 1
d97 4
d102 2
a103 1
		param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
d114 3
a116 2
		echo cp $@@ $@@.gdb; rm -f $@@.gdb; cp $@@ $@@.gdb; \
		echo ${STRIP} ${STRIPFLAGS} $@@; ${STRIP} ${STRIPFLAGS} $@@
d146 1
a146 1
	    [Ee]rrs linterrs makelinks assym.h.tmp assym.h
d153 1
a153 1
cleandir: __CLEANKERNEL __CLEANDEPEND
d171 4
a174 2
SRCS=	${ARM26}/arm26/locore.S \
	param.c ioconf.c ${CFILES} ${SFILES}
d176 14
a189 4
.depend: ${SRCS} assym.h
	${MKDEP} ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
	${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${ARM26}/arm26/locore.S ${SFILES}
#	${MKDEP} -a ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} ${ARM26}/arm26/genassym.c
d206 18
@


1.3
log
@Add an ROMTEXTBASE option to change where the text segment is linked.  This
might be useful for making rommable kernels if I can get the rest of the
infrastructure sorted.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.2 2000/07/20 20:26:32 bjh21 Exp $
a13 6
#
# 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
@


1.3.2.1
log
@file Makefile.arm26 was added on branch thorpej_scsipi on 2000-11-20 20:02:37 +0000
@
text
@d1 193
@


1.3.2.2
log
@Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
@
text
@a0 193
#	$NetBSD: Makefile.arm26,v 1.3.2.1 2000/11/20 20:02:37 bouyer Exp $

# Makefile for NetBSD/arm26
#
# This makefile is constructed from a machine description:
#	config machineid
# Most changes should be made in the machine description
#	/sys/arch/arm26/conf/``machineid''
# after which you should do
#	config machineid
# Machine generic makefile changes should be made in
#	/sys/arch/arm26/conf/Makefile.arm26
# 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.

MACHINE=arm26
MACHINE_ARCH=arm26

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

COPTS?=	-O2

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

INCLUDES=	-I. -I$S/arch -I$S -nostdinc
CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Darm26  -Wcomment
CWARNFLAGS=	-Wall -Wstrict-prototypes -Wmissing-prototypes
CFLAGS=		-mcpu=arm2 -ffixed-r14 ${DEBUG} ${COPTS} ${CWARNFLAGS}
AFLAGS=		-x assembler-with-cpp -D_LOCORE

.ifdef ROMTEXTBASE
LINKFLAGS=	-Ttext ${ROMTEXTBASE} -Tdata 02098000 -e start
.else
LINKFLAGS=	-Ttext 02098000 -e start
.endif
STRIPFLAGS=	-d

# Re-arrange for cross-compiling
HOSTED_CC=	cc
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS=	${CFLAGS}

### find out what to use for libkern
.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 ${TYPE}_${SUFFIX} where TYPE is NORMAL or
# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).

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

HOSTED_C=	${HOSTED_CC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<

%OBJS

%CFILES

%SFILES

# 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} ${LIBKERN} ${LIBCOMPAT}
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 cp $@@ $@@.gdb; rm -f $@@.gdb; cp $@@ $@@.gdb; \
		echo ${STRIP} ${STRIPFLAGS} $@@; ${STRIP} ${STRIPFLAGS} $@@
.else
#LINKFLAGS+=	-S
LINKFLAGS+=	-x
.endif

%LOAD

assym.h: $S/kern/genassym.sh ${ARM26}/arm26/genassym.cf
	sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
	    < ${ARM26}/arm26/genassym.cf > assym.h.tmp && \
	    mv -f assym.h.tmp assym.h

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: __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=	${ARM26}/arm26/locore.S \
	param.c ioconf.c ${CFILES} ${SFILES}
depend: .depend
.depend: ${SRCS} assym.h
	${MKDEP} ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
	${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${ARM26}/arm26/locore.S ${SFILES}
#	${MKDEP} -a ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} ${ARM26}/arm26/genassym.c

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

# depend on maxusers
genassym.o machdep.o: Makefile

# depend on CPU configuration 
cpufunc.o cpufunc_asm.o cpuswitch.o fault.o machdep.o: Makefile


locore.o: ${ARM26}/arm26/locore.S assym.h
	${NORMAL_S}

%RULES
@


1.3.2.3
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.3.2.2 2001/01/05 17:34:02 bouyer Exp $
d14 6
@


1.3.2.4
log
@Sync with HEAD.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.3.2.3 2001/03/12 13:27:29 bouyer Exp $
d26 1
a26 1
LORDER?=lorder
a41 1
HAVE_EGCS!=	${CC} --version | egrep "^(2\.[89]|egcs)" ; echo 
d43 3
a45 9
CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Darm26
CWARNFLAGS?=	-Werror -Wall -Wcomment -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=		-ffixed-r14 ${DEBUG} ${COPTS} ${CWARNFLAGS}
a47 1
LOADADDRESS=	0x02098000
d49 1
a49 1
LINKFLAGS=	-Ttext ${ROMTEXTBASE} -Tdata ${LOADADDRESS} -e start
d51 1
a51 1
LINKFLAGS=	-Ttext ${LOADADDRESS} -e start
d53 1
a53 1
STRIPFLAGS=	-g
a79 1
NOPROF_C=	${CC} ${CFLAGS} ${CPPFLAGS} -c $<
a94 4
.ifdef MONITOR
SYSTEM_OBJ=	locore.o modedefs.o \
		param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
.else
d96 1
a96 2
		param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
.endif
d107 2
a108 3
		echo mv -f $@@ $@@.gdb; mv -f $@@ $@@.gdb; \
		echo ${STRIP} ${STRIPFLAGS} -o $@@ $@@.gdb; \
		${STRIP} ${STRIPFLAGS} -o $@@ $@@.gdb
d138 1
a138 1
	    [Ee]rrs linterrs makelinks assym.h.tmp assym.h modedefs.c
d145 1
a145 1
cleandir distclean: __CLEANKERNEL __CLEANDEPEND
d163 2
a164 4
SRCS=	${ARM26}/arm26/locore.S param.c ioconf.c ${CFILES} ${SFILES}
.ifdef MONITOR
SRCS+=	modedefs.c
.endif
d166 4
a169 14
.depend: ${SRCS} assym.h param.c
	${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM26}/arm26/locore.S
	${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
	test -z "${SFILES}" || ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
	sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
	    ${CPPFLAGS} < ${ARM26}/arm26/genassym.cf
	@@sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
	@@rm -f assym.dep
.ifdef MONITOR
	${MKDEP} -a ${CFLAGS} ${CPPFLAGS} modedefs.c
.endif

dependall: depend all

a186 18
modedefs.c: ${ARM32}/vidc/makemodes.awk ${ARM32}/conf/monitors/${MONITOR} Makefile
	awk -f ${ARM32}/vidc/makemodes.awk ${ARM32}/conf/monitors/${MONITOR} ${MODES} >modedefs.c

modedefs.o: modedefs.c
	${NORMAL_C}

# 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

@


1.2
log
@Include locore.S in the main assembly mkdep.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm26,v 1.1 2000/05/09 21:55:58 bjh21 Exp $
d54 3
d58 1
@


1.1
log
@Initial commit of arm26 port
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.arm32,v 1.28.2.1 1997/11/12 23:45:25 thorpej Exp $
d169 2
a170 3
	${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM26}/arm26/locore.S
	${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
	${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@
