shithub: purgatorio

ref: c0cbe87b357a4464a7d10ab8f38a65c77ea3b629
dir: /os/pc/mkfile/

View raw version
<../../mkconfig

#Configurable parameters

CONF=pc			#default configuration
CONFLIST=pc pcdisk
CLEANCONFLIST=pc pcdisk zpc zpcrem pix pcsoe

SYSTARG=$OSTARG
OBJTYPE=386
INSTALLDIR=$ROOT/Inferno/$OBJTYPE/bin	#path of directory where kernel is installed
#INSTALLDIR=/$OBJTYPE

#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

OBJ=\
	l.$O\
	fpsave.$O\
	portclock.$O\
	tod.$O\
	i8250.$O\
	i8253.$O\
	i8259.$O\
	kbd.$O\
	main.$O\
	memory.$O\
	mmu.$O\
	trap.$O\
	$CONF.root.$O\
	$IP\
	$DEVS\
	$ETHERS\
	$LINKS\
	$PORT\
	$MISC\
	$OTHERS\

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

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

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

default:V: i$CONF

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

install:V: i$CONF
	cp i$CONF $INSTALLDIR/i$CONF

<../port/portmkfile

clock.$O:	$ROOT/Inferno/$OBJTYPE/include/ureg.h
devether.$O:	$ROOT/Inferno/$OBJTYPE/include/ureg.h
fault386.$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:	etherif.h ../port/netif.h
$IP devip.$O:		../ip/ip.h

# to be moved to port/interp 
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
$VGA screen.$O:	screen.h vga.h

devuart.$O:	../port/devuart.c ../port/uart.h
	$CC $CFLAGS ../port/devuart.c