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