Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
123N/A#
123N/A# CDDL HEADER START
123N/A#
123N/A# The contents of this file are subject to the terms of the
123N/A# Common Development and Distribution License, Version 1.0 only
123N/A# (the "License"). You may not use this file except in compliance
123N/A# with the License.
123N/A#
123N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
123N/A# or http://www.opensolaris.org/os/licensing.
123N/A# See the License for the specific language governing permissions
123N/A# and limitations under the License.
123N/A#
123N/A# When distributing Covered Code, include this CDDL HEADER in each
123N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
123N/A# If applicable, add the following below this CDDL HEADER, with the
123N/A# fields enclosed by brackets "[]" replaced with your own identifying
123N/A# information: Portions Copyright [yyyy] [name of copyright owner]
123N/A#
123N/A# CDDL HEADER END
123N/A#
123N/A#
123N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
123N/A# Use is subject to license terms.
123N/A#
123N/A#ident "%Z%%M% %I% %E% SMI"
123N/A#
123N/A
123N/Aall: $(PROG)
123N/A
123N/A%.o: ../../../sparc/mdb/%.c
123N/A $(COMPILE.c) $<
123N/A $(CTFCONVERT_O)
123N/A
123N/A%.ln: ../../../sparc/mdb/%.c
123N/A $(LINT.c) -c $<
123N/A
123N/Akaif.fth: ../../../sparc/v9/kmdb/kaif_regs.h
123N/A
123N/AROOT_MISC_DIR = $(ROOT)/platform/sun4v/kernel/misc
123N/AROOT_MISC_DIR_64 = $(ROOT_MISC_DIR)/$(SUBDIR64)
123N/A
123N/AROOTMISC = $(ROOT_MISC_DIR)/$(PROG)
123N/AROOTMISC64 = $(ROOT_MISC_DIR_64)/$(PROG)
123N/A
123N/Ainclude ../../../../Makefile.cmd
123N/Ainclude ../../../../Makefile.cmd.64
123N/Ainclude ../../../sparc/Makefile.sparcv9
123N/Ainclude ../../../sparc/Makefile.kmdb.64
123N/Ainclude ../../../Makefile.kmdb
123N/A
123N/AKMDB_FPTEST = \
123N/A $(FINDFP) -x kaif_resume -x kaif_trap_common $@
123N/A
123N/AQTOOLS_ROOT= $(SPRO_ROOT)/sun4v
123N/Asparc_AS= $(QTOOLS_ROOT)/qas -xregsym=no
123N/Asparcv9_AS= $(QTOOLS_ROOT)/qas -xregsym=no
123N/A
123N/A#
123N/A# Uncomment the following line to enable trap accounting. A DTLB translation
123N/A# will be added for the trap table, and each handler installed by KMDB will use
123N/A# its padding to keep a trap count. See kaif_handlers.s.
123N/A#
123N/A#TRAPCOUNT = -DKMDB_TRAPCOUNT
CPPFLAGS += -I../../../sparc/mdb -I.. -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4v
CPPFLAGS += $(TRAPCOUNT)
CPPFLAGS += -Dsun4v
CPPFLAGS += -I$(SRC)/cmd/mdb/sparc
CPPFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb
ASFLAGS += -xarch=v9d -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4v $(TRAPCOUNT)
ASFLAGS += -Dsun4v
ASFLAGS += -I$(SRC)/cmd/mdb/sparc
ASFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb
install: all $(ROOTMISC64) kaif.fth
#
# lint rules
#
.PARALLEL: lintkmdb lintprom lintkctl
lint: lintkmdb lintprom lintkctl
$(LINT) $(ALLLINTFLAGS) $(KMDBOBJS:%.o=%.ln) $(PROMOBJS:%.o=%.ln)
lintkmdb: $(KMDBOBJS:%.o=%.ln)
$(LINT) $(LINTFLAGS) $(KMDBOBJS:%.o=%.ln)
lintprom: $(PROMOBJS:%.o=%.ln)
$(LINT) $(LINTFLAGS) $(PROMOBJS:%.o=%.ln)
lintkctl: $(KCTLOBJS:%.o=%.ln)
$(LINT) $(ALLLINTFLAGS) $(KCTLOBJS:%.o=%.ln)
kaif_off.h: ../../../sparc/kmdb/kaif_off.in
$(OFFSETS_CREATE) <../../../sparc/kmdb/kaif_off.in >$@
kmdb_context_off.h: ../../../sparc/kmdb/kmdb_context_off.in
$(OFFSETS_CREATE) <../../../sparc/kmdb/kmdb_context_off.in >$@
#
# Dynamic rules for object construction
#
%.o: ../../../common/kmdb/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
%.o: ../../../common/kmdb/kctl/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
%.o: ../../../common/kmdb/kctl/%.s
$(COMPILE.s) -o $@ $<
%.o: ../../../common/mdb/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
%.o: ../../../sparc/kmdb/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
%.o: ../../../sparc/kmdb/%.s
$(COMPILE.s) -o $@ $<
%.o: ../../../sparc/kmdb/kctl/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
%.o: ../../../sparc/kmdb/kctl/%.s
$(COMPILE.s) -o $@ $<
%.o: ../../../sparc/mdb/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
%.o: ../../../sparc/v9/kmdb/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
%.o: ../../../sparc/v9/kmdb/%.s
$(COMPILE.s) -o $@ $<
%.o: ../../../sparc/v9/kmdb/kctl/%.s
$(COMPILE.s) -o $@ $<
%.o: $(SRC)/common/net/util/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
#
# Lint
#
%.ln: ../../../common/kmdb/%.c
$(LINT.c) -c $<
%.ln: ../../../common/kmdb/kctl/%.c
$(LINT.c) -c $<
%.ln: ../../../common/kmdb/kctl/%.s
$(LINT.s) -c $<
%.ln: ../../../common/mdb/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/kmdb/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/kmdb/%.s
$(LINT.s) -c $<
%.ln: ../../../sparc/kmdb/kctl/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/kmdb/kctl/%.s
$(LINT.s) -c $<
%.ln: ../../../sparc/mdb/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/v9/kmdb/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/v9/kmdb/%.s
$(LINT.s) -c $<
%.ln: ../../../sparc/v9/kmdb/kctl/%.s
$(LINT.s) -c $<
%.ln: $(SRC)/common/net/util/%.c
$(LINT.c) -c $<
#
# Installation targets
#
$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64):
-$(INS.dir.root.sys)
$(ROOT_MISC_DIR)/%: % $(ROOT_MISC_DIR)
$(INS.file)
$(ROOT_MISC_DIR_64)/%: % $(ROOT_MISC_DIR_64)
$(INS.file)