Merge illumos-gate
[unleashed/lotheac.git] / usr / src / cmd / ypcmd / yppasswd / Makefile
blob0700038c1123565dbde1ac8a06ad84359ad4b8c6
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
22 # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2018, Joyent, Inc.
26 NETYPPROG = rpc.yppasswdd
27 DEFAULTFILES = yppasswdd.dfl
28 PROG = $(NETYPPROG)
30 MANIFEST = passwd.xml
32 include ../../Makefile.cmd
34 ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
36 #installed directories
37 RPCSVC= $(ROOT)/usr/include/rpcsvc
38 NETSVC = $(ROOTLIB)/netsvc
39 NETYP = $(NETSVC)/yp
40 ROOTDIRS = $(NETSVC) $(NETYP)
42 # include library definitions
43 #LDLIBS += -lrpcsvc -lcrypt -lintl -lgen
44 LDLIBS += -lnisdb -lc
45 MAPFILES = $(MAPFILE.INT)
46 LDFLAGS += $(MAPFILES:%=-Wl,-M%)
48 # Pick up includes from library
49 CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
51 INETYPPROG= $(NETYPPROG:%=$(NETYP)/%)
53 COMMONOBJ = yppasswdxdr.o yplckpwdf.o
54 RPCYPPASSWDDOBJ = yppasswdd.o changepasswd.o
56 CERRWARN += -Wno-implicit-function-declaration
57 CERRWARN += -Wno-parentheses
58 CERRWARN += -Wno-uninitialized
60 # not linted
61 SMATCH=off
64 # Objects shared between all the major components
66 SHAREDOBJ= ../shared/utils.o ../shared/lockmap.o ../shared/ancil.o
68 OBJS = $(RPCYPPASSWDDOBJ) \
69 $(COMMONOBJ)
70 # $(YPPWCONVOBJ) $(YPPASSMGMTOBJ)
72 SRCS = $(OBJS:%.o=%.c)
74 #conditional assignments
75 $(INETSVC) := FILEMODE=555
77 $(ETCDFLTFILE) := FILEMODE=0444
79 #install rules
81 .KEEP_STATE:
83 all: $(PROG)
85 rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) $(MAPFILES)
86 $(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \
87 $(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS)
88 $(POST_PROCESS)
90 install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTETCDEFAULTFILES) \
91 $(ROOTMANIFEST)
93 $(ROOTDIRS):
94 $(INS.dir)
96 $(NETYP)/%: %
97 $(INS.file)
99 clean:
100 $(RM) $(OBJS)
103 check: $(CHKMANIFEST)
105 cstyle:
106 ${CSTYLE} ${SRCS}
108 # include library targets
109 include ../../Makefile.targ