1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25#ident "%Z%%M% %I% %E% SMI" 26 27# 28# Build and link kmdb 29# 30all: $(PROG) kmdb_modlinktest.o 31 32%.o: ../../kmdb/%.c 33 $(COMPILE.c) $< 34 $(CTFCONVERT_O) 35 36%.o: ../../mdb/%.c 37 $(COMPILE.c) $< 38 $(CTFCONVERT_O) 39 40%.ln: ../../kmdb/%.c 41 $(LINT.c) -c $< 42 43%.ln: ../../mdb/%.c 44 $(LINT.c) -c $< 45 46ROOT_MISC_DIR = $(ROOT)/kernel/misc 47ROOT_MISC_DIR_64 = $(ROOT_MISC_DIR)/$(SUBDIR64) 48 49ROOTMISC = $(ROOT_MISC_DIR)/$(PROG) 50ROOTMISC64 = $(ROOT_MISC_DIR_64)/$(PROG) 51 52include ../../../../Makefile.cmd 53include ../../Makefile.ia32 54include ../../../Makefile.kmdb 55 56STANDLIBS += $(ROOT)/usr/lib/libstanddisasm.so 57 58INCDIRS += $(SRC)/uts/i86pc 59 60CPPFLAGS += -DDIS_TEXT 61 62install: all $(ROOTMISC) 63 64# 65# lint rules 66# 67 68.PARALLEL: lintkmdb lintprom lintkctl 69 70lint: lintkmdb lintprom lintkctl 71 $(LINT) $(ALLLINTFLAGS) $(KMDBOBJS:%.o=%.ln) $(PROMOBJS:%.o=%.ln) 72 73lintkmdb: $(KMDBOBJS:%.o=%.ln) 74 $(LINT) $(LINTFLAGS) $(KMDBOBJS:%.o=%.ln) 75 76lintprom: $(PROMOBJS:%.o=%.ln) 77 $(LINT) $(LINTFLAGS) $(PROMOBJS:%.o=%.ln) 78 79lintkctl: $(KCTLOBJS:%.o=%.ln) 80 $(LINT) $(ALLLINTFLAGS) $(KCTLOBJS:%.o=%.ln) 81 82kmdb_context_off.h: ../../kmdb/kmdb_context_off.in 83 $(OFFSETS_CREATE) <../../kmdb/kmdb_context_off.in >$@ 84 85# 86# Installation targets 87# 88 89$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64): 90 -$(INS.dir.root.sys) 91 92$(ROOT_MISC_DIR)/%: % $(ROOT_MISC_DIR) 93 $(INS.file) 94 95$(ROOT_MISC_DIR_64)/%: % $(ROOT_MISC_DIR_64) 96 $(INS.file) 97