xref: /freebsd/sys/conf/sysent.mk (revision a7dea1671b87c07d2d266f836bfa8b58efc7c134)
1# $FreeBSD$
2
3# Don't use an OBJDIR
4.OBJDIR: ${.CURDIR}
5
6.include <bsd.sysdir.mk>
7.include <src.lua.mk>
8
9COMMON_GENERATED=	proto.h		\
10			syscall.h	\
11			syscalls.c	\
12			sysent.c	\
13			systrace_args.c
14
15GENERATED_PREFIX?=
16GENERATED?=	${COMMON_GENERATED:S/^/${GENERATED_PREFIX}/}
17SYSENT_FILE?=	syscalls.master
18SYSENT_CONF?=	syscalls.conf
19
20# Including Makefile should override SYSENT_FILE and SYSENT_CONF as needed,
21# and set GENERATED.
22SRCS+=	${SYSENT_FILE}
23SRCS+=	${SYSENT_CONF}
24MAKESYSCALLS=	${SYSDIR}/tools/makesyscalls.lua
25
26all:
27	@echo "make sysent only"
28
29# We .ORDER these explicitly so that we only run MAKESYSCALLS once, rather than
30# potentially once for each ${GENERATED} file.
31.ORDER: ${GENERATED}
32sysent: ${GENERATED}
33
34${GENERATED}: ${MAKESYSCALLS} ${SRCS}
35	${LUA} ${MAKESYSCALLS} ${SYSENT_FILE} ${SYSENT_CONF}
36