#       $NetBSD: Makefile.xt,v 1.1 2000/02/14 04:39:54 aidan Exp $
# build sources from .ct and .et files.

.ifndef _MAKEFILE_XT_INCLUDED
_MAKEFILE_XT_INCLUDED=1

.include <bsd.own.mk>

COMPILE_ET ?= compile_et
MK_CMDS ?= mk_cmds

.SUFFIXES: .c .ct
.ct.c:
	${MK_CMDS} ${.IMPSRC}

.SUFFIXES: .c .et
.SUFFIXES: .h .et
.et.c .et.h:
	${COMPILE_ET} ${.IMPSRC}

# delete generated .c and .h files
DPSRCS += $(SRCS:M*.et:.et=.h) $(SRCS:M*.et:.et=.c) $(SRCS:M*.ct:.ct=.c)

.endif
