shithub: riscv

ref: 220dfb87f561f73ec1d154e08511332a660d1119
dir: /sys/src/9/cycv/mkfile/

View raw version
CONF=cycv
CONFLIST=cycv

#must match mem.h
KTZERO=0xf0100020

objtype=arm
</$objtype/mkfile
p=9

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

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

OBJ=\
	ltrap.$O\
	l.$O\
	main.$O\
	mmu.$O\
	trap.$O\
	intr.$O\
	timer.$O\
	$CONF.root.$O\
	$CONF.rootc.$O\
	$DEVS\
	$PORT\


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

$p$CONF.u:D:	$p$CONF
	aux/aout2uimage $p$CONF

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

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

trap.$O main.$O: /sys/include/tos.h

initcode.out: init9.$O initcode.$O /$objtype/lib/libc.a
	$LD -l -R1 -s -o $target $prereq

install:V:	$p$CONF $p$CONF.u
	cp $p$CONF $p$CONF.u /$objtype/
	for(i in $EXTRACOPIES)
		import $i / /n/$i && cp $p$CONF $p$CONF.u /n/$i/$objtype/