180e2ca85S# 280e2ca85S# CDDL HEADER START 380e2ca85S# 480e2ca85S# The contents of this file are subject to the terms of the 580e2ca85S# Common Development and Distribution License (the "License"). 680e2ca85S# You may not use this file except in compliance with the License. 780e2ca85S# 880e2ca85S# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 980e2ca85S# or http://www.opensolaris.org/os/licensing. 1080e2ca85S# See the License for the specific language governing permissions 1180e2ca85S# and limitations under the License. 1280e2ca85S# 1380e2ca85S# When distributing Covered Code, include this CDDL HEADER in each 1480e2ca85S# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1580e2ca85S# If applicable, add the following below this CDDL HEADER, with the 1680e2ca85S# fields enclosed by brackets "[]" replaced with your own identifying 1780e2ca85S# information: Portions Copyright [yyyy] [name of copyright owner] 1880e2ca85S# 1980e2ca85S# CDDL HEADER END 2080e2ca85S# 2180e2ca85S# 2280e2ca85S# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2380e2ca85S# 2405ede3dbSJohn Levon# Copyright (c) 2018, Joyent, Inc. 2580e2ca85S 2680e2ca85Sinclude $(SRC)/lib/Makefile.lib 2780e2ca85S 2880e2ca85SLIBRARY = $(BRAND)_librtld_db.a 2980e2ca85SVERS = .1 3080e2ca85S 3180e2ca85SCSRCS = $(COBJS:%o=$(BRAND_SHARED)/librtld_db/common/%c) 3280e2ca85SSRCS = $(CSRCS) 3380e2ca85S 3480e2ca85SSRCDIR = $(BRAND_SHARED)/librtld_db/common 3580e2ca85SUTSBASE = $(SRC)/uts 3680e2ca85S 3780e2ca85S# 3880e2ca85S# ATTENTION: 3980e2ca85S# Librtl_db brand plugin libraries should NOT directly invoke any 4080e2ca85S# libproc.so interfaces or be linked against libproc. If a librtl_db 4180e2ca85S# brand plugin library uses libproc.so interfaces then it may break 4280e2ca85S# any other librtld_db consumers (like mdb) that tries to attach 4380e2ca85S# to a branded process. The only safe interfaces that the a librtld_db 4480e2ca85S# brand plugin library can use to access a target process are the 4580e2ca85S# proc_service(3PROC) apis. 4680e2ca85S# 47*85f4cb87SRichard LoweDYNFLAGS += $(VERSREF) -Wl,-M$(BRAND_SHARED)/librtld_db/common/mapfile-vers 4880e2ca85SLIBS = $(DYNLIB) 4980e2ca85SLDLIBS += -lc -lrtld_db 5080e2ca85SCFLAGS += $(CCVERBOSE) 5180e2ca85SCPPFLAGS += -D_REENTRANT \ 5280e2ca85S -I$(SRC)/cmd/sgs/librtld_db/common \ 5380e2ca85S -I$(SRC)/cmd/sgs/include \ 5480e2ca85S -I$(SRC)/cmd/sgs/include/$(MACH) 5580e2ca85S 5605ede3dbSJohn Levon# not linted 5705ede3dbSJohn LevonSMATCH=off 5805ede3dbSJohn Levon 5980e2ca85SROOTLIBDIR = $(ROOT)/usr/lib/brand/$(BRAND) 6080e2ca85SROOTLIBDIR64 = $(ROOT)/usr/lib/brand/$(BRAND)/$(MACH64) 6180e2ca85S 6280e2ca85S# 6380e2ca85S# The top level Makefiles define define TEXT_DOMAIN. But librtld_db.so.1 6480e2ca85S# isn't internationalized and this library won't be either. The only 6580e2ca85S# messages that this library can generate are messages used for debugging 6680e2ca85S# the operation of the library itself. 6780e2ca85S# 6880e2ca85SDTEXTDOM = 6980e2ca85S 7080e2ca85S.KEEP_STATE: 7180e2ca85S 7280e2ca85Sall: $(LIBS) 7380e2ca85S 7480e2ca85S 7580e2ca85Spics/%64.o: $(BRAND_SHARED)/librtld_db/common/%.c 7680e2ca85S $(COMPILE.c) -D_ELF64 $(PICFLAGS) -o $@ $< 7780e2ca85S $(POST_PROCESS_O) 7880e2ca85S 7980e2ca85Sinclude $(SRC)/lib/Makefile.targ 80