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]
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright (c) 2018, Joyent, Inc.
27 SBINPROG
= keyserv newkey
28 BINPROG
= keylogout keylogin domainname chkey
32 PROG
= $(SBINPROG
) $(BINPROG
)
36 DEFAULTFILES
= keyserv.dfl
38 KEYSERVOBJS
= keyserv.o gen_dhkeys.o xcrypt.o
39 KEYLOGOUTOBJS
= keylogout.o
40 KEYLOGINOBJS
= keylogin.o
41 CHKEYOBJS
= chkey.o gen_dhkeys.o xcrypt.o
42 NEWKEYOBJS
= newkey.o gen_dhkeys.o xcrypt.o
45 DOMAINNAMEOBJS
= domainname.o
46 K_OBJS
= setkey.o detach.o key_generic.o keyserv_cache.o
47 CHANGE_OBJS
= update.o chkey_common.o
48 OUTSIDE_UTIL_OBJS
= selfcheck.o
50 OBJS
= $(KEYSERVOBJS
) $(KEYLOGOUTOBJS
) $(KEYLOGINOBJS
) $(CHKEYOBJS
) \
51 $(NEWKEYOBJS
) $(UPDATEOBJS
) $(DOMAINNAMEOBJS
) \
52 $(K_OBJS
) $(CHANGE_OBJS
)
57 include ..
/Makefile.cmd
59 IBINPROG
= $(BINPROG
:%=$(ROOTBIN
)/%)
60 ISBINPROG
= $(SBINPROG
:%=$(ROOTUSRSBIN
)/%)
62 ROOTMANIFESTDIR
= $(ROOTSVCNETWORKRPC
)
64 $(ROOTBIN
)/chkey
:= FILEMODE
= 4555
66 $(ROOTKEYSERVDFLT
) := FILEMODE
= 444
68 CPPFLAGS
+= -I.
-I
$(SRC
)/lib
/libc
/inc
-I
$(SRC
)/lib
/libsldap
/common
70 CERRWARN
+= -Wno-implicit-function-declaration
71 CERRWARN
+= -Wno-parentheses
72 CERRWARN
+= -Wno-uninitialized
73 CERRWARN
+= -Wno-unused-variable
74 CERRWARN
+= -Wno-address
75 CERRWARN
+= -Wno-unused-function
80 chkey
:= LDLIBS
+= -lsldap
-lmp
-lmd
81 keyserv
:= LDLIBS
+= -lmp
-lmd
82 newkey
:= LDLIBS
+= -lsldap
-lmp
-lmd
88 keyserv
: $(K_OBJS
) $(KEYSERVOBJS
)
89 $(LINK.c
) $(K_OBJS
) $(KEYSERVOBJS
) -o
$@
$(LDLIBS
)
92 keylogout
: $(KEYLOGOUTOBJS
)
93 $(LINK.c
) $(KEYLOGOUTOBJS
) -o
$@
$(LDLIBS
)
96 keylogin
: $(KEYLOGINOBJS
)
97 $(LINK.c
) $(KEYLOGINOBJS
) -o
$@
$(LDLIBS
)
100 chkey
: $(CHKEYOBJS
) $(CHANGE_OBJS
)
101 $(LINK.c
) $(CHANGE_OBJS
) $(CHKEYOBJS
) -o
$@
$(LDLIBS
)
104 newkey
:$(CHANGE_OBJS
) $(NEWKEYOBJS
) $(OUTSIDE_UTIL_OBJS
)
105 $(LINK.c
) $(CHANGE_OBJS
) $(NEWKEYOBJS
) $(OUTSIDE_UTIL_OBJS
) \
109 update
: $(UPDATEOBJS
)
110 $(LINK.c
) $(UPDATEOBJS
) -o
$@
$(LDLIBS
)
113 domainname
: $(DOMAINNAMEOBJS
)
114 $(LINK.c
) $(DOMAINNAMEOBJS
) -o
$@
$(LDLIBS
)
117 selfcheck.o
: ..
/fs.d
/nfs
/lib
/selfcheck.c
118 $(COMPILE.c
) ..
/fs.d
/nfs
/lib
/selfcheck.c
120 install: all $(DIRS
) $(IBINPROG
) $(ISBINPROG
) $(ROOTETCDEFAULTFILES
) \
124 $(RM
) $(OBJS
) $(OUTSIDE_UTIL_OBJS
)
127 check: $(CHKMANIFEST
)
129 key_prot.h
: $(ROOT
)/usr
/include/rpcsvc
/key_prot.x
130 $(RPCGEN
) -h
$(ROOT
)/usr
/include/rpcsvc
/key_prot.x
> key_prot.h
132 include ..
/Makefile.targ