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