shithub: riscv

ref: 986886f2b8ab4a7e1b3d66e99934d8fdab537be9
dir: /sys/src/ape/lib/mp/port/mkfile/

View raw version
APE=/sys/src/ape
<$APE/config

LIB=/$objtype/lib/ape/libmp.a

FILES=\
	mpaux\
	mpfmt\
	strtomp\
	mptobe\
	mptober\
	mptole\
	mptolel\
	betomp\
	letomp\
	mpadd\
	mpsub\
	mpcmp\
	mpsel\
	mpfactorial\
	mpmul\
	mpleft\
	mpright\
	mpvecadd\
	mpvecsub\
	mpvecdigmuladd\
	mpveccmp\
	mpvectscmp\
	mpdigdiv\
	mpdiv\
	mpexp\
	mpmod\
	mpmodop\
	mpextendedgcd\
	mpinvert\
	mprand\
	mpnrand\
	crt\
	mptoi\
	mptoui\
	mptov\
	mptouv\
	mpfield\
	cnfield\
	gmfield\
	mplogic\

ALLOFILES=${FILES:%=%.$O}

# cull things in the per-machine directories from this list
OFILES=	`{rfork en; \
	if(~ $objtype spim) objtype=mips; \
	bind -a ../../../../libmp/$objtype ../$objtype; \
	rc ../../../../libmp/port/reduce $O $objtype $ALLOFILES}

HFILES=\
	/sys/include/ape/mp.h\
	../../../../libmp/port/dat.h\

CFILES=${FILES:%=%.c}

UPDATE=\
	mkfile\
	$HFILES\
	$CFILES\

</sys/src/cmd/mksyslib

CFLAGS=-TVwc -+ -D_POSIX_SOURCE -D_PLAN9_SOURCE -I. -I../../9

%.$O:	../../../../libmp/port/%.c
	$CC $CFLAGS ../../../../libmp/port/$stem.c