shithub: riscv

ref: 49bd8a86f3a07c4f54df94838c07fa653d725afa
dir: /sys/src/9/sgi/mkfile/

View raw version
CONF=indy
CONFLIST=indy

objtype=mips
</$objtype/mkfile
p=9
# must match mem.h
# KTZERO=0x88020000
KTZERO=0x88020000
# must match mem.h
UTZERO=0x4020

# CFLAGS=$CFLAGS -DFPEMUDEBUG

DEVS=`{rc ../port/mkdevlist $CONF}

PORT=\
	alarm.$O\
	alloc.$O\
	allocb.$O\
	auth.$O\
	cache.$O\
	chan.$O\
	clock.$O\
	dev.$O\
	edf.$O\
	fault.$O\
	fptrap.$O\
	mul64fract.$O\
	page.$O\
	parse.$O\
	pgrp.$O\
	portclock.$O\
	print.$O\
	proc.$O\
	qio.$O\
	qlock.$O\
	rdb.$O\
	rebootcmd.$O\
	segment.$O\
	syscallfmt.$O\
	sysfile.$O\
	sysproc.$O\
	taslock.$O\
	tod.$O\
	xalloc.$O\
	userinit.$O\

OBJ=\
	l.$O\
	faultmips.$O\
	main.$O\
	mmu.$O\
	random.$O\
	trap.$O\
	$CONF.root.$O\
	$CONF.rootc.$O\
	$DEVS\
	$PORT\

LIB=\
	/$objtype/lib/libmemlayer.a\
	/$objtype/lib/libmemdraw.a\
	/$objtype/lib/libdraw.a\
	/$objtype/lib/libauth.a\
	/$objtype/lib/libsec.a\
	/$objtype/lib/libmp.a\
	/$objtype/lib/libip.a\
	/$objtype/lib/libc.a\

$p$CONF:	$OBJ $CONF.$O $LIB
	$LD -o $target -l -R8 -H3 -T$KTZERO $prereq
	size $target

install:V:	$p$CONF
	cp $p$CONF /$objtype/

<../boot/bootmkfile
<../port/portmkfile
<|../port/mkbootrules $CONF

initcode.out: init9.$O initcode.$O /$objtype/lib/libc.a
	$LD -T$UTZERO -R4 -s -o $target $prereq

faultmips.$O mmu.$O syscall.$O  trap.$O: /$objtype/include/ureg.h
main.$O:	/$objtype/include/ureg.h errstr.h
main.$O trap.$O: /sys/include/tos.h

%.clean:V:
	rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.*