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 2005 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28 29SBINPROG = keyserv newkey 30BINPROG = keylogout keylogin domainname chkey 31 32MANIFEST= keyserv.xml 33 34PROG= $(SBINPROG) $(BINPROG) 35 36HDRS= key_prot.h 37 38DFLTD = $(ROOTETC)/default 39ROOTKEYSERVDFLT = $(DFLTD)/keyserv 40 41KEYSERVOBJS = keyserv.o 42KEYLOGOUTOBJS = keylogout.o 43KEYLOGINOBJS = keylogin.o 44CHKEYOBJS = chkey.o 45NEWKEYOBJS = newkey.o 46UPDATEOBJS = update.o 47 48DOMAINNAMEOBJS = domainname.o 49K_OBJS = setkey.o detach.o key_generic.o keyserv_cache.o 50CHANGE_OBJS = update.o chkey_common.o 51OUTSIDE_UTIL_OBJS = selfcheck.o 52 53OBJS = $(KEYSERVOBJS) $(KEYLOGOUTOBJS) $(KEYLOGINOBJS) $(CHKEYOBJS) \ 54 $(NEWKEYOBJS) $(UPDATEOBJS) $(DOMAINNAMEOBJS) \ 55 $(K_OBJS) $(CHANGE_OBJS) 56SRCS = $(OBJS:.o=.c) 57 58SED= sed 59 60include ../Makefile.cmd 61 62IBINPROG= $(BINPROG:%=$(ROOTBIN)/%) 63ISBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%) 64 65ROOTMANIFESTDIR= $(ROOTSVCNETWORKRPC) 66 67$(ROOTUSRSBIN)/keyserv \ 68$(ROOTUSRSBIN)/newkey := OWNER= root 69$(ROOTUSRSBIN)/keyserv \ 70$(ROOTUSRSBIN)/newkey := GROUP= sys 71 72$(ROOTBIN)/chkey := OWNER= root 73$(ROOTBIN)/chkey := GROUP= sys 74$(ROOTBIN)/chkey := FILEMODE= 4555 75 76$(ROOTKEYSERVDFLT) := OWNER= root 77$(ROOTKEYSERVDFLT) := GROUP= sys 78$(ROOTKEYSERVDFLT) := FILEMODE= 444 79 80$(ROOTMANIFEST) := FILEMODE= 444 81 82CPPFLAGS += -I. -I$(SRC)/lib/libnsl/include -I$(SRC)/lib/libsldap/common \ 83 -D_REENTRANT 84 85LDLIBS += -lnsl 86chkey := LDLIBS += -lsldap 87keyserv := LDLIBS += -lmp -lcmd 88newkey := LDLIBS += -lsldap -lsocket 89 90.KEEP_STATE: 91 92all: $(PROG) 93 94keyserv: $(K_OBJS) $(KEYSERVOBJS) 95 $(LINK.c) $(K_OBJS) $(KEYSERVOBJS) -o $@ $(LDLIBS) 96 $(POST_PROCESS) 97 98keylogout: $(KEYLOGOUTOBJS) 99 $(LINK.c) $(KEYLOGOUTOBJS) -o $@ $(LDLIBS) 100 $(POST_PROCESS) 101 102keylogin: $(KEYLOGINOBJS) 103 $(LINK.c) $(KEYLOGINOBJS) -o $@ $(LDLIBS) 104 $(POST_PROCESS) 105 106$(DFLTD)/%: %.dfl 107 $(INS.rename) 108 109chkey: $(CHKEYOBJS) $(CHANGE_OBJS) 110 $(LINK.c) $(CHANGE_OBJS) $(CHKEYOBJS) -o $@ $(LDLIBS) 111 $(POST_PROCESS) 112 113newkey:$(CHANGE_OBJS) $(NEWKEYOBJS) $(OUTSIDE_UTIL_OBJS) 114 $(LINK.c) $(CHANGE_OBJS) $(NEWKEYOBJS) $(OUTSIDE_UTIL_OBJS) \ 115 -o $@ $(LDLIBS) 116 $(POST_PROCESS) 117 118update: $(UPDATEOBJS) 119 $(LINK.c) $(UPDATEOBJS) -o $@ $(LDLIBS) 120 $(POST_PROCESS) 121 122domainname: $(DOMAINNAMEOBJS) 123 $(LINK.c) $(DOMAINNAMEOBJS) -o $@ $(LDLIBS) 124 $(POST_PROCESS) 125 126selfcheck.o: ../fs.d/nfs/lib/selfcheck.c 127 $(COMPILE.c) ../fs.d/nfs/lib/selfcheck.c 128 129install: all $(DIRS) $(IBINPROG) $(ISBINPROG) $(ROOTKEYSERVDFLT) \ 130 $(ROOTMANIFEST) 131 132clean: 133 $(RM) $(OBJS) 134 135lint: lint_SRCS 136 137check: $(CHKMANIFEST) 138 139key_prot.h : $(ROOT)/usr/include/rpcsvc/key_prot.x 140 $(RPCGEN) -h $(ROOT)/usr/include/rpcsvc/key_prot.x > key_prot.h 141 142include ../Makefile.targ 143