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 51545Seschrock# Common Development and Distribution License (the "License"). 61545Seschrock# 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*10738SJames.McPherson@Sun.COM# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate 260Sstevel@tonic-gate# 270Sstevel@tonic-gate# Build and link kmdb 280Sstevel@tonic-gate# 290Sstevel@tonic-gateall: $(PROG) kmdb_modlinktest.o 300Sstevel@tonic-gate 310Sstevel@tonic-gate%.o: ../../kmdb/%.c 320Sstevel@tonic-gate $(COMPILE.c) $< 330Sstevel@tonic-gate $(CTFCONVERT_O) 340Sstevel@tonic-gate 350Sstevel@tonic-gate%.o: ../../mdb/%.c 360Sstevel@tonic-gate $(COMPILE.c) $< 370Sstevel@tonic-gate $(CTFCONVERT_O) 380Sstevel@tonic-gate 390Sstevel@tonic-gate%.o: $(SRC)/common/dis/i386/%.c 400Sstevel@tonic-gate $(COMPILE.c) $< 410Sstevel@tonic-gate $(CTFCONVERT_O) 420Sstevel@tonic-gate 430Sstevel@tonic-gate%.ln: ../../kmdb/%.c 440Sstevel@tonic-gate $(LINT.c) -c $< 450Sstevel@tonic-gate 460Sstevel@tonic-gate%.ln: ../../mdb/%.c 470Sstevel@tonic-gate $(LINT.c) -c $< 480Sstevel@tonic-gate 490Sstevel@tonic-gate%.ln: $(SRC)/common/dis/i386/%.c 500Sstevel@tonic-gate $(LINT.c) -c $< 510Sstevel@tonic-gate 520Sstevel@tonic-gateROOT_MISC_DIR = $(ROOT)/kernel/misc 530Sstevel@tonic-gateROOT_MISC_DIR_64 = $(ROOT_MISC_DIR)/$(SUBDIR64) 540Sstevel@tonic-gate 550Sstevel@tonic-gateROOTMISC = $(ROOT_MISC_DIR)/$(PROG) 560Sstevel@tonic-gateROOTMISC64 = $(ROOT_MISC_DIR_64)/$(PROG) 570Sstevel@tonic-gate 580Sstevel@tonic-gateinclude ../../../../Makefile.cmd 590Sstevel@tonic-gateinclude ../../../../Makefile.cmd.64 600Sstevel@tonic-gate 610Sstevel@tonic-gateinclude ../../Makefile.amd64 620Sstevel@tonic-gateinclude ../../../Makefile.kmdb 630Sstevel@tonic-gate 641545SeschrockSTANDLIBS += $(ROOT)/usr/lib/amd64/libstanddisasm.so 651545Seschrock 660Sstevel@tonic-gateINCDIRS += $(SRC)/uts/i86pc $(SRC)/common/dis/i386 670Sstevel@tonic-gate 680Sstevel@tonic-gateCPPFLAGS += -DDIS_TEXT 690Sstevel@tonic-gate 700Sstevel@tonic-gateinstall: all $(ROOTMISC64) 710Sstevel@tonic-gate 720Sstevel@tonic-gate# 730Sstevel@tonic-gate# lint rules 740Sstevel@tonic-gate# 750Sstevel@tonic-gate 760Sstevel@tonic-gate.PARALLEL: lintkmdb lintprom lintkctl 770Sstevel@tonic-gate 780Sstevel@tonic-gatelint: lintkmdb lintprom lintkctl 790Sstevel@tonic-gate $(LINT) $(ALLLINTFLAGS) $(KMDBOBJS:%.o=%.ln) $(PROMOBJS:%.o=%.ln) 800Sstevel@tonic-gate 810Sstevel@tonic-gatelintkmdb: $(KMDBOBJS:%.o=%.ln) 820Sstevel@tonic-gate $(LINT) $(LINTFLAGS) $(KMDBOBJS:%.o=%.ln) 830Sstevel@tonic-gate 840Sstevel@tonic-gatelintprom: $(PROMOBJS:%.o=%.ln) 850Sstevel@tonic-gate $(LINT) $(LINTFLAGS) $(PROMOBJS:%.o=%.ln) 860Sstevel@tonic-gate 870Sstevel@tonic-gatelintkctl: $(KCTLOBJS:%.o=%.ln) 880Sstevel@tonic-gate $(LINT) $(ALLLINTFLAGS) $(KCTLOBJS:%.o=%.ln) 890Sstevel@tonic-gate 900Sstevel@tonic-gatekmdb_context_off.h: ../../kmdb/kmdb_context_off.in 910Sstevel@tonic-gate $(OFFSETS_CREATE) <../../kmdb/kmdb_context_off.in >$@ 920Sstevel@tonic-gate 930Sstevel@tonic-gate# 940Sstevel@tonic-gate# Installation targets 950Sstevel@tonic-gate# 960Sstevel@tonic-gate 970Sstevel@tonic-gate$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64): 98*10738SJames.McPherson@Sun.COM -$(INS.dir) 990Sstevel@tonic-gate 1000Sstevel@tonic-gate$(ROOT_MISC_DIR)/%: % $(ROOT_MISC_DIR) 1010Sstevel@tonic-gate $(INS.file) 1020Sstevel@tonic-gate 1030Sstevel@tonic-gate$(ROOT_MISC_DIR_64)/%: % $(ROOT_MISC_DIR_64) 1040Sstevel@tonic-gate $(INS.file) 105