Makefile revision 4051d170f2f092f2a9f75c975307adfddfed4a67
143N/A#
143N/A# CDDL HEADER START
143N/A#
143N/A# The contents of this file are subject to the terms of the
143N/A# Common Development and Distribution License (the "License").
143N/A# You may not use this file except in compliance with the License.
143N/A#
143N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
143N/A# or http://www.opensolaris.org/os/licensing.
143N/A# See the License for the specific language governing permissions
143N/A# and limitations under the License.
143N/A#
143N/A# When distributing Covered Code, include this CDDL HEADER in each
143N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
143N/A# If applicable, add the following below this CDDL HEADER, with the
143N/A# fields enclosed by brackets "[]" replaced with your own identifying
143N/A# information: Portions Copyright [yyyy] [name of copyright owner]
143N/A#
143N/A# CDDL HEADER END
143N/A#
1392N/A#
143N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
143N/A# Use is subject to license terms.
143N/A#
143N/A#ident "%Z%%M% %I% %E% SMI"
1736N/A#
618N/A
143N/Aall: $(PROG)
143N/A
844N/A%.o: ../../../sparc/mdb/%.c
1736N/A $(COMPILE.c) $<
143N/A $(CTFCONVERT_O)
1258N/A
143N/A%.ln: ../../../sparc/mdb/%.c
143N/A $(LINT.c) -c $<
143N/A
143N/Akaif.fth: ../../../sparc/v9/kmdb/kaif_regs.h
143N/A
143N/AROOT_MISC_DIR = $(ROOT)/platform/sun4v/kernel/misc
143N/AROOT_MISC_DIR_64 = $(ROOT_MISC_DIR)/$(SUBDIR64)
143N/A
143N/AROOTMISC = $(ROOT_MISC_DIR)/$(PROG)
143N/AROOTMISC64 = $(ROOT_MISC_DIR_64)/$(PROG)
143N/A
143N/Ainclude ../../../../Makefile.cmd
143N/Ainclude ../../../../Makefile.cmd.64
143N/Ainclude ../../../sparc/Makefile.sparcv9
143N/Ainclude ../../../sparc/Makefile.kmdb.64
1741N/Ainclude ../../../Makefile.kmdb
1741N/A
1741N/ASTANDLIBS += $(ROOT)/usr/lib/sparcv9/libstanddisasm.so
1741N/A
1741N/AKMDB_FPTEST = \
1741N/A $(FINDFP) -x kaif_resume -x kaif_trap_common $@
1741N/A
1741N/A#
1741N/A# Uncomment the following line to enable trap accounting. A DTLB translation
1741N/A# will be added for the trap table, and each handler installed by KMDB will use
1741N/A# its padding to keep a trap count. See kaif_handlers.s.
1741N/A#
1741N/A#TRAPCOUNT = -DKMDB_TRAPCOUNT
1392N/A
1392N/ACPPFLAGS += -I../../../sparc/mdb -I.. -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4v
1392N/ACPPFLAGS += $(TRAPCOUNT)
143N/ACPPFLAGS += -Dsun4v
1736N/ACPPFLAGS += -I$(SRC)/cmd/mdb/sparc
1736N/ACPPFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb
1736N/AASFLAGS += -xarch=v9v -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4v $(TRAPCOUNT)
143N/AASFLAGS += -Dsun4v
1741N/AASFLAGS += -I$(SRC)/cmd/mdb/sparc
143N/AASFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb
143N/A
143N/Ainstall: all $(ROOTMISC64) kaif.fth
143N/A
#
# 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)