#!/bin/sh
dst=$1
shift
project=${dst#${TEVWH_OUT}/}
project=${project%/*}

${TEVWH_PATH_NASM} -f bin \
	./src/${project}/${TEVWH_ARCH}-${TEVWH_UNAME}.S \
	-o ${TEVWH_TMP}/${project}/infection \
&& ${TEVWH_PATH_NDISASM} -U ${TEVWH_TMP}/${project}/infection \
| ./src/platform/disasm.pl \
	"-last_line_is_ofs=" \
	"-identfier=infection" \
	"$@" > ${dst}
