code: purgatorio

ref: 8294be6e7c9032e3c472018b53154d5b4faec00c
dir: /emu/Linux/mkfile/

View raw version
CONF=emu			#default configuration
CONFLIST=emu
CLEANCONFLIST=

SYSTARG=Linux
<../../mkconfig
SYSTARG=Linux

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

X11LIBS= -lX11 -lXext	# can remove or override using env section in config files

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

<| $SHELLNAME ../port/mkdevlist $CONF	#sets $IP, $DEVS, $PORT, $LIBS
<mkfile-$OBJTYPE	# sets $ARCHFILES

OBJ=\
	asm-$OBJTYPE.$O\
	$ARCHFILES\
	os.$O\
	kproc-pthreads.$O\
	segflush-$OBJTYPE.$O\
	$CONF.root.$O\
	lock.$O\
	$DEVS\
	$PORT\

LIBNAMES=${LIBS:%=lib%.a}
#libs=${LIBS:%=$ROOT/$OBJDIR/lib/lib%.a}

HFILES=\

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

default:V:	$O.$CONF

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

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

<../port/portmkfile

devfs.$O:	../port/devfs-posix.c
devds.$O:	../port/devds.c