shithub: mc

ref: da76fcf9b4ea98c73b44c3847ac25468789dce67
dir: /libstd/mkfile/

View raw version
</$objtype/mkfile

SYSLIB=sys
SYSSRC= \
	sys.myr \
	systypes.myr \
	ifreq.myr \

SYSASMSRC= \
	syscall.s \
	util+plan9.s


STDLIB=std
STDSRC= \
	alloc.myr \
	bigint.myr \
	bitset.myr \
	blat.myr \
	chartype.myr \
	cmp.myr \
	dial.myr \
	die.myr \
	dir.myr \
	endian.myr \
	env.myr \
	execvp.myr \
	extremum.myr \
	fltbits.myr \
	fmt.myr \
	fltfmt.myr \
	hashfuncs.myr \
	hasprefix.myr \
	hassuffix.myr \
	htab.myr \
	intparse.myr \
	ipparse.myr \
	mk.myr \
	now.myr \
	option.myr \
	optparse.myr \
	pathjoin.myr \
	rand.myr \
	resolve.myr \
	result.myr \
	search.myr \
	slcp.myr \
	sldup.myr \
	sleq.myr \
	slfill.myr \
	sljoin.myr \
	slpush.myr \
	slput.myr \
	slurp.myr \
	sort.myr \
	spork.myr \
	strfind.myr \
	strjoin.myr \
	strsplit.myr \
	strstrip.myr \
	syswrap.myr \
	swap.myr \
	try.myr \
	types.myr \
	units.myr \
	utf.myr \
	varargs.myr \
	waitstatus.myr \

all: lib$STDLIB.a lib$SYSLIB.a

lib$STDLIB.a: $STDSRC $ASMSRC lib$SYSLIB.a
	../myrbuild/$O.out -I. -C../6/$O.out -M../muse/$O.out -l $STDLIB $STDSRC $STDASMSRC

lib$SYSLIB.a: $SYSSRC $SYSASMSRC
	../myrbuild/$O.out -C../6/$O.out -M../muse/$O.out -l $SYSLIB $SYSSRC $SYSASMSRC

%.myr: %+plan9-x64.myr
	cp $stem+plan9-x64.myr $stem.myr

%.myr: %+plan9.myr
	cp $stem+plan9.myr $stem.myr

%.myr: %+x64.myr
	cp $stem+x64.myr $stem.myr

%.s: %+plan9-x64.s
	cp $stem+plan9-x64.s $stem.s

%.s: %+x64.s
	cp $stem+x64.s $stem.s

OBJ=${STDSRC:%.myr=%.o} ${SYSSRC:%.myr=%.o} ${STDASMSRC:%.s=%.o} ${SYSASMSRC:%.s=%.o}
USE=${STDSRC:%.myr=%.use} ${SYSSRC:%.myr=%.use} ${STDLIB}
.PHONY: clean
clean:V:
	rm -f $OBJ
	rm -f $USE
	rm -f lib${STDLIB}.a lib${SYSLIB}.a

nuke:V: clean