summaryrefslogtreecommitdiffstats
path: root/utils/statd/Makefile
blob: 6301d27c12506f26f61b34a99f2d64bbe969738c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright (C) 1995-1999 Jeffrey A. Uphoff
# Adapted for linux-nfs build tree by Olaf Kirch, 1996.
#
# NSM for Linux.

TOP	= ../../
# Uncomment for embedded client-side simulation functions.
#SIMUL	= -DSIMULATIONS

# Undefined is normal, defined provides debug logging.
#DEBUG	= -DDEBUG

##################################################################
#	no user-serviceable parts below this line
##################################################################
PROGRAM	= statd
PREFIX	= rpc.
OBJS	= $(SRCS:.c=.o)
CCOPTS	= $(DEBUG) $(SIMUL)
LIBS	= -lexport -lnfs -lmisc $(LIBWRAP) $(LIBNSL)

SRCS	= $(RPCSRCS) $(SIMSRCS) \
	  callback.c notlist.c log.c misc.c monitor.c notify.c simu.c \
	  stat.c statd.c state.c svc_run.c rmtcall.c
HDRS	= $(RPCHDRS) $(SIMHDRS)

RPCSRCS	= sm_inter_clnt.c sm_inter_svc.c sm_inter_xdr.c
RPCHDRS	= sm_inter.h

ifdef SIMUL
SIMSRCS	= sim_sm_inter_clnt.c sim_sm_inter_svc.c
SIMHDRS	= sim_sm_inter.h
SRCS   += simulate.c
endif

MAN8	= statd

include $(TOP)rules.mk

AFLAGS	+= -Wno-unused

$(RPCHDRS) $(RPCSRCS):	sm_inter.x
	$(RM) $(RPCHDRS) $(RPCSRCS)
	$(RPCGEN) -h -o sm_inter.h $<
	$(RPCGEN) -l -o sm_inter_clnt.c $<
	$(RPCGEN) -m -o sm_inter_svc.c $<
	$(RPCGEN) -c -o sm_inter_xdr.c $<

$(SIMHDRS) $(SIMSRCS):	sim_sm_inter.x
	$(RM) $(SIMHDRS) $(SIMSRCS)
	$(RPCGEN) -h -o sim_sm_inter.h $<
	$(RPCGEN) -l -o sim_sm_inter_clnt.c $<
	$(RPCGEN) -m -o sim_sm_inter_svc.c $<

clean::
	$(RM) $(PROGRAM)

distclean::
	$(RM) $(RPCHDRS) $(RPCSRCS) $(SIMHDRS) $(SIMSRCS)

predep:: $(RPCHDRS) $(RPCSRCS)