code: purgatorio

ref: c07ad86666257eb54db8723b330d289b13036d44
dir: /emu/Plan9/mkfile/

View raw version
SYSTARG=Plan9
OBJTYPE=$objtype
<../../mkconfig

#Configurable parameters

CONF=emu			#default configuration
CONFLIST=emu
CLEANCONFLIST=

INSTALLDIR=$ROOT/$SYSTARG/$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, $PORT, $LIBS

OBJ=\
	asm-$OBJTYPE.$O\
	os.$O\
	$CONF.root.$O\
	$DEVS\
	$PORT\


HFILES=\

CFLAGS='-DROOT="'$ROOT'"' -DEMU -I. -I../port -I$ROOT/$SYSTARG/$OBJTYPE/include -I$ROOT/include -I$ROOT/libinterp $CTHREADFLAGS $CFLAGS $EMUOPTIONS
KERNDATE=`{$NDATE}

default:V:	$O.$CONF

<../port/portmkfile

$O.$CONF:	$OBJ $CONF.c $CONF.root.h $LIBFILES
	$CC $CFLAGS '-DKERNDATE='$KERNDATE $CONF.c
	$LD  -o $target $OBJ $CONF.$O $LIBFILES $SYSLIBS

safeinstall:V:	$O.$CONF
	mv $INSTALLDIR/$CONF $INSTALLDIR/$CONF.`{date -n}
	cp $O.$CONF $INSTALLDIR/$CONF

install:V: $O.$CONF
	cp $O.$CONF $INSTALLDIR/$CONF