shithub: riscv

ref: b54c61c6174251736e0a6bf30fc1631eca79210c
dir: /sys/src/9/ppc/mkfile/

View raw version
CONF=ucu
CONFLIST=blast ucu

loadaddr = 0x80100000

objtype=power
</$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\
	log.$O\
	rebootcmd.$O\
	page.$O\
	parse.$O\
	pgrp.$O\
	portclock.$O\
	print.$O\
	proc.$O\
	qio.$O\
	qlock.$O\
	rdb.$O\
	segment.$O\
	sysfile.$O\
	sysproc.$O\
	taslock.$O\
	tod.$O\
	xalloc.$O\
	random.$O\

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

HFILES=\
	dat.h\
	errstr.h\
	fns.h\
	io.h\
	mem.h\

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

ETHER=`{echo devether.c ether*.c | sed 's/\.c/.'$O'/g'}
VGA=`{echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'}
SDEV=`{echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'}

CFLAGS=$CFLAGS -D$CONF'conf='$CONF
AFLAGS=$AFLAGS -D$CONF'conf='$CONF

it:V: $p$CONF

9blast:	$OBJ $CONF.$O $LIB
	$LD -o $target -T$loadaddr -R4096 -l $prereq
	size $target

9ucu:	$OBJ $CONF.$O $LIB
	$LD -R0x1000 -H5 -o $target -T$loadaddr -l $prereq

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

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

clock.$O devether.$O main.$O trap.$O:	/$objtype/include/ureg.h
trap.$O main.$O: /sys/include/tos.h

%.$O:	$HFILES

$ETHER: 			../port/etherif.h ../port/netif.h

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