head	1.18;
access;
symbols
	perseant-exfatfs-base-20250801:1.18
	perseant-exfatfs-base-20240630:1.18
	perseant-exfatfs:1.18.0.142
	perseant-exfatfs-base:1.18
	bouyer-sunxi-drm:1.18.0.140
	bouyer-sunxi-drm-base:1.18
	cjep_sun2x:1.18.0.138
	cjep_sun2x-base:1.18
	cjep_staticlib_x-base1:1.18
	cjep_staticlib_x:1.18.0.136
	cjep_staticlib_x-base:1.18
	thorpej-futex-base:1.18
	bouyer-xenpvh-base2:1.18
	phil-wifi-20200421:1.18
	bouyer-xenpvh-base1:1.18
	phil-wifi-20200411:1.18
	bouyer-xenpvh:1.18.0.134
	bouyer-xenpvh-base:1.18
	phil-wifi-20200406:1.18
	ad-namecache-base3:1.18
	ad-namecache-base2:1.18
	ad-namecache-base1:1.18
	ad-namecache:1.18.0.132
	ad-namecache-base:1.18
	isaki-audio2:1.18.0.130
	isaki-audio2-base:1.18
	pgoyette-compat-merge-20190127:1.18
	pgoyette-compat-20190127:1.18
	pgoyette-compat-20190118:1.18
	pgoyette-compat-1226:1.18
	pgoyette-compat-1126:1.18
	pgoyette-compat-1020:1.18
	pgoyette-compat-0930:1.18
	pgoyette-compat-0906:1.18
	pgoyette-compat-0728:1.18
	pgoyette-compat-0625:1.18
	pgoyette-compat-0521:1.18
	pgoyette-compat-0502:1.18
	pgoyette-compat-0422:1.18
	pgoyette-compat-0415:1.18
	pgoyette-compat-0407:1.18
	pgoyette-compat-0330:1.18
	pgoyette-compat-0322:1.18
	pgoyette-compat-0315:1.18
	pgoyette-compat:1.18.0.10
	pgoyette-compat-base:1.18
	perseant-stdc-iso10646:1.18.0.128
	perseant-stdc-iso10646-base:1.18
	prg-localcount2-base3:1.18
	prg-localcount2-base2:1.18
	prg-localcount2-base1:1.18
	prg-localcount2:1.18.0.126
	prg-localcount2-base:1.18
	pgoyette-localcount-20170426:1.18
	bouyer-socketcan-base1:1.18
	pgoyette-localcount-20170320:1.18
	bouyer-socketcan:1.18.0.124
	bouyer-socketcan-base:1.18
	pgoyette-localcount-20170107:1.18
	pgoyette-localcount-20161104:1.18
	localcount-20160914:1.18
	pgoyette-localcount-20160806:1.18
	pgoyette-localcount-20160726:1.18
	pgoyette-localcount:1.18.0.122
	pgoyette-localcount-base:1.18
	netbsd-5-2-3-RELEASE:1.18
	netbsd-5-1-5-RELEASE:1.18
	yamt-pagecache-base9:1.18
	yamt-pagecache-tag8:1.18
	tls-earlyentropy:1.18.0.120
	tls-earlyentropy-base:1.18
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.18
	riastradh-drm2-base3:1.18
	netbsd-5-2-2-RELEASE:1.18
	netbsd-5-1-4-RELEASE:1.18
	netbsd-5-2-1-RELEASE:1.18
	netbsd-5-1-3-RELEASE:1.18
	rmind-smpnet-nbase:1.18
	rmind-smpnet:1.18.0.116
	rmind-smpnet-base:1.18
	agc-symver:1.18.0.118
	agc-symver-base:1.18
	tls-maxphys-base:1.18
	yamt-pagecache-base8:1.18
	netbsd-5-2:1.18.0.114
	yamt-pagecache-base7:1.18
	netbsd-5-2-RELEASE:1.18
	netbsd-5-2-RC1:1.18
	yamt-pagecache-base6:1.18
	yamt-pagecache-base5:1.18
	yamt-pagecache-base4:1.18
	netbsd-5-1-2-RELEASE:1.18
	netbsd-5-1-1-RELEASE:1.18
	jmcneill-usbmp:1.18.0.112
	jmcneill-usbmp-base:1.18
	jmcneill-audiomp3:1.18.0.110
	jmcneill-audiomp3-base:1.18
	yamt-pagecache-base3:1.18
	yamt-pagecache-base2:1.18
	yamt-pagecache:1.18.0.108
	yamt-pagecache-base:1.18
	rmind-uvmplock-nbase:1.18
	bouyer-quota2-nbase:1.18
	bouyer-quota2:1.18.0.106
	bouyer-quota2-base:1.18
	jruoho-x86intr:1.18.0.104
	jruoho-x86intr-base:1.18
	matt-nb5-pq3:1.18.0.102
	matt-nb5-pq3-base:1.18
	netbsd-5-1:1.18.0.100
	netbsd-5-1-RELEASE:1.18
	yamt-nfs-mp-base11:1.18
	netbsd-5-1-RC4:1.18
	uebayasi-xip-base2:1.18
	yamt-nfs-mp-base10:1.18
	netbsd-5-1-RC3:1.18
	netbsd-5-1-RC2:1.18
	netbsd-5-1-RC1:1.18
	rmind-uvmplock:1.18.0.98
	rmind-uvmplock-base:1.18
	yamt-nfs-mp-base9:1.18
	uebayasi-xip:1.18.0.96
	uebayasi-xip-base:1.18
	netbsd-5-0-2-RELEASE:1.18
	yamt-nfs-mp-base8:1.18
	yamt-nfs-mp-base7:1.18
	netbsd-5-0-1-RELEASE:1.18
	jymxensuspend-base:1.18
	yamt-nfs-mp-base6:1.18
	yamt-nfs-mp-base5:1.18
	yamt-nfs-mp-base4:1.18
	jym-xensuspend-nbase:1.18
	yamt-nfs-mp-base3:1.18
	netbsd-5-0:1.18.0.94
	netbsd-5-0-RELEASE:1.18
	netbsd-5-0-RC4:1.18
	netbsd-5-0-RC3:1.18
	netbsd-5-0-RC2:1.18
	jym-xensuspend:1.18.0.92
	jym-xensuspend-base:1.18
	netbsd-5-0-RC1:1.18
	haad-dm-base2:1.18
	haad-nbase2:1.18
	ad-audiomp2:1.18.0.90
	ad-audiomp2-base:1.18
	netbsd-5:1.18.0.88
	netbsd-5-base:1.18
	haad-dm-base1:1.18
	haad-dm:1.18.0.86
	haad-dm-base:1.18
	simonb-wapbl-nbase:1.18
	yamt-pf42-base4:1.18
	simonb-wapbl:1.18.0.84
	simonb-wapbl-base:1.18
	yamt-pf42-base3:1.18
	hpcarm-cleanup-nbase:1.18
	yamt-pf42-base2:1.18
	yamt-nfs-mp-base2:1.18
	yamt-nfs-mp:1.18.0.82
	yamt-nfs-mp-base:1.18
	yamt-pf42:1.18.0.80
	yamt-pf42-base:1.18
	ad-socklock-base1:1.18
	yamt-lazymbuf-base15:1.18
	yamt-lazymbuf-base14:1.18
	keiichi-mipv6-nbase:1.18
	mjf-devfs2:1.18.0.78
	mjf-devfs2-base:1.18
	keiichi-mipv6:1.18.0.76
	keiichi-mipv6-base:1.18
	bouyer-xeni386-merge1:1.18
	vmlocking2-base3:1.18
	bouyer-xeni386-nbase:1.18
	yamt-kmem-base3:1.18
	cube-autoconf:1.18.0.74
	cube-autoconf-base:1.18
	yamt-kmem-base2:1.18
	bouyer-xeni386:1.18.0.72
	bouyer-xeni386-base:1.18
	yamt-kmem:1.18.0.70
	yamt-kmem-base:1.18
	vmlocking2-base2:1.18
	reinoud-bufcleanup-nbase:1.18
	vmlocking2:1.18.0.68
	vmlocking2-base1:1.18
	jmcneill-base:1.18
	mjf-devfs:1.18.0.66
	mjf-devfs-base:1.18
	bouyer-xenamd64-base2:1.18
	vmlocking-nbase:1.18
	yamt-x86pmap-base4:1.18
	bouyer-xenamd64:1.18.0.64
	bouyer-xenamd64-base:1.18
	yamt-x86pmap-base3:1.18
	yamt-x86pmap-base2:1.18
	yamt-x86pmap:1.18.0.62
	yamt-x86pmap-base:1.18
	jmcneill-pm:1.18.0.60
	jmcneill-pm-base:1.18
	hpcarm-cleanup:1.18.0.58
	hpcarm-cleanup-base:1.18
	mjf-ufs-trans-base:1.18
	yamt-idlelwp-base8:1.18
	ppcoea-renovation:1.18.0.56
	ppcoea-renovation-base:1.18
	reinoud-bufcleanup-base:1.18
	vmlocking:1.18.0.54
	vmlocking-base:1.18
	ad-audiomp:1.18.0.52
	ad-audiomp-base:1.18
	yamt-idlelwp:1.18.0.50
	post-newlock2-merge:1.18
	newlock2-nbase:1.18
	yamt-splraiseipl-base5:1.18
	yamt-splraiseipl-base4:1.18
	yamt-splraiseipl-base3:1.18
	yamt-splraiseipl-base2:1.18
	yamt-splraiseipl:1.18.0.48
	yamt-splraiseipl-base:1.18
	newlock2:1.18.0.46
	newlock2-base:1.18
	yamt-pdpolicy-base8:1.18
	yamt-pdpolicy-base7:1.18
	yamt-pdpolicy-base6:1.18
	gdamore-uart:1.18.0.44
	gdamore-uart-base:1.18
	simonb-timcounters-final:1.18
	yamt-pdpolicy-base5:1.18
	elad-kernelauth-nbase:1.18
	yamt-pdpolicy-base4:1.18
	yamt-pdpolicy-base3:1.18
	yamt-pdpolicy-base2:1.18
	yamt-pdpolicy:1.18.0.42
	yamt-pdpolicy-base:1.18
	yamt-uio_vmspace-base5:1.18
	simonb-timecounters:1.18.0.40
	simonb-timecounters-base:1.18
	rpaulo-netinet-merge-pcb:1.18.0.38
	rpaulo-netinet-merge-pcb-base:1.18
	yamt-uio_vmspace:1.18.0.36
	yamt-readahead-base3:1.18
	yamt-readahead-base2:1.18
	yamt-readahead:1.18.0.34
	yamt-readahead-base:1.18
	yamt-vop-base3:1.18
	yamt-vop-base2:1.18
	thorpej-vnode-attr:1.18.0.32
	thorpej-vnode-attr-base:1.18
	yamt-vop:1.18.0.30
	yamt-vop-base:1.18
	yamt-lazymbuf:1.18.0.28
	yamt-km-base4:1.18
	yamt-km-base3:1.18
	yamt-km-base2:1.18
	yamt-km:1.18.0.26
	yamt-km-base:1.18
	kent-audio2:1.18.0.24
	kent-audio2-base:1.18
	ktrace-lwp:1.18.0.22
	ktrace-lwp-base:1.18
	nathanw_sa_before_merge:1.18
	gmcgarry_ctxsw:1.18.0.20
	gmcgarry_ctxsw_base:1.18
	gmcgarry_ucred:1.18.0.18
	gmcgarry_ucred_base:1.18
	nathanw_sa_base:1.18
	gehenna-devsw:1.18.0.16
	gehenna-devsw-base:1.18
	eeh-devprop:1.18.0.14
	eeh-devprop-base:1.18
	newlock:1.18.0.12
	newlock-base:1.18
	ifpoll-base:1.18
	thorpej-mips-cache:1.18.0.8
	thorpej-mips-cache-base:1.18
	thorpej-devvp:1.18.0.6
	thorpej-devvp-base:1.18
	kqueue:1.18.0.4
	kqueue-base:1.18
	thorpej_scsipi_beforemerge:1.18
	thorpej_scsipi_nbase:1.18
	chs-ubc2-newbase:1.18
	fvdl-softdep-base:1.18
	thorpej_scsipi:1.18.0.2
	thorpej_scsipi_base:1.18
	netbsd-1-3-PATCH003:1.14.2.1
	netbsd-1-3-PATCH003-CANDIDATE2:1.14.2.1
	netbsd-1-3-PATCH003-CANDIDATE1:1.14.2.1
	netbsd-1-3-PATCH003-CANDIDATE0:1.14.2.1
	netbsd-1-3-PATCH002:1.14.2.1
	netbsd-1-3-PATCH001:1.14.2.1
	gwr-3x3-base:1.17
	netbsd-1-3-RELEASE:1.14.2.1
	netbsd-1-3-BETA:1.14.2.1
	netbsd-1-3:1.14.0.2
	netbsd-1-3-base:1.14
	thorpej-signal:1.10.0.6
	thorpej-signal-base:1.10
	marc-pcmcia:1.10.0.4
	marc-pcmcia-bp:1.10
	marc-pcmcia-base:1.14
	bouyer-scsipi:1.10.0.2
	is-newarp-before-merge:1.8
	is-newarp:1.4.0.2
	is-newarp-base:1.4
	mrg-vm-swap:1.6.0.2
	thorpej-setroot:1.1.1.1.0.2
	GWR1:1.1.1.1
	GWR:1.1.1;
locks; strict;
comment	@# @;


1.18
date	98.02.05.05.12.12;	author gwr;	state dead;
branches;
next	1.17;

1.17
date	97.11.12.23.12.34;	author thorpej;	state Exp;
branches;
next	1.16;

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

1.15
date	97.10.23.01.41.40;	author gwr;	state Exp;
branches;
next	1.14;

1.14
date	97.10.04.17.15.49;	author gwr;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	97.10.03.07.17.47;	author lukem;	state Exp;
branches;
next	1.12;

1.12
date	97.09.30.23.05.08;	author christos;	state Exp;
branches;
next	1.11;

1.11
date	97.09.12.07.55.23;	author mycroft;	state Exp;
branches;
next	1.10;

1.10
date	97.03.17.20.59.48;	author gwr;	state Exp;
branches
	1.10.4.1;
next	1.9;

1.9
date	97.03.14.23.27.34;	author mycroft;	state Exp;
branches;
next	1.8;

1.8
date	97.02.18.17.12.46;	author gwr;	state Exp;
branches;
next	1.7;

1.7
date	97.02.16.22.18.01;	author jeremy;	state Exp;
branches;
next	1.6;

1.6
date	97.02.11.19.00.21;	author gwr;	state Exp;
branches;
next	1.5;

1.5
date	97.02.11.00.59.56;	author gwr;	state Exp;
branches;
next	1.4;

1.4
date	97.02.04.17.16.38;	author gwr;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	97.02.04.05.08.52;	author perry;	state Exp;
branches;
next	1.2;

1.2
date	97.02.04.04.32.22;	author perry;	state Exp;
branches;
next	1.1;

1.1
date	97.01.14.20.57.01;	author gwr;	state Exp;
branches
	1.1.1.1;
next	;

1.14.2.1
date	97.11.12.23.42.38;	author thorpej;	state Exp;
branches;
next	;

1.10.4.1
date	97.09.16.03.49.34;	author thorpej;	state Exp;
branches;
next	1.10.4.2;

1.10.4.2
date	97.10.14.10.19.26;	author thorpej;	state Exp;
branches;
next	;

1.4.2.1
date	97.03.12.14.21.40;	author is;	state Exp;
branches;
next	;

1.1.1.1
date	97.01.14.20.57.01;	author gwr;	state Exp;
branches
	1.1.1.1.2.1;
next	;

1.1.1.1.2.1
date	97.01.14.20.57.01;	author gwr;	state dead;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	97.01.14.20.57.02;	author gwr;	state Exp;
branches;
next	;


desc
@@


1.18
log
@Merge arch/sun3x into arch/sun3
@
text
@#	$NetBSD: Makefile.sun3x,v 1.17 1997/11/12 23:12:34 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/sun3x/conf/``machineid''
# after which you should do
#	config machineid
# Machine generic makefile changes should be made in
#	/sys/arch/sun3x/conf/Makefile.sun3x
# 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=m68k
MACHINE=sun3x

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
SUN3X=	$S/arch/sun3x

# Override CPP defaults entirely, so cross-compilation works.
# Keep -nostdinc before all -I flags, similar for -undef ...
INCLUDES=	-nostdinc -I. -I$S/arch -I$S
XDEFS=		-undef -D__NetBSD__ -Dm68k -Dmc68000
DEFINES=	-D_KERNEL -Dmc68020 -Dsun3x
CPPFLAGS=	${INCLUDES} ${XDEFS} ${DEFINES} ${IDENT} ${PARAM}
# Make it easy to override this on the command line...
CWARNFLAGS= 	-Wall -Wstrict-prototypes # -Wmissing-prototypes -Werror
CFLAGS= 	${DEBUG} ${COPTS} -msoft-float ${CWARNFLAGS}
# No, we may NOT assume that the compiler does -x whatever...
APPFLAGS=	-P -traditional ${CPPFLAGS} -D_LOCORE
AFLAGS= 	-m68030
LINKFLAGS=	-N -Ttext F8004000 -e start
STRIPFLAGS=	-d

### 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 NORMAL_${SUFFIX} where SUFFIX is
# the file suffix, capitalized (e.g. C for a .c file).

NORMAL_C=	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -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} ${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+=; \
		mv -f $@@ $@@.gdb; cp -p $@@.gdb $@@; \
		${STRIP} ${STRIPFLAGS} $@@
.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: ${SUN3X}/sun3x/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: __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=	${SUN3X}/sun3x/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} ${SUN3X}/sun3x/genassym.c

# XXX - see below
#	${MKDEP} -a ${APPFLAGS} ${SUN3X}/sun3x/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 _startup.o vm_machdep.o: Makefile

# depends on KGDBDEV, KGDBRATE
kgdb_stub.o: Makefile

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

locore.o: ${SUN3X}/sun3x/locore.s
	${NORMAL_S}

# Generated rules follow:

%RULES
@


1.17
log
@Make sure CPP, AR, AS, and RANLIB are defined.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.16 1997/11/12 22:26:39 thorpej Exp $
@


1.16
log
@Define LORDER, NM, and TSORT here, like we do the rest of the tools.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.15 1997/10/23 01:41:40 gwr Exp $
d28 1
d36 1
d40 1
@


1.15
log
@Generate assym.h into assym.h.tmp first, then move it.  (safety)
Add a dependency for stub.o:Makefile
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.14 1997/10/04 17:15:49 gwr Exp $
d32 1
d34 1
d37 1
@


1.14
log
@use common genassym.awk
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.13 1997/10/03 07:17:47 lukem Exp $
d127 2
a128 1
	awk -f $S/kern/genassym.awk < genassym.s > $@@
d213 3
@


1.14.2.1
log
@Sync w/ trunk: tool definitions, generate assym.h in a safer way,
stub.o depends on Makefile.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.17 1997/11/12 23:12:34 thorpej Exp $
a27 1
AR?=	ar
a31 1
LORDER?=lorder
a32 2
NM?=	nm
RANLIB?=ranlib
a34 2
TSORT?=	tsort -q

d127 1
a127 2
	awk -f $S/kern/genassym.awk < genassym.s > assym.h.tmp
	mv -f assym.h.tmp $@@
a211 3

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


1.13
log
@define SIZE?=size, and use ${SIZE} instead of size. makes cross
compilation easier
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.12 1997/09/30 23:05:08 christos Exp $
d126 2
a127 2
assym.h: genassym.o ${SUN3X}/sun3x/genassym.awk
	awk -f ${SUN3X}/sun3x/genassym.awk < genassym.s > $@@
@


1.12
log
@PR/4162: Chris Jones: make cleandir does not work properly; it does not
remove the object files and the .depend file in the kernel build directory.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.11 1997/09/12 07:55:23 mycroft Exp $
d33 1
d107 1
a107 1
SYSTEM_LD_TAIL=	size $@@; chmod 755 $@@
@


1.11
log
@Kill vestiges of Locore.c.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.10 1997/03/17 20:59:48 gwr Exp $
d149 7
d157 3
a159 4
clean: cleankernel
cleankernel:
	rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
	    [Ee]rrs linterrs makelinks genassym genassym.o assym.h
@


1.10
log
@Fixup dependencies
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.9 1997/03/14 23:27:34 mycroft Exp $
d157 1
a157 2
	    ${SUN3X}/sun3x/Locore.c ${CFILES} \
	    ioconf.c param.c | \
@


1.10.4.1
log
@Update marc-pcmcia branch from trunk.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.11 1997/09/12 07:55:23 mycroft Exp $
d157 2
a158 1
	    ${CFILES} ioconf.c param.c | \
@


1.10.4.2
log
@Update marc-pcmcia branch from trunk.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.10.4.1 1997/09/16 03:49:34 thorpej Exp $
a32 1
SIZE?=	size
d106 1
a106 1
SYSTEM_LD_TAIL=	@@${SIZE} $@@; chmod 755 $@@
d125 2
a126 2
assym.h: genassym.o $S/kern/genassym.awk
	awk -f $S/kern/genassym.awk < genassym.s > $@@
d149 3
a151 2
__CLEANKERNEL: .USE
	@@echo "${.TARGET}ing the kernel objects"
d153 1
a153 8
	    [Ee]rrs linterrs makelinks assym.h.tmp assym.h

__CLEANDEPEND: .USE
	rm -f .depend

clean: __CLEANKERNEL

cleandir: __CLEANKERNEL __CLEANDEPEND
@


1.9
log
@Define the `cleankernel' target consistently with other ports.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.8 1997/02/18 17:12:46 gwr Exp $
a115 3
# XXX - temporary:
SYSTEM_LD_TAIL+=; \
		dbsym $@@
d186 5
a190 3
# easiest compromise is to just list those dependencies here.
locore.o: assym.h machine/trap.h m68k/trap.h
copy.o:   assym.h $S/sys/errno.h
d193 1
a193 1
autoconf.o conf.o: Makefile
d199 1
a199 1
genassym.o machdep.o: Makefile
d202 1
a202 4
db_machdep.o dvma.o machdep.o pmap.o sun3x_startup.o vm_machdep.o: Makefile

# depends on DDB symbol space
db_aout.o : Makefile
@


1.8
log
@The previous commit was an "oops" due to out-of-date sys/lib/* files.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.7 1997/02/16 22:18:01 jeremy Exp $
d153 2
a154 1
clean:
@


1.7
log
@Update to use new style ``clean'' and ``depend'' rules.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.6 1997/02/11 19:00:21 gwr Exp $
d153 1
a153 1
clean::
d177 1
a177 1
depend:: .depend
@


1.6
log
@Only run dbsym if not KGDB
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.5 1997/02/11 00:59:56 gwr Exp $
d153 1
a153 1
clean:
d177 1
a177 1
depend: .depend
@


1.5
log
@Sync with sun3.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.4 1997/02/04 17:16:38 gwr Exp $
a115 2
.endif

d119 1
@


1.4
log
@change :: to :
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.3 1997/02/04 05:08:52 perry Exp $
d34 1
a34 4
COPTS?=	-O2

# Need to override this for cross compilation.
HOSTED_CC?=	${CC}
d73 2
a74 2
# 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).
d128 10
a137 11
assym.h: genassym
	./genassym >assym.h

# Doing a cross-build of this is very tricky, and very dependent
# on compatibility of things like structure member alignment in
# the compiler used as HOSTED_CC (must match the native compiler).
# Often this is not possible at all, and you just have to build
# the assym.h file by hand on some other machine. -gwr
genassym: ${SUN3X}/sun3x/genassym.c
	${CC} ${CPPFLAGS} -E $< > $@@.i
	${HOSTED_CC} -o $@@ $@@.i
d207 3
@


1.4.2.1
log
@Merge in Changes from The Trunk.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.8 1997/02/18 17:12:46 gwr Exp $
d34 4
a37 1
COPTS?=	-O2 -fno-defer-pop
d76 2
a77 2
# compile rules: rules are named NORMAL_${SUFFIX} where SUFFIX is
# the file suffix, capitalized (e.g. C for a .c file).
d119 2
a123 1
.endif
d131 11
a141 10
# Use awk to cross-build assym.h from the genassym.s file.
assym.h: genassym.o ${SUN3X}/sun3x/genassym.awk
	awk -f ${SUN3X}/sun3x/genassym.awk < genassym.s > $@@

# 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: ${SUN3X}/sun3x/genassym.c
	${CC} ${CPPFLAGS} -S $<
	${CC} -c $*.s
a210 3

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


1.3
log
@Nuke some options GENERIC residue.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.2 1997/02/04 04:32:22 perry Exp $
d158 1
a158 1
clean::
d182 1
a182 1
depend:: .depend
@


1.2
log
@Nuke some GENERIC residue.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3x,v 1.1.1.1 1997/01/14 20:57:01 gwr Exp $
d164 1
a164 1
	    ${SUN3X}/sun3x/Locore.c ${CFILES} ${SUN3X}/sun3x/swapgeneric.c \
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.sun3,v 1.52 1996/12/01 06:12:38 jonathan Exp $
d163 1
a163 1
	@@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
@


1.1.1.1
log
@Initial import.  Gets as far as nfs_mountroot.
@
text
@@


1.1.1.1.2.1
log
@file Makefile.sun3x was added on branch thorpej-setroot on 1997-01-14 20:57:02 +0000
@
text
@d1 217
@


1.1.1.1.2.2
log
@Initial import.  Gets as far as nfs_mountroot.
@
text
@a0 217
#	$NetBSD: Makefile.sun3x,v 1.1.1.1 1997/01/14 20:57:01 gwr 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/sun3x/conf/``machineid''
# after which you should do
#	config machineid
# Machine generic makefile changes should be made in
#	/sys/arch/sun3x/conf/Makefile.sun3x
# 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=m68k
MACHINE=sun3x

AS?=	as
CC?=	cc
CPP?=	cpp
LD?=	ld
MKDEP?=	mkdep
STRIP?=	strip
COPTS?=	-O2

# Need to override this for cross compilation.
HOSTED_CC?=	${CC}

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

# Override CPP defaults entirely, so cross-compilation works.
# Keep -nostdinc before all -I flags, similar for -undef ...
INCLUDES=	-nostdinc -I. -I$S/arch -I$S
XDEFS=		-undef -D__NetBSD__ -Dm68k -Dmc68000
DEFINES=	-D_KERNEL -Dmc68020 -Dsun3x
CPPFLAGS=	${INCLUDES} ${XDEFS} ${DEFINES} ${IDENT} ${PARAM}
# Make it easy to override this on the command line...
CWARNFLAGS= 	-Wall -Wstrict-prototypes # -Wmissing-prototypes -Werror
CFLAGS= 	${DEBUG} ${COPTS} -msoft-float ${CWARNFLAGS}
# No, we may NOT assume that the compiler does -x whatever...
APPFLAGS=	-P -traditional ${CPPFLAGS} -D_LOCORE
AFLAGS= 	-m68030
LINKFLAGS=	-N -Ttext F8004000 -e start
STRIPFLAGS=	-d

### 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 $<

# 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} ${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+=; \
		mv -f $@@ $@@.gdb; cp -p $@@.gdb $@@; \
		${STRIP} ${STRIPFLAGS} $@@
.else
LINKFLAGS+=	-S
.endif

# XXX - temporary:
SYSTEM_LD_TAIL+=; \
		dbsym $@@

# LOAD+

%LOAD

# LOAD-

assym.h: genassym
	./genassym >assym.h

# Doing a cross-build of this is very tricky, and very dependent
# on compatibility of things like structure member alignment in
# the compiler used as HOSTED_CC (must match the native compiler).
# Often this is not possible at all, and you just have to build
# the assym.h file by hand on some other machine. -gwr
genassym: ${SUN3X}/sun3x/genassym.c
	${CC} ${CPPFLAGS} -E $< > $@@.i
	${HOSTED_CC} -o $@@ $@@.i

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


clean::
	rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
	    [Ee]rrs linterrs makelinks genassym genassym.o assym.h

lint:
	@@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
	    ${SUN3X}/sun3x/Locore.c ${CFILES} ${SUN3X}/sun3x/swapgeneric.c \
	    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=	${SUN3X}/sun3x/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} ${SUN3X}/sun3x/genassym.c

# XXX - see below
#	${MKDEP} -a ${APPFLAGS} ${SUN3X}/sun3x/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 compromise is to just list those dependencies here.
locore.o: assym.h machine/trap.h m68k/trap.h
copy.o:   assym.h $S/sys/errno.h

# 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 
db_machdep.o dvma.o machdep.o pmap.o sun3x_startup.o vm_machdep.o: Makefile

# depends on DDB symbol space
db_aout.o : Makefile

locore.o: ${SUN3X}/sun3x/locore.s
	${NORMAL_S}

# Generated rules follow:

%RULES
@
