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