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 2007 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) 66DYNFLAGS += $(BDIRECT) 67 68# 69# We depend upon a rpcgen file. Specify some additional macros 70# to correctly build and get rid of the derived file 71# 72PROTOCOL_DIR= ../../../head/rpcsvc 73DERIVED_FILES= ../nispasswd_xdr.c 74CLOBBERFILES += $(DERIVED_FILES) 75 76# 77# Don't lint derived files 78# 79lint := SRCS= $(OBJ:%.o=$(SRCDIR)/%.c) 80 81.KEEP_STATE: 82 83all: $(LIBS) 84 85../nispasswd_xdr.c: $(PROTOCOL_DIR)/nispasswd.x 86 $(RPCGEN) -c -C -M $(PROTOCOL_DIR)/nispasswd.x > ../nispasswd_xdr.c 87 88lint: lintcheck 89 90include ../../Makefile.targ 91