shithub: purgatorio

ref: b7af62b250e5dff30320a181ca9d53ab5a7c276d
dir: /mkfiles/mkone-sh/

View raw version
libs=${LIBS:%=$ROOT/$OBJDIR/lib/lib%.a}

all:V:	$O.out

install:V:	$BIN/$TARG

installall:V:
	for objtype in $CPUS
	do
		mk $MKFLAGS install
	done

nuke:V:	nuke-std

clean:V: clean-std

$O.out:	$OFILES $libs
	$LD $LDFLAGS -o $target $OFILES $libs $SYSLIBS

%.$O:	$HFILES		# don't combine with following %.$O rules

%.$O:	%.c
	$CC $CFLAGS -o $target $stem.c

%.$O:	%.s
	$AS $ASFLAGS -o $target $stem.s

%.$O:	%.S$MACOSINF
	$AS $ASFLAGS -o $target $stem.S

y.tab.h y.tab.c:	$YFILES
	$YACC $YFLAGS $YFILES

clean-std:V:
	rm -f core [$OS].out 
	rm -f `echo $OS | sed 's/./ *.&/g'`

nuke-std:V:	clean-std
	rm -f y.tab.? y.debug y.output

$BIN/%:	$O.out
	rm -f $BIN/$stem && cp $O.out $BIN/$stem