shithub: riscv

ref: bafc196c4b07261923d4f197659a26d0919cdeae
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