1 #
   2 # CDDL HEADER START
   3 #
   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.
   7 #
   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.
  12 #
  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]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright 2015 RackTop Systems.
  26 #
  27 
  28 PROG=           rpc.rexd on
  29 # where under
  30 #RPCGEN=                rpcgen
  31 REXDPROG=       rpc.rexd
  32 ONPROG  =       on
  33 
  34 MANIFEST=       rex.xml
  35 
  36 include ../Makefile.cmd
  37 
  38 CERRWARN += -_gcc=-Wno-implicit-function-declaration
  39 CERRWARN += -_gcc=-Wno-parentheses
  40 CERRWARN += -_gcc=-Wno-unused-variable
  41 CERRWARN += -_gcc=-Wno-address
  42 CERRWARN += -_gcc=-Wno-unused-function
  43 CERRWARN += -_gcc=-Wno-extra
  44 
  45 ROOTMANIFESTDIR=        $(ROOTSVCNETWORKRPC)
  46 
  47 SRCS=           $(PROG:%=%.c)
  48 
  49 #OBJS=          errprintf.o mount_nfs.o rex_xdr.o unix_login.o mntent.o
  50 TYPEOBJS=       nfs_subr.o
  51 OBJS=           errprintf.o mount_nfs.o rex.o unix_login.o mntent.o $(TYPEOBJS)
  52 REXDOBJS=       rpc.rexd.o errprintf.o mount_nfs.o rex.o unix_login.o mntent.o
  53 ONOBJS=         on.o sharetab.o where.o rex.o mntent.o
  54 #WHEREOBJS=     sharetab.o where.o where_main.o mntent.o
  55 CLEANOBJS=      exportent.o sharetab.o on.o rpc.rexd.o where.o
  56 #under.o where.o where_main.o
  57 #UNDEROBJS=     errprintf.o sharetab.o mount_nfs.o
  58 
  59 ROOTREXD=       $(ROOTUSRSBIN)
  60 ROOTON=         $(ROOTBIN)
  61 ROOTREXDPROG=   $(REXDPROG:%=$(ROOTREXD)/%)
  62 ROOTONPROG=     $(ONPROG:%=$(ROOTON)/%)
  63 
  64 CPPFLAGS =      -I. $(CPPFLAGS.master)
  65 
  66 LDLIBS +=       -lsocket -lnsl
  67 rpc.rexd :=     LDLIBS += -lrpcsvc -lbsm -lpam
  68 
  69 TYPESRCS=       ../nfs/lib/nfs_subr.c
  70 
  71 # install rule
  72 # don't re-install directories created by Targetdirs
  73 #$(ROOTREXD)/%: %
  74 #       $(INS.file)
  75 #$(ROOTON)/%: %
  76 #       $(INS.file)
  77 
  78 .KEEP_STATE:
  79 
  80 all:    $(PROG)
  81 
  82 rpc.rexd:       $$@.o $(OBJS)
  83         $(LINK.c) -o $@ $@.o $(OBJS) $(LDLIBS)
  84         $(POST_PROCESS)
  85 
  86 on:     $(ONOBJS)
  87         $(LINK.c) -o $@ $(ONOBJS) $(LDLIBS)
  88         $(POST_PROCESS)
  89 
  90 #under: $$@.o $(UNDEROBJS)
  91 #       $(LINK.c) -o $@ $@.o $(UNDEROBJS) $(LDLIBS)
  92 #
  93 #where: $(WHEREOBJS)
  94 #       $(LINK.c) -o $@ $(WHEREOBJS) $(LDLIBS)
  95 #
  96 install: all $(ROOTREXDPROG) $(ROOTONPROG) $(ROOTMANIFEST)
  97 
  98 $(ROOTREXD):    rpc.rexd
  99         $(INS.dir)
 100 $(ROOTON):      on
 101         $(INS.dir)
 102 
 103 check:  $(CHKMANIFEST)
 104 
 105 clean:
 106         $(RM) $(OBJS) $(CLEANOBJS) $(PROG)
 107 
 108 lint:    lint_SRCS
 109 
 110 include ../Makefile.targ
 111 
 112 # derived source files and explicit dependencies
 113 
 114 #rex_xdr.o \
 115 #rex_svc.o \
 116 #rex_clnt.o:    rex.h rex.c
 117 #       $(LINK.c) -c -o $@ rex.c $(LDLIBS)
 118 
 119 on.o:           rex.h
 120 
 121 rpc.rexd.o:             rex.h
 122 
 123 unix_login.o:   rex.h
 124 
 125 rex.o:          rex.h
 126 
 127 nfs_subr.o:     ../fs.d/nfs/lib/nfs_subr.c
 128         $(COMPILE.c)  ../fs.d/nfs/lib/nfs_subr.c