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