2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A#
2N/A# Copyright (c) 1991, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A#
2N/A#
2N/A
2N/ALIBRARY= libnisdb.a
2N/AVERS= .2
2N/APROTOCOL_DIR= $(ROOT)/include/rpcsvc
2N/AYPTOL_DIR= ./yptol
2N/A
2N/ASED= sed
2N/A
2N/AOBJECTS = \
2N/A db_entry.o db_entry_c_xdr.o \
2N/A db_item.o db_item_c_xdr.o \
2N/A db_vers.o db_vers_c_xdr.o \
2N/A db_pickle.o \
2N/A db_table.o db_table_c_xdr.o \
2N/A db_index_entry.o db_index_entry_c.o \
2N/A db_index.o db_index_c_xdr.o \
2N/A db_scheme.o db_scheme_c_xdr.o \
2N/A db_query.o db_query_c_xdr.o \
2N/A db_mindex.o db_mindex2.o db_mindex3.o db_mindex_c_xdr.o \
2N/A db_log_entry.o db_log_entry_c_xdr.o \
2N/A db_log.o \
2N/A db.o \
2N/A xdr_nullptr.o \
2N/A db_dictionary.o db_dictionary_c_xdr.o \
2N/A db_dictxdr.o db_dictlog.o db_dictlog_c_xdr.o \
2N/A nis_db.o \
2N/A nisdb_mt.o nisdb_rw.o \
2N/A nis_hashitem.o \
2N/A ldap_attr.o ldap_cto.o ldap_glob.o ldap_ldap.o \
2N/A ldap_map.o ldap_nisdbquery.o \
2N/A ldap_op.o ldap_parse.o ldap_print.o ldap_ruleval.o \
2N/A ldap_util.o ldap_val.o ldap_xdr.o ldap_scheme.o \
2N/A nis_ldap.o \
2N/A nis_parse_ldap_attr.o nis_parse_ldap_conf.o \
2N/A nis_parse_ldap_map.o nis_parse_ldap_util.o \
2N/A nis_parse_ldap_yp_util.o \
2N/A dit_access.o \
2N/A dit_access_utils.o \
2N/A lock_update.o \
2N/A map_conv.o \
2N/A map_ctrl.o \
2N/A yptol_utils.o \
2N/A shim.o \
2N/A shim_ancil.o \
2N/A shim_lockmap.o \
2N/A ttl_utils.o \
2N/A update.o \
2N/A shim_changepasswd.o \
2N/A stubs.o
2N/A
2N/AX_FILES= \
2N/A db_c.x db_dictionary_c.x db_entry_c.x db_index_c.x \
2N/A db_index_entry_c.x db_item_c.x db_log_c.x db_log_entry_c.x \
2N/A db_mindex_c.x db_query_c.x db_scheme_c.x db_table_c.x \
2N/A db_vers_c.x db_dictlog_c.x
2N/A
2N/ADERIVED_HEADERS= $(X_FILES:%_c.x=%_c.h) $(X_FILES:%_c.x=%.h)
2N/ADERIVED_SOURCES= $(X_FILES:%_c.x=%_c_xdr.c)
2N/ADERIVED_FILES= $(DERIVED_HEADERS) $(DERIVED_SOURCES)
2N/A
2N/A# delete the derived files when cleaning up
2N/ACLEANFILES += $(DERIVED_FILES)
2N/A
2N/A# include library definitions
2N/Ainclude ../Makefile.lib
2N/A
2N/AMAPFILES = mapfile-vers
2N/A
2N/ASRCS= db_dictionary_c_xdr.c db_dictlog_c_xdr.c db_dictxdr.c \
2N/Adb_entry_c_xdr.c db_index_c_xdr.c db_index_entry_c_xdr.c db_item_c_xdr.c \
2N/Adb_log_c_xdr.c db_log_entry_c_xdr.c db_mindex_c_xdr.c db_query_c_xdr.c \
2N/Adb_scheme_c_xdr.c db_table_c_xdr.c db_vers_c_xdr.c \
2N/A$(YPTOL_DIR)/dit_access.c \
2N/A$(YPTOL_DIR)/dit_access_utils.c \
2N/A$(YPTOL_DIR)/lock_update.c \
2N/A$(YPTOL_DIR)/map_conv.c \
2N/A$(YPTOL_DIR)/map_ctrl.c \
2N/A$(YPTOL_DIR)/yptol_utils.c \
2N/A$(YPTOL_DIR)/shim.c \
2N/A$(YPTOL_DIR)/shim_ancil.c \
2N/A$(YPTOL_DIR)/shim_lockmap.c \
2N/A$(YPTOL_DIR)/ttl_utils.c \
2N/A$(YPTOL_DIR)/update.c \
2N/A$(YPTOL_DIR)/shim_changepasswd.c \
2N/A$(YPTOL_DIR)/stubs.c \
2N/A#db_c_xdr.c xdr_nullptr.c
2N/A
2N/A# Libnisdb has grown large enough that there may be too many symbols
2N/A# wanting `small' PIC references. Hence, compile some files with
2N/A# `large' PIC references; the parser files are good candidates, since
2N/A# they're only used at startup, and performance isn't too important.
2N/ALARGESYMS= nis_parse_ldap_conf.o \
2N/A nis_parse_ldap_attr.o \
2N/A nis_parse_ldap_yp_util.o \
2N/A nis_parse_ldap_map.o \
2N/A ldap_parse.o \
2N/A dit_access.o \
2N/A dit_access_utilis.o \
2N/A map_conv.o \
2N/A map_ctrl.o \
2N/A shim.o \
2N/A shim_ancil.o \
2N/A shim_changepasswd.o \
2N/A update.o \
2N/A stubs.o \
2N/A yptol_utils.o \
2N/A nis_parse_ldap_util.o
2N/ALARGEPICS= $(LARGESYMS:%=pics/%)
2N/A$(LARGEPICS) := sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
2N/A$(LARGEPICS) := i386_C_PICFLAGS = $(C_BIGPICFLAGS)
2N/A
2N/ACPPFLAGS += -D_REENTRANT
2N/A
2N/A# This is 32-bit C++ code that was originally developed with -compat=4
2N/ACCFLAGS += $(CCCNOLOCALFOR)
2N/A
2N/A# Extra includes, from yp, for yptol files.
2N/ACPPFLAGS += -I$(SRC)/cmd/ypcmd
2N/A
2N/ALIBS = $(DYNLIB)
2N/AZDEFS = $(ZNODEFS)
2N/ALDLIBS += -lnsl -lldap -lsocket -lc
2N/A
2N/A# A number of interfaces are interposed by numerous applications, therefore
2N/A# prevent direct binding to anything in libnisdb. Disable libnisdb from
2N/A# directly binding to itself, but allow libnisdb to directly bind to its
2N/A# dependencies (ie. map -Bdirect -> -zdirect). Ensure lazy loading is
2N/A# established (which is enabled automatically with -Bdirect). In addition,
2N/A# libnisdb interposes on socket(), so tag this library as an interposer.
2N/A# dependencies (lazyload).
2N/ABDIRECT =
2N/ADYNFLAGS += $(BNODIRECT) $(ZINTERPOSE) $(ZDIRECT) $(ZLAZYLOAD)
2N/A
2N/Aall := TARGET= all
2N/Aclean := TARGET= clean
2N/Aclobber := TARGET= clobber
2N/Ainstall := TARGET= install
2N/Alint := TARGET= lint
2N/Astub := TARGET = stub
2N/Astubinstall := TARGET = stubinstall
2N/A
2N/A.KEEP_STATE:
2N/A
2N/Aall: stub $(DERIVED_FILES) $(LIBS)
2N/A
2N/Ainstall: stubinstall all $(ROOTLIBS) $(ROOTLINKS)
2N/A
2N/Astubinstall: stub $(STUBROOTLIBS) $(STUBROOTLINKS)
2N/A
2N/Alint: $(DERIVED_FILES) .WAIT lintcheck
2N/A
2N/Apics/%.o: %.c
2N/A $(COMPILE.c) -o $@ $<
2N/A $(POST_PROCESS_O)
2N/A
2N/Apics/%.o: %.cc
2N/A $(COMPILE.cc) -o $@ $<
2N/A $(POST_PROCESS_O)
2N/A
2N/Aobjs/%.o pics/%.o profs/%.o: $(YPTOL_DIR)/%.c
2N/A $(COMPILE.c) -o $@ $<
2N/A $(POST_PROCESS_O)
2N/A
2N/A#
2N/A# Pattern matching rules that define how to build the derived files.
2N/A#
2N/A%_c.h: %_c.x
2N/A $(RM) $@
2N/A $(RPCGEN) -DUSINGC -h -o $@ $<
2N/A
2N/A%.h: %_c.x
2N/A $(RM) $@
2N/A $(RPCGEN) -h -o $@ $<
2N/A
2N/A%_c_xdr.c: %_c.x
2N/A $(RM) $@
2N/A $(RPCGEN) -DUSINGC -c -o $@ $<
2N/A
2N/A# rename the xdr_db_free_entry() in the db_table_c_xdr.c. So the one
2N/A# in db_index_entry_c is used instead.
2N/ADB_TABLE=db_table_c
2N/A
2N/A$(DB_TABLE)_xdr.c: $(DB_TABLE).x
2N/A $(RM) $@
2N/A $(RPCGEN) -DUSINGC -c $(DB_TABLE).x |\
2N/A $(SED) -e 's/^xdr_db_free_entry(/__OBSOLETED_xdr_db_free_entry(/' > $@
2N/A
2N/A# include library targets
2N/Ainclude ../Makefile.targ