xref: /linux/fs/lockd/Makefile (revision 36d179fd6bea35698d53444b7bd3025fa3788266)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for the linux lock manager stuff
4#
5
6ccflags-y += -I$(src)			# needed for trace events
7
8obj-$(CONFIG_LOCKD) += lockd.o
9
10lockd-y := clntlock.o clntproc.o clntxdr.o host.o svc.o svclock.o \
11	   svcshare.o svcproc.o svcsubs.o mon.o trace.o xdr.o netlink.o
12lockd-$(CONFIG_LOCKD_V4) += clnt4xdr.o svc4proc.o nlm4xdr_gen.o
13lockd-$(CONFIG_PROC_FS) += procfs.o
14
15#
16# XDR code generation (requires Python and additional packages)
17#
18# The generated *xdr_gen.{h,c} files are checked into git. Normal kernel
19# builds do not require the xdrgen tool or its Python dependencies.
20#
21# Developers modifying .x files in Documentation/sunrpc/xdr/ should run
22# "make xdrgen" to regenerate the affected files.
23#
24.PHONY: xdrgen
25
26XDRGEN			= ../../tools/net/sunrpc/xdrgen/xdrgen
27
28XDRGEN_DEFINITIONS	= ../../include/linux/sunrpc/xdrgen/nlm4.h
29XDRGEN_DECLARATIONS	= nlm4xdr_gen.h
30XDRGEN_SOURCE		= nlm4xdr_gen.c
31
32xdrgen: $(XDRGEN_DEFINITIONS) $(XDRGEN_DECLARATIONS) $(XDRGEN_SOURCE)
33
34../../include/linux/sunrpc/xdrgen/nlm4.h: ../../Documentation/sunrpc/xdr/nlm4.x
35	$(XDRGEN) definitions $< > $@
36
37nlm4xdr_gen.h: ../../Documentation/sunrpc/xdr/nlm4.x
38	$(XDRGEN) declarations $< > $@
39
40nlm4xdr_gen.c: ../../Documentation/sunrpc/xdr/nlm4.x
41	$(XDRGEN) source --peer server $< > $@
42