xref: /titanic_41/usr/src/lib/passwdutil/Makefile.com (revision bdb9230ac765cb7af3fc1f4119caf2c5720dceb3)
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 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26LIBRARY=	passwdutil.a
27VERS=		.1
28OBJ=		__check_history.o \
29		__set_authtoken_attr.o \
30		__get_authtoken_attr.o \
31		__user_to_authenticate.o \
32		__verify_rpc_passwd.o \
33		__failed_count.o \
34		files_attr.o	\
35		nis_attr.o	\
36		npd_clnt.o	\
37		nisplus_attr.o	\
38		ldap_attr.o	\
39		nss_attr.o	\
40		switch_utils.o	\
41		utils.o		\
42		debug.o
43
44DERIVED_OBJ=	nispasswd_xdr.o
45
46OBJECTS=	$(OBJ) $(DERIVED_OBJ)
47
48include	../../Makefile.lib
49
50#
51# Since our name doesn't start with "lib", Makefile.lib incorrectly
52# calculates LIBNAME. Therefore, we set it here.
53#
54LIBNAME=	passwdutil
55
56LIBS=		$(DYNLIB) $(LINTLIB)
57$(LINTLIB) :=	SRCS= $(SRCDIR)/$(LINTSRC)
58LDLIBS		+= -lsldap -lnsl -lc
59
60CPPFLAGS	+= -DENABLE_SUNOS_AGING -D_REENTRANT \
61		   -I$(SRC)/lib/libsldap/common -I$(SRC)/lib/libnsl/include
62CFLAGS		+= $(CCVERBOSE)
63
64#
65# We depend upon a rpcgen file. Specify some additional macros
66# to correctly build and get rid of the derived file
67#
68PROTOCOL_DIR=	../../../head/rpcsvc
69DERIVED_FILES=	../nispasswd_xdr.c
70CLOBBERFILES += $(DERIVED_FILES)
71
72#
73# Don't lint derived files
74#
75lint	:=	SRCS= $(OBJ:%.o=$(SRCDIR)/%.c)
76
77.KEEP_STATE:
78
79all:	$(LIBS)
80
81../nispasswd_xdr.c: $(PROTOCOL_DIR)/nispasswd.x
82	$(RPCGEN) -c -C -M $(PROTOCOL_DIR)/nispasswd.x > ../nispasswd_xdr.c
83
84lint:	lintcheck
85
86include ../../Makefile.targ
87