Print this page
8112 EOF crazier RPC daemons

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/rpcsvc/Makefile
          +++ new/usr/src/cmd/rpcsvc/Makefile
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20  #
  21   21  #
  22   22  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
  25   25  #
  26   26  # cmd/rpcsvc/Makefile
  27   27  
  28   28  PROTOCOL_DIR= $(ROOT)/usr/include/rpcsvc
  29   29  
  30      -BINPROG= rusers rup
  31      -SBINPROG= rwall spray
  32      -RPROG= rpc.rusersd
  33      -SPROG= rpc.sprayd
  34      -WPROG= rpc.rwalld
  35      -TPROG= rpc.rstatd
  36      -
  37      -PROG= $(BINPROG) $(SBINPROG) $(RPROG) $(SPROG) $(WPROG) $(TPROG)
  38      -
  39      -MANIFEST= \
  40      -        rusers.xml \
  41      -        spray.xml \
  42      -        wall.xml \
  43      -        rstat.xml
  44      -
  45      -SVCMETHOD=
  46      -
  47      -SCLNTOBJS= spray.o spray_clnt.o
  48      -SSVCOBJS= spray_subr.o spray_svc.o
  49      -WCLNTOBJS = rwall.o rwall_clnt.o
  50      -WSVCOBJS= rwall_subr.o rwall_svc.o
  51      -TSVCOBJS= rstat_main.o rstat_proc.o rstat_svc.o rstat_v2_svc.o rstat_v2_xdr.o
  52      -
  53      -DERIVED_FILES = rstat.x rstat.h rstat_svc.c rstat_v2.h rstat_v2_svc.c \
  54      -                rstat_v2_xdr.c spray.x spray.h spray_clnt.c spray_svc.c \
  55      -                rwall.x rwall.h rwall_svc.c rwall_clnt.c
  56      -
  57   30  include ../Makefile.cmd
  58   31  
  59      -ROOTMANIFESTDIR=        $(ROOTSVCNETWORKRPC)
  60      -
  61      -CPPFLAGS= -I. $(CPPFLAGS.master)
  62      -CERRWARN += -_gcc=-Wno-implicit-function-declaration
  63      -CERRWARN += -_gcc=-Wno-unused-variable
  64      -CERRWARN += -_gcc=-Wno-parentheses
  65      -CERRWARN += -_gcc=-Wno-extra
  66      -CERRWARN += -_gcc=-Wno-unused-function
  67      -LDLIBS += -lnsl
  68      -rusers :=       CFLAGS += $(CCVERBOSE)
  69      -$(BINPROG) :=   LDLIBS += -lrpcsvc
  70      -$(RPROG) :=     LDLIBS += -lrpcsvc
  71      -$(SPROG) :=     LDLIBS += -lrpcsvc
  72      -$(TPROG) :=     LDLIBS += -lrpcsvc
  73      -spray :=        LDLIBS += -lrpcsvc
  74      -
  75      -
  76   32  SUBDIRS= rpc.bootparamd
  77      -OBJS= $(SCLNTOBJS) $(SSVCOBJS) $(WCLNTOBJS) $(WSVCOBJS) $(TSVCOBJS)
  78      -SRCS= $(OBJS:%.o=%.c) rusers.c rpc.rusersd.c rup.c
  79      -
  80   33  ETCFILES= rpc
  81   34  
  82   35  TXTS= $(ETCFILES:%=net_files/%)
  83   36  
  84   37  NETSVC= $(ROOTLIB)/netsvc
  85   38  NIS = $(NETSVC)/nis
  86      -RWALL= $(NETSVC)/rwall
  87      -RUSERS= $(NETSVC)/rusers
  88      -SPRAY= $(NETSVC)/spray
  89      -RSTAT= $(NETSVC)/rstat
  90   39  
  91   40  ROOTDIRS= \
  92   41                  $(NETSVC) \
  93   42                  $(NIS) \
  94      -                $(RWALL) \
  95      -                $(RUSERS) \
  96      -                $(SPRAY) \
  97      -                $(RSTAT)
  98      -
  99      -IBINPROG=               $(BINPROG:%=$(ROOTBIN)/%)
 100      -ISBINPROG=              $(SBINPROG:%=$(ROOTUSRSBIN)/%)
 101      -IWPROG=                 $(WPROG:%=$(RWALL)/%)
 102      -ISPROG=                 $(SPROG:%=$(SPRAY)/%)
 103      -IRPROG=                 $(RPROG:%=$(RUSERS)/%)
 104      -ITPROG=                 $(TPROG:%=$(RSTAT)/%)
       43 +
 105   44  IETCFILES=              $(ETCFILES:%=$(ROOTETC)/%)
 106   45  
 107   46  # non-default file attributes
 108   47  $(ROOTETC)/rpc :=                               FILEMODE=       0644
 109   48  
 110   49  all:=           TARGET= all
 111   50  install:=       TARGET= install
 112   51  clean:=         TARGET= clean
 113   52  clobber:=       TARGET= clobber
 114   53  lint:=          TARGET= lint
 115   54  
 116      -rpc.rstatd:=    LDLIBS += -lkstat
 117      -rwall:=         CPPFLAGS += -D_REENTRANT
 118      -rpc.rwalld:=    CPPFLAGS += -D_REENTRANT
 119      -
 120   55  # install rules
 121   56  
 122      -$(RWALL)/% $(SPRAY)/% $(RUSERS)/% $(RSTAT)/%: %
 123      -        $(INS.file)
 124      -
 125   57  $(ROOTETC)/%: ./net_files/%
 126   58          $(INS.file)
 127   59  
 128   60  .KEEP_STATE:
 129   61  
 130      -all: $(PROG) $(TXTS) $(SUBDIRS)
 131      -
 132      -# multi-object targets
 133      -#
 134      -spray:  $(SCLNTOBJS)
 135      -        $(LINK.c) $(SCLNTOBJS) -o $@ $(LDLIBS)
 136      -        $(POST_PROCESS)
 137      -
 138      -spray_svc.o spray_clnt.o: spray.h
 139      -
 140      -rpc.sprayd: $(SSVCOBJS)
 141      -        $(LINK.c) $(SSVCOBJS) -o $@ $(LDLIBS)
 142      -        $(POST_PROCESS)
 143      -
 144      -rwall_svc.o rwall_clnt.o: rwall.h
 145      -
 146      -rwall: $(WCLNTOBJS)
 147      -        $(LINK.c) $(WCLNTOBJS) -o $@ $(LDLIBS)
 148      -        $(POST_PROCESS)
 149      -
 150      -rpc.rwalld: $(WSVCOBJS)
 151      -        $(LINK.c) $(WSVCOBJS) -o $@ $(LDLIBS)
 152      -        $(POST_PROCESS)
 153      -
 154      -rstat_main.o:   rstat.h rstat_v2.h
 155      -
 156      -rstat_svc.o: rstat.h
       62 +all: $(TXTS) $(SUBDIRS)
 157   63  
 158      -rstat_V2_svc.o rstat_V2_xdr.o: rstat_v2.h
 159      -
 160      -rpc.rstatd: $(TSVCOBJS)
 161      -        $(LINK.c) $(TSVCOBJS) -o $@ $(LDLIBS)
 162      -        $(POST_PROCESS)
 163      -
 164      -install: $(PROG) $(TXTS) .WAIT $(ROOTDIRS) .WAIT $(IBINPROG) $(ISBINPROG) \
 165      -        $(IWPROG) $(ISPROG) $(IRPROG) $(ITPROG) $(IETCFILES) $(SUBDIRS) \
 166      -        $(ROOTMANIFEST) $(ROOTSVCMETHOD)
       64 +install: $(TXTS) .WAIT $(ROOTDIRS) .WAIT $(IETCFILES) $(SUBDIRS)
 167   65  
 168   66  $(ROOTDIRS):
 169   67          $(INS.dir)
 170   68  
 171   69  $(SUBDIRS): FRC
 172   70          @cd $@; pwd; $(MAKE) $(TARGET)
 173   71  
 174      -#
 175      -# Derived files
 176      -#
 177      -
 178      -rstat.x: $(PROTOCOL_DIR)/rstat.x
 179      -        $(RM) rstat.x
 180      -        $(CP) $(PROTOCOL_DIR)/rstat.x rstat.x
 181      -
 182      -rstat.h: $(PROTOCOL_DIR)/rstat.h
 183      -        $(RM) rstat.h
 184      -        $(CP) $(PROTOCOL_DIR)/rstat.h rstat.h
 185      -
 186      -rstat_svc.c: rstat.x
 187      -        $(RPCGEN) -C -m rstat.x > $@
 188      -
 189      -rstat_v2.h: rstat_v2.x
 190      -        $(RPCGEN) -C -h rstat_v2.x > $@
 191      -
 192      -rstat_v2_svc.c: rstat_v2.x
 193      -        $(RPCGEN) -C -m rstat_v2.x > $@
 194      -
 195      -rstat_v2_xdr.c: rstat_v2.x
 196      -        $(RPCGEN) -c rstat_v2.x > $@
 197      -
 198      -spray.x: $(PROTOCOL_DIR)/spray.x
 199      -        $(RM) spray.x
 200      -        $(CP) $(PROTOCOL_DIR)/spray.x spray.x
 201      -
 202      -spray.h: $(PROTOCOL_DIR)/spray.h
 203      -        $(RM) spray.h
 204      -        $(CP) $(PROTOCOL_DIR)/spray.h spray.h
 205      -
 206      -spray_svc.c: spray.x
 207      -        $(RPCGEN) -s datagram_v -s circuit_v spray.x > $@
 208      -
 209      -spray_clnt.c: spray.x
 210      -        $(RPCGEN) -l spray.x > $@
 211      -
 212      -rwall.x: $(PROTOCOL_DIR)/rwall.x
 213      -        $(RM) rwall.x
 214      -        $(CP) $(PROTOCOL_DIR)/rwall.x rwall.x
 215      -
 216      -rwall.h: $(PROTOCOL_DIR)/rwall.h
 217      -        $(RM) rwall.h
 218      -        $(CP) $(PROTOCOL_DIR)/rwall.h rwall.h
 219      -
 220      -rwall_svc.c: rwall.x
 221      -        $(RPCGEN) -A -s datagram_v rwall.x > $@
 222      -
 223      -rwall_clnt.c: rwall.x
 224      -        $(RPCGEN) -l -M rwall.x > $@
 225      -
 226      -check:  $(CHKMANIFEST)
       72 +check:
 227   73  
 228   74  clean: $(SUBDIRS)
 229      -        -$(RM) $(OBJS) $(DERIVED_FILES)
 230   75  
 231   76  clobber: $(SUBDIRS)
 232   77  
 233   78  lint:
 234      -        $(LINT.c) $(WCLNTOBJS:%.o=%.c) -lnsl -lrpcsvc
 235      -        $(LINT.c) $(WSVCOBJS:%.o=%.c) -lnsl -lrpcsvc
 236      -        $(LINT.c) rusers.c -lnsl -lrpcsvc
 237   79  
 238   80  FRC:
 239   81  
 240   82  include ../Makefile.targ
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX