Makefile revision a87701e9837f8a9ee9e4c4d3186295c0e29f743f
3e240d6559605696cadf630668683708b18de871Tinderbox User# CDDL HEADER START
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# The contents of this file are subject to the terms of the
689023771c563d8660e45d439a207e06e96de28fMark Andrews# Common Development and Distribution License (the "License").
689023771c563d8660e45d439a207e06e96de28fMark Andrews# You may not use this file except in compliance with the License.
689023771c563d8660e45d439a207e06e96de28fMark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
689023771c563d8660e45d439a207e06e96de28fMark Andrews# and limitations under the License.
689023771c563d8660e45d439a207e06e96de28fMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
689023771c563d8660e45d439a207e06e96de28fMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
689023771c563d8660e45d439a207e06e96de28fMark Andrews# If applicable, add the following below this CDDL HEADER, with the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# fields enclosed by brackets "[]" replaced with your own identifying
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# information: Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER END
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# Copyright 2015 Gary Mills
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# Use is subject to license terms.
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User db_mindex.o db_mindex2.o db_mindex3.o db_mindex_c_xdr.o \
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User db_dictxdr.o db_dictlog.o db_dictlog_c_xdr.o \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein ldap_attr.o ldap_cto.o ldap_glob.o ldap_ldap.o \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein ldap_op.o ldap_parse.o ldap_print.o ldap_ruleval.o \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein ldap_util.o ldap_val.o ldap_xdr.o ldap_scheme.o \
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User db_c.x db_dictionary_c.x db_entry_c.x db_index_c.x \
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User db_index_entry_c.x db_item_c.x db_log_c.x db_log_entry_c.x \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein db_mindex_c.x db_query_c.x db_scheme_c.x db_table_c.x \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinDERIVED_HEADERS= $(X_FILES:%_c.x=%_c.h) $(X_FILES:%_c.x=%.h)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserDERIVED_FILES= $(DERIVED_HEADERS) $(DERIVED_SOURCES)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# delete the derived files when cleaning up
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# include library definitions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSRCS= db_dictionary_c_xdr.c db_dictlog_c_xdr.c db_dictxdr.c \
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox Userdb_entry_c_xdr.c db_index_c_xdr.c db_index_entry_c_xdr.c db_item_c_xdr.c \
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox Userdb_log_c_xdr.c db_log_entry_c_xdr.c db_mindex_c_xdr.c db_query_c_xdr.c \
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox Userdb_scheme_c_xdr.c db_table_c_xdr.c db_vers_c_xdr.c \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Libnisdb has grown large enough that there may be too many symbols
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# wanting `small' PIC references. Hence, compile some files with
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# `large' PIC references; the parser files are good candidates, since
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# they're only used at startup, and performance isn't too important.
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User$(LARGEPICS) := sparc_C_PICFLAGS = $(C_BIGPICFLAGS)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User$(LARGEPICS) := i386_C_PICFLAGS = $(C_BIGPICFLAGS)
aa6c5a3e331958d3c92c2facdbd2b8daa55b5959Tinderbox User# More and stricter semantic checks and lint-like checks
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# Have an unused variable that can't be removed
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein$(UVAR_PICS) := CERRWARN += -_gcc=-Wno-unused-variable
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Correcting these might alter logic
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Extra includes, from yp, for yptol files.
4f6469885c3d66367e3f8fb94e1f3c66115990b0Mark Andrews# Need the path to nis_clnt.h
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLNT_PICS = pics/db_entry_c_xdr.o pics/ldap_xdr.o pics/db_mindex_c_xdr.o
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# A number of interfaces are interposed by numerous applications, therefore
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# prevent direct binding to anything in libnisdb. Disable libnisdb from
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# directly binding to itself, but allow libnisdb to directly bind to its
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# dependencies (ie. map -Bdirect -> -zdirect). Ensure lazy loading is
4f6469885c3d66367e3f8fb94e1f3c66115990b0Mark Andrews# established (which is enabled automatically with -Bdirect). In addition,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# libnisdb interposes on socket(), so tag this library as an interposer.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# dependencies (lazyload).
fc74b733bf679e1b3fb1599e32d445dffe325208Tinderbox UserDYNFLAGS += $(BNODIRECT) $(ZINTERPOSE) $(ZDIRECT) $(ZLAZYLOAD)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Pattern matching rules that define how to build the derived files.
197486d6a95ef23b1b414e96577bad21e57801cdTinderbox User $(RPCGEN) -h -o $@ $<
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# rename the xdr_db_free_entry() in the db_table_c_xdr.c. So the one
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# in db_index_entry_c is used instead.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(SED) -e 's/^xdr_db_free_entry(/__OBSOLETED_xdr_db_free_entry(/' > $@
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# include library targets