1N/A#
1N/A# CDDL HEADER START
1N/A#
1N/A# The contents of this file are subject to the terms of the
1N/A# Common Development and Distribution License (the "License").
1N/A# You may not use this file except in compliance with the License.
1N/A#
1N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A# or http://www.opensolaris.org/os/licensing.
1N/A# See the License for the specific language governing permissions
1N/A# and limitations under the License.
1N/A#
1N/A# When distributing Covered Code, include this CDDL HEADER in each
1N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A# If applicable, add the following below this CDDL HEADER, with the
1N/A# fields enclosed by brackets "[]" replaced with your own identifying
1N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1N/A#
1N/A# CDDL HEADER END
1N/A#
1N/A#
1N/A# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
1N/A#
1N/A# cmd/ldap/Makefile.com
1N/A# Native LDAP II commands (makestyle clean).
1N/A#
1N/Ainclude $(SRC)/cmd/Makefile.cmd
1N/A
1N/ALDAPMOD= ldapmodify
1N/ALDAPADD= ldapadd
1N/ALDAPPROG= ldapmodrdn ldapsearch ldapdelete $(LDAPMOD)
1N/ALDAPSRCS= $(LDAPPROG:%=../common/%.c)
1N/ALDAPOBJS= $(LDAPPROG:%=%.o)
1N/A
1N/A#ldap common
1N/ALDAPCOMMSRC= common.c ldaptool-sasl.c fileurl.c convutf8.c
1N/ALDAPCOMMOBJS= $(LDAPCOMMSRC:%.c=%.o)
1N/A
1N/A# LDAP Naming service commands
1N/A# idsconfig command
1N/AIDSCONFIGPROG= idsconfig
1N/AIDSCONFIGSRC= idsconfig.sh
1N/A
1N/A# ldaplist command
1N/ALDAPLISTPROG= ldaplist
1N/ALDAPLISTSRCS= ldaplist.c mapping.c printResult.c standalone.c
1N/ALDAPLISTOBJS= $(LDAPLISTSRCS:%.c=%.o)
1N/A
1N/A# ldapaddent command
1N/ALDAPADDENTPROG= ldapaddent
1N/ALDAPADDENTSRCS= ldapaddent.c ldapaddrbac.c ldapaddtsol.c standalone.c
1N/ALDAPADDENTOBJS= $(LDAPADDENTSRCS:%.c=%.o)
1N/A
1N/A# ldapclient command
1N/ALDAPCLIENTPROG= ldapclient
1N/ALDAPCLIENTSRCS= ldapclient.c standalone.c
1N/ALDAPCLIENTOBJS= $(LDAPCLIENTSRCS:%.c=%.o)
1N/A
1N/A
1N/ANSLDAPOBJS= $(LDAPLISTOBJS) $(LDAPADDENTOBJS) $(LDAPCLIENTOBJS)
1N/ANSLDAPSRCS= $(LDAPLISTSRCS) $(LDAPADDENTSRCS) $(LDAPCLIENTSRCS)
1N/A
1N/AOBJS= $(LDAPOBJS) $(NSLDAPOBJS) $(LDAPCOMMOBJS)
1N/ASRCS= $(LDAPSRCS) $(NSLDAPSRCS)
1N/AROOTUSRSBIN= $(ROOT)/usr/sbin
1N/AROOTUSRLIBLDAP= $(ROOT)/usr/lib/ldap
1N/A
1N/AROOTSCRIPT= $(IDSCONFIGPROG:%=$(ROOTUSRLIBLDAP)/%)
1N/AROOTUSRSBINPROG= $(LDAPADDENTPROG:%=$(ROOTUSRSBIN)/%) \
1N/A $(LDAPCLIENTPROG:%=$(ROOTUSRSBIN)/%)
1N/A
1N/APROG= $(LDAPPROG) $(LDAPLISTPROG)
1N/AROOTADD= $(ROOTBIN)/$(LDAPADD)
1N/AROOTMOD= $(ROOTBIN)/$(LDAPMOD)
1N/AALLPROG= all $(ROOTADD)
1N/A
1N/ACLOBBERFILES += $(OBJS) $(PROG) $(LDAPCLIENTPROG) $(LDAPADDENTPROG) \
1N/A $(IDSCONFIGPROG) $(LINTOUT)
1N/A
1N/A# creating /var/ldap directory
1N/AROOTVAR_LDAP= $(ROOT)/var/ldap
1N/A
1N/ALINTFLAGS += -erroff=E_INCONS_ARG_DECL2
1N/ALINTFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
1N/A
1N/Aall:= TARGET= all
1N/Ainstall:= TARGET= install
1N/Aclean:= TARGET= clean
1N/Aclobber:= TARGET= clobber
1N/Alint:= TARGET= lint
1N/A
1N/A# C Pre-Processor flags used by C, CC & lint
1N/ACPPFLAGS += -DSUN -DSVR4 -DSOLARIS_LDAP_CMD \
1N/A -I $(SRC)/lib/libldap5/include/ldap \
1N/A -I $(SRC)/lib/libsldap/common \
1N/A -I $(SRC)/lib/libnsl/include/rpcsvc \
1N/A -DNO_LIBLCACHE -DLDAP_REFERRALS -DNET_SSL -DLDAPSSLIO \
1N/A -DHAVE_SASL_OPTIONS -DSOLARIS_LDAP_CMD
1N/ALDLIBS += $(COMPLIB)
1N/A
1N/Aldapmodrdn := LDLIBS += -lldap
1N/Aldapsearch := LDLIBS += -lldap
1N/Aldapdelete := LDLIBS += -lldap
1N/Aldapmodify := LDLIBS += -lldap
1N/Aldaplist := LDLIBS += -lsldap
1N/Aldapaddent := LDLIBS += -lsldap -lnsl
1N/Aldapclient := LDLIBS += -lsldap -lscf
1N/A
1N/Aldaplist := C99MODE = $(C99_ENABLE)
1N/Aldapaddent := C99MODE = $(C99_ENABLE)
1N/Aldapclient := C99MODE = $(C99_ENABLE)
1N/A
1N/Alint := LDLIBS += -lldap -lnsl
1N/A
1N/A.KEEP_STATE:
1N/A
1N/Aall: $(PROG) $(LDAPCLIENTPROG) $(LDAPADDENTPROG) $(IDSCONFIGPROG)
1N/A
1N/A$(LDAPADD): $(LDAPMOD)
1N/A @$(RM) $(LDAPADD); $(LN) $(LDAPMOD) $(LDAPADD)
1N/A
1N/A$(LDAPPROG): ../common/$$@.c $(LDAPCOMMOBJS)
1N/A $(LINK.c) -o $@ ../common/$@.c $(LDAPCOMMOBJS) $(LDLIBS)
1N/A $(POST_PROCESS)
1N/A
1N/A%.o: ../common/%.c
1N/A $(COMPILE.c) -o $@ $<
1N/A $(POST_PROCESS_O)
1N/A
1N/A%.o: ../ns_ldap/%.c
1N/A $(COMPILE.c) -o $@ $<
1N/A $(POST_PROCESS_O)
1N/A
1N/Aidsconfig: ../ns_ldap/$$@.sh
1N/A $(CP) ../ns_ldap/$(IDSCONFIGSRC) $(IDSCONFIGPROG)
1N/A $(CHMOD) 755 $(IDSCONFIGPROG)
1N/A
1N/Aldaplist: $(LDAPLISTOBJS)
1N/A $(LINK.c) -o $@ $(LDAPLISTOBJS) $(LDLIBS)
1N/A $(POST_PROCESS)
1N/A
1N/Aldapaddent: $(LDAPADDENTOBJS)
1N/A $(LINK.c) -o $@ $(LDAPADDENTOBJS) $(LDLIBS)
1N/A $(POST_PROCESS)
1N/A
1N/Aldapclient: $(LDAPCLIENTOBJS)
1N/A $(LINK.c) -o $@ $(LDAPCLIENTOBJS) $(LDLIBS)
1N/A $(POST_PROCESS)
1N/A
1N/Ainstall: all $(ROOTVAR_LDAP) $(ROOTUSRLIBLDAP) $(ROOTADD) $(ROOTUSRSBINPROG) \
1N/A $(ROOTSCRIPT)
1N/A
1N/A$(ROOTUSRLIBLDAP):
1N/A $(INS.dir)
1N/A
1N/A$(ROOTVAR_LDAP):
1N/A $(INS.dir)
1N/A
1N/A$(ROOTADD): $(ROOTPROG)
1N/A $(RM) $@
1N/A $(LN) $(ROOTMOD) $@
1N/A
1N/A$(ROOTUSRLIBLDAP)/%: %
1N/A $(INS.file)
1N/A
1N/AFRC:
1N/A
1N/Aclean:
1N/A $(RM) $(OBJS)
1N/A
1N/A# Not linted Mozilla upstream commands
1N/Alint: lintns_ldaplist lintns_ldapaddent lintns_ldapclient
1N/A
1N/Alintns_ldaplist := C99MODE = $(C99_ENABLE)
1N/A
1N/Alintns_ldaplist:
1N/A $(LINT.c) $(LDAPLISTSRCS:%=../ns_ldap/%) $(LDLIBS) -lsldap
1N/A
1N/Alintns_ldapaddent := C99MODE = $(C99_ENABLE)
1N/A
1N/Alintns_ldapaddent:
1N/A $(LINT.c) $(LDAPADDENTSRCS:%=../ns_ldap/%) $(LDLIBS) -lsldap -lnsl
1N/A
1N/Alintns_ldapclient := C99MODE = $(C99_ENABLE)
1N/A
1N/Alintns_ldapclient:
1N/A $(LINT.c) $(LDAPCLIENTSRCS:%=../ns_ldap/%) $(LDLIBS) -lsldap -lscf
1N/A
1N/Alintc_%:
1N/A $(LINT.c) $(@:lintc_%=../common/%.c) $(LDAPCOMMSRC:%=../common/%) \
1N/A $(LDLIBS)
1N/A
1N/Ainclude $(SRC)/cmd/Makefile.targ