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 (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
  23 #
  24 # Copyright 2020 Joyent, Inc.
  25 
  26 NETYPPROG =     rpc.yppasswdd
  27 DEFAULTFILES =  yppasswdd.dfl
  28 PROG =          $(NETYPPROG)
  29 
  30 MANIFEST = passwd.xml
  31 
  32 include ../../Makefile.cmd
  33 
  34 ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
  35 
  36 #installed directories
  37 RPCSVC=         $(ROOT)/usr/include/rpcsvc
  38 NETSVC =        $(ROOTLIB)/netsvc
  39 NETYP =         $(NETSVC)/yp
  40 ROOTDIRS =      $(NETSVC) $(NETYP)
  41 
  42 # include library definitions
  43 #LDLIBS +=      -lrpcsvc -lnsl -lcrypt -lintl -lgen
  44 LDLIBS +=       -lnsl -lnisdb -lc
  45 MAPFILES =      $(MAPFILE.INT) $(MAPFILE.NGB)
  46 LDFLAGS +=      $(MAPFILES:%=-M%)
  47 
  48 ZGUIDANCE =     -zguidance=nounused
  49 
  50 # Pick up includes from library
  51 CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
  52 
  53 # This file is now in the $(SRC)/head/rpcsvc directory.
  54 #HDRFILE= yppasswd.h
  55 #IHDRFILE= $(HDRFILE:%=$(RPCSVC)/%)
  56 
  57 INETYPPROG=             $(NETYPPROG:%=$(NETYP)/%)
  58 
  59 COMMONOBJ =             yppasswdxdr.o yplckpwdf.o
  60 RPCYPPASSWDDOBJ =       yppasswdd.o changepasswd.o
  61 
  62 CERRWARN +=             -_gcc=-Wno-implicit-function-declaration
  63 CERRWARN +=             -_gcc=-Wno-parentheses
  64 CERRWARN +=             $(CNOWARN_UNINIT)
  65 
  66 # not linted
  67 SMATCH=off
  68 
  69 #
  70 # Objects shared between all the major components
  71 #
  72 SHAREDOBJ= ../shared/utils.o ../shared/lockmap.o ../shared/ancil.o
  73 
  74 OBJS =                  $(RPCYPPASSWDDOBJ) \
  75                         $(COMMONOBJ)
  76                         # $(YPPWCONVOBJ) $(YPPASSMGMTOBJ)
  77 
  78 SRCS =                  $(OBJS:%.o=%.c)
  79 
  80 #conditional assignments
  81 $(INETSVC)   := FILEMODE=555
  82 
  83 $(ETCDFLTFILE) := FILEMODE=0444
  84 
  85 #install rules
  86 
  87 .KEEP_STATE:
  88 
  89 all: $(PROG)
  90 
  91 rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) $(MAPFILES)
  92         $(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \
  93         $(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS)
  94         $(POST_PROCESS)
  95 
  96 install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTETCDEFAULTFILES) \
  97         $(ROOTMANIFEST)
  98 
  99 $(ROOTDIRS):
 100         $(INS.dir)
 101 
 102 $(NETYP)/%: %
 103         $(INS.file)
 104 
 105 clean:
 106         $(RM) $(OBJS)
 107 
 108 check: $(CHKMANIFEST)
 109 
 110 cstyle:
 111         ${CSTYLE} ${SRCS}
 112 
 113 # include library targets
 114 include ../../Makefile.targ