xref: /freebsd/sys/conf/sysent.mk (revision 732a02b4e77866604a120a275c082bb6221bd2ff)
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}
24
25MAKESYSCALLS_INTERP?=	${LUA}
26MAKESYSCALLS_SCRIPT?=	${SYSDIR}/tools/makesyscalls.lua
27MAKESYSCALLS=	${MAKESYSCALLS_INTERP} ${MAKESYSCALLS_SCRIPT}
28
29all:
30	@echo "make sysent only"
31
32# We .ORDER these explicitly so that we only run MAKESYSCALLS once, rather than
33# potentially once for each ${GENERATED} file.
34.ORDER: ${GENERATED}
35sysent: ${GENERATED}
36
37${GENERATED}: ${MAKESYSCALLS_SCRIPT} ${SRCS}
38	${MAKESYSCALLS} ${SYSENT_FILE} ${SYSENT_CONF}
39