#	$NetBSD: Makefile,v 1.12 2008/10/25 22:27:38 apb Exp $

# Makefile for tsarmips tags file and boot blocks

# Find where mips source files are for inclusion in tags
.include <../mips/Makefile.inc>

TTSARMIPS=	../tsarmips/tags
STSARMIPS=	../tsarmips/tsarmips/*.[ch] ../tsarmips/include/*.h \
	../tsarmips/dev/*.[ch] ../tsarmips/tc/*.[ch]
ATSARMIPS=	../tsarmips/tsarmips/*.S

# Directories in which to place tags links
DTSARMIPS=	dev tc include

.include "../../kern/Make.tags.inc"

tags:
	-ctags -wdtf ${TTSARMIPS} ${STSARMIPS} ${SMIPS} ${COMM}
	egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${ATSARMIPS} ${AMIPS} | \
	    ${TOOL_SED} -e \
		"s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
	    >> ${TTSARMIPS}
	sort -o ${TTSARMIPS} ${TTSARMIPS}

links:
	-for i in ${DTSARMIPS}; do \
	    cd $$i && rm -f tags; ln -s ../tags tags; done


SUBDIR=	compile include stand

.include <bsd.subdir.mk>
