shithub: mc

ref: 62a0866a13cb0e7d0f982b1681be85ae1040f8c1
dir: /libstd/mkfile/

View raw version
</$objtype/mkfile

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

SYSASMSRC= \
	syscall.s \
	util.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 \
	wait.myr \

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

install:V: all
	mkdir -p /$objtype/lib/myr/
	cp lib$STDLIB.a lib$SYSLIB.a /$objtype/lib/myr/
	cp $STDLIB $SYSLIB /$objtype/lib/myr/

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}
LIBS=lib$STDLIB.a lib$SYSLIB.a
.PHONY: clean
clean:V:
	rm -f $OBJ
	rm -f $USE
	rm -f $LIBS $STDLIB $SYSLIB

nuke:V: clean