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, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28 29NETYPPROG = rpc.yppasswdd # pwconv passmgmt 30DFLTSRC = yppasswdd.dfl 31PROG = $(NETYPPROG) 32 33MANIFEST = passwd.xml 34 35include ../../Makefile.cmd 36 37ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS) 38 39#installed directories 40RPCSVC= $(ROOT)/usr/include/rpcsvc 41NETSVC = $(ROOTLIB)/netsvc 42NETYP = $(NETSVC)/yp 43DFLTDIR = $(ROOTETC)/default 44ROOTDIRS = $(NETSVC) $(NETYP) $(ROOTETC) $(DFLTDIR) 45 46# include library definitions 47#LDLIBS += -lrpcsvc -lnsl -lcrypt -lintl -lgen 48LDLIBS += -lnsl -lcmd -lc -lnisdb 49 50# Pick up includes from library 51CPPFLAGS += -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 57INETYPPROG= $(NETYPPROG:%=$(NETYP)/%) 58ETCDFLTFILE= $(NETYPPROG:rpc.%=$(DFLTDIR)/%) 59 60COMMONOBJ = yppasswdxdr.o yplckpwdf.o 61RPCYPPASSWDDOBJ = yppasswdd.o changepasswd.o 62#YPPWCONVOBJ = pwconv.o 63#YPPASSMGMTOBJ = passmgmt.o 64 65# 66# Objects shared between all the major components 67# 68SHAREDOBJ= ../shared/utils.o ../shared/lockmap.o ../shared/ancil.o 69 70OBJS = $(RPCYPPASSWDDOBJ) \ 71 $(COMMONOBJ) 72 # $(YPPWCONVOBJ) $(YPPASSMGMTOBJ) 73 74SRCS = $(OBJS:%.o=%.c) 75 76#conditional assignments 77$(INETSVC) := GROUP=bin 78$(INETSVC) := FILEMODE=555 79 80$(ETCDFLTFILE) := GROUP=sys 81$(ETCDFLTFILE) := FILEMODE=0444 82 83$(ROOTMANIFEST) := FILEMODE = 0444 84 85#install rules 86 87.KEEP_STATE: 88 89all: $(PROG) 90 91rpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) 92 $(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \ 93 $(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS) 94 $(POST_PROCESS) 95 96install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ETCDFLTFILE) \ 97 $(ROOTMANIFEST) 98 99$(ROOTDIRS): 100 $(INS.dir) 101 102$(NETYP)/%: % 103 $(INS.file) 104 105$(DFLTDIR)/% : %.dfl 106 $(INS.rename) 107 108clean: 109 $(RM) $(OBJS) 110 111lint: lint_SRCS 112 113check: $(CHKMANIFEST) 114 115cstyle: 116 ${CSTYLE} ${SRCS} 117 118# include library targets 119include ../../Makefile.targ 120