10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 51528Sjwadams# Common Development and Distribution License (the "License"). 61528Sjwadams# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*6543Srie# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate#ident "%Z%%M% %I% %E% SMI" 260Sstevel@tonic-gate 270Sstevel@tonic-gateMODULE = libumem.so 280Sstevel@tonic-gateMDBTGT = proc 290Sstevel@tonic-gate 300Sstevel@tonic-gateMODSRCS_DIR = ../../../common/modules/genunix 310Sstevel@tonic-gate 320Sstevel@tonic-gateCOMMONSRCS = \ 334798Stomee dist.c \ 340Sstevel@tonic-gate libumem.c \ 350Sstevel@tonic-gate misc.c \ 360Sstevel@tonic-gate umem.c 370Sstevel@tonic-gate 380Sstevel@tonic-gateKMODSRCS = \ 390Sstevel@tonic-gate $(COMMONSRCS) 400Sstevel@tonic-gate 410Sstevel@tonic-gateMODSRCS = \ 420Sstevel@tonic-gate $(COMMONSRCS) \ 430Sstevel@tonic-gate kgrep.c \ 440Sstevel@tonic-gate leaky.c \ 450Sstevel@tonic-gate leaky_subr.c \ 460Sstevel@tonic-gate proc_kludges.c 470Sstevel@tonic-gate 480Sstevel@tonic-gate# 490Sstevel@tonic-gate# This signals that $(KMODSRCS) != $(MODSRCS). There are certain features of 500Sstevel@tonic-gate# the libumem dmod, such as leak detection, that we cannot yet use in the kmod. 510Sstevel@tonic-gate# In most cases, the inability to use a given function is due to that function's 520Sstevel@tonic-gate# dependance on libproc interfaces - interfaces which are not present in kmdb. 530Sstevel@tonic-gateKMOD_SOURCES_DIFFERENT=$(POUND_SIGN) 540Sstevel@tonic-gate 550Sstevel@tonic-gateinclude ../../../../Makefile.cmd 560Sstevel@tonic-gate 570Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/lib/libumem/common 580Sstevel@tonic-gateCPPFLAGS += -I$(MODSRCS_DIR) 590Sstevel@tonic-gate 600Sstevel@tonic-gateinclude ../../../../Makefile.cmd.64 610Sstevel@tonic-gateinclude ../../Makefile.sparcv9 620Sstevel@tonic-gateinclude ../../../Makefile.module 630Sstevel@tonic-gate 64*6543Sriedmod/$(MODULE) := LDLIBS += -lproc -lm 654798Stomee 660Sstevel@tonic-gate%.o: $(MODSRCS_DIR)/%.c 670Sstevel@tonic-gate $(COMPILE.c) $< 680Sstevel@tonic-gate $(CTFCONVERT_O) 690Sstevel@tonic-gate 700Sstevel@tonic-gate%.ln: $(MODSRCS_DIR)/%.c 710Sstevel@tonic-gate $(LINT.c) -c $< 720Sstevel@tonic-gate 730Sstevel@tonic-gate# 740Sstevel@tonic-gate# This module is somewhat unusual in that it is a proc-style dmod. proc dmods 750Sstevel@tonic-gate# are not normally built both for mdb and kmdb. These overrides build it as a 760Sstevel@tonic-gate# proc dmod and as a kvm kmod. 770Sstevel@tonic-gateTARGETS = $(TARGETS_proc) $(TARGETS_kvm_kmdb) 780Sstevel@tonic-gateROOTTGTS = $(ROOTTGTS_proc) 79