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