4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright (c) 2018, Joyent, Inc.
27 PROTOCOL_DIR
= $(ROOT
)/usr
/include/rpcsvc
36 PROG
= $(BINPROG
) $(SBINPROG
) $(RPROG
) $(SPROG
) $(WPROG
) $(TPROG
)
46 SCLNTOBJS
= spray.o spray_clnt.o
47 SSVCOBJS
= spray_subr.o spray_svc.o
48 WCLNTOBJS
= rwall.o rwall_clnt.o
49 WSVCOBJS
= rwall_subr.o rwall_svc.o
50 TSVCOBJS
= rstat_main.o rstat_proc.o rstat_svc.o rstat_v2_svc.o rstat_v2_xdr.o
52 DERIVED_FILES
= rstat.x rstat.h rstat_svc.c rstat_v2.h rstat_v2_svc.c \
53 rstat_v2_xdr.c spray.x spray.h spray_clnt.c spray_svc.c \
54 rwall.x rwall.h rwall_svc.c rwall_clnt.c
56 include ..
/Makefile.cmd
58 ROOTMANIFESTDIR
= $(ROOTSVCNETWORKRPC
)
60 CPPFLAGS
= -I.
$(CPPFLAGS.master
)
61 CERRWARN
+= -Wno-implicit-function-declaration
62 CERRWARN
+= -Wno-unused-variable
63 CERRWARN
+= -Wno-parentheses
64 CERRWARN
+= -Wno-extra
65 CERRWARN
+= -Wno-unused-function
70 $(BINPROG
) := LDLIBS
+= -lrpcsvc
71 $(RPROG
) := LDLIBS
+= -lrpcsvc
72 $(SPROG
) := LDLIBS
+= -lrpcsvc
73 $(TPROG
) := LDLIBS
+= -lrpcsvc
74 spray
:= LDLIBS
+= -lrpcsvc
77 SUBDIRS
= rpc.bootparamd
78 OBJS
= $(SCLNTOBJS
) $(SSVCOBJS
) $(WCLNTOBJS
) $(WSVCOBJS
) $(TSVCOBJS
)
79 SRCS
= $(OBJS
:%.o
=%.c
) rusers.c rpc.rusersd.c rup.c
83 TXTS
= $(ETCFILES
:%=net_files
/%)
85 NETSVC
= $(ROOTLIB64
)/netsvc
87 RWALL
= $(NETSVC
)/rwall
88 RUSERS
= $(NETSVC
)/rusers
89 SPRAY
= $(NETSVC
)/spray
90 RSTAT
= $(NETSVC
)/rstat
100 IBINPROG
= $(BINPROG
:%=$(ROOTBIN
)/%)
101 ISBINPROG
= $(SBINPROG
:%=$(ROOTUSRSBIN
)/%)
102 IWPROG
= $(WPROG
:%=$(RWALL
)/%)
103 ISPROG
= $(SPROG
:%=$(SPRAY
)/%)
104 IRPROG
= $(RPROG
:%=$(RUSERS
)/%)
105 ITPROG
= $(TPROG
:%=$(RSTAT
)/%)
106 IETCFILES
= $(ETCFILES
:%=$(ROOTETC
)/%)
108 # non-default file attributes
109 $(ROOTETC
)/rpc
:= FILEMODE
= 0644
112 install:= TARGET
= install
113 clean:= TARGET
= clean
114 clobber:= TARGET
= clobber
116 rpc.rstatd
:= LDLIBS
+= -lkstat
120 $(RWALL
)/% $(SPRAY
)/% $(RUSERS
)/% $(RSTAT
)/%: %
123 $(ROOTETC
)/%: .
/net_files
/%
128 all: $(PROG
) $(TXTS
) $(SUBDIRS
)
130 # multi-object targets
133 $(LINK.c
) $(SCLNTOBJS
) -o
$@
$(LDLIBS
)
136 spray_svc.o spray_clnt.o
: spray.h
138 rpc.sprayd
: $(SSVCOBJS
)
139 $(LINK.c
) $(SSVCOBJS
) -o
$@
$(LDLIBS
)
142 rwall_svc.o rwall_clnt.o
: rwall.h
145 $(LINK.c
) $(WCLNTOBJS
) -o
$@
$(LDLIBS
)
148 rpc.rwalld
: $(WSVCOBJS
)
149 $(LINK.c
) $(WSVCOBJS
) -o
$@
$(LDLIBS
)
152 rstat_main.o
: rstat.h rstat_v2.h
156 rstat_V2_svc.o rstat_V2_xdr.o
: rstat_v2.h
158 rpc.rstatd
: $(TSVCOBJS
)
159 $(LINK.c
) $(TSVCOBJS
) -o
$@
$(LDLIBS
)
162 install: $(PROG
) $(TXTS
) .WAIT
$(ROOTDIRS
) .WAIT
$(IBINPROG
) $(ISBINPROG
) \
163 $(IWPROG
) $(ISPROG
) $(IRPROG
) $(ITPROG
) $(IETCFILES
) $(SUBDIRS
) \
164 $(ROOTMANIFEST
) $(ROOTSVCMETHOD
)
170 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)
176 rstat.x
: $(PROTOCOL_DIR
)/rstat.x
178 $(CP
) $(PROTOCOL_DIR
)/rstat.x rstat.x
180 rstat.h
: $(PROTOCOL_DIR
)/rstat.h
182 $(CP
) $(PROTOCOL_DIR
)/rstat.h rstat.h
185 $(RPCGEN
) -C
-m rstat.x
> $@
187 rstat_v2.h
: rstat_v2.x
188 $(RPCGEN
) -C
-h rstat_v2.x
> $@
190 rstat_v2_svc.c
: rstat_v2.x
191 $(RPCGEN
) -C
-m rstat_v2.x
> $@
193 rstat_v2_xdr.c
: rstat_v2.x
194 $(RPCGEN
) -c rstat_v2.x
> $@
196 spray.x
: $(PROTOCOL_DIR
)/spray.x
198 $(CP
) $(PROTOCOL_DIR
)/spray.x spray.x
200 spray.h
: $(PROTOCOL_DIR
)/spray.h
202 $(CP
) $(PROTOCOL_DIR
)/spray.h spray.h
205 $(RPCGEN
) -s datagram_v
-s circuit_v spray.x
> $@
207 spray_clnt.c
: spray.x
208 $(RPCGEN
) -l spray.x
> $@
210 rwall.x
: $(PROTOCOL_DIR
)/rwall.x
212 $(CP
) $(PROTOCOL_DIR
)/rwall.x rwall.x
214 rwall.h
: $(PROTOCOL_DIR
)/rwall.h
216 $(CP
) $(PROTOCOL_DIR
)/rwall.h rwall.h
219 $(RPCGEN
) -A
-s datagram_v rwall.x
> $@
221 rwall_clnt.c
: rwall.x
222 $(RPCGEN
) -l
-M rwall.x
> $@
224 check: $(CHKMANIFEST
)
227 -$(RM
) $(OBJS
) $(DERIVED_FILES
)
233 include ..
/Makefile.targ