code: purgatorio

ref: 42dfac6916ebbdac65cbec8b3e1a80c3ee41423c
dir: /os/cerf1110/mkfile/

View raw version
<../../mkconfig
TKSTYLE=std

#Configurable parameters

CONF=cerf				#default configuration
CONFLIST=cerf

SYSTARG=$OSTARG
OBJTYPE=arm
INSTALLDIR=$ROOT/Inferno/$OBJTYPE/bin	#path of directory where kernel is installed
#end configurable parameters

<$ROOT/mkfiles/mkfile-$SYSTARG-$OBJTYPE	#set vars based on target system

<| $SHELLNAME ../port/mkdevlist $CONF	#sets $IP, $DEVS, $ETHERS, $VGAS, $PORT, $MISC, $LIBS, $OTHERS

KTZERO=0xC0008010

OBJ=\
	l.$O\
	clock.$O\
	dma.$O\
	fpi.$O\
	fpiarm.$O\
	fpimem.$O\
	main.$O\
	mmu.$O\
	trap.$O\
	$CONF.root.$O\
	$IP\
	$DEVS\
	$ETHERS\
	$LINKS\
	$PORT\
	$MISC\
	$OTHERS\

LIBNAMES=${LIBS:%=lib%.a}
LIBDIRS=$LIBS

HFILES=\
	mem.h\
	dat.h\
	fns.h\
	io.h\
	../sa1110/sa1110io.h\
	../sa1110/fpi.h\

CFLAGS=-wFV -I$ROOT/Inferno/$OBJTYPE/include -I$ROOT/include -I$ROOT/libinterp -I../sa1110
KERNDATE=`{$NDATE}

default:V: i$CONF i$CONF.p9

install:V: $INSTALLDIR/i$CONF

i$CONF: $OBJ $CONF.c $CONF.root.h $LIBNAMES i$CONF.p9
	$CC $CFLAGS '-DKERNDATE='$KERNDATE $CONF.c
	$LD -s -o $target -H5 -T0xC0008010 -R4 -l $OBJ $CONF.$O $LIBFILES

i$CONF.p9: $OBJ $CONF.c $CONF.root.h $LIBNAMES
	$CC $CFLAGS '-DKERNDATE='$KERNDATE $CONF.c
	$LD -o $target -T0xC0008010 -R4 -l $OBJ $CONF.$O $LIBFILES

<../port/portmkfile

%.$O:		../sa1110/%.c
		$CC $CFLAGS -I. ../sa1110/$stem.c

%.$O:		../sa1110/%.s
	$AS -I. -I../sa1110 ../sa1110/$stem.s

../init/$INIT.dis:	../init/$INIT.b
		cd ../init; mk $INIT.dis

clock.$O:	$ROOT/Inferno/$OBJTYPE/include/ureg.h
devether.$O:	$ROOT/Inferno/$OBJTYPE/include/ureg.h
devsapcm.$O:	$ROOT/Inferno/$OBJTYPE/include/ureg.h
main.$O:	$ROOT/Inferno/$OBJTYPE/include/ureg.h
trap.$O:	$ROOT/Inferno/$OBJTYPE/include/ureg.h

devether.$O $ETHERS:	../sa1110/etherif.h ../port/netif.h
$IP devip.$O:		../ip/ip.h
io.h:N:	../sa1110/sa1110io.h

dummy:V:

# to be moved to libinterp 
bench.h:D: ../../module/bench.m
	rm -f $target && limbo -a -I../../module ../../module/bench.m > $target
benchmod.h:D:  ../../module/bench.m
	rm -f $target && limbo -t Bench -I../../module ../../module/bench.m > $target
devbench.$O: bench.h benchmod.h

devaudio.$O:	devaudio.c
	$CC $CFLAGS devaudio.c

arch$CONF.$O:	../sa1110/etherif.h

devuart.$O:	../sa1110/devuart.c
	$CC $CFLAGS ../sa1110/devuart.c