OpenSolaris_b135/cmd/mdb/sun4v/Makefile.kmdb

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

PROMSRCS += \
	prom_2path.c \
	prom_devname.c \
	prom_devtype.c \
	prom_enter.c \
	prom_env.c \
	prom_exit.c \
	prom_fb.c \
	prom_getchar.c \
	prom_init.c \
	prom_inpath.c \
	prom_interp.c \
	prom_io.c \
	prom_mmu.c \
	prom_node.c \
	prom_outpath.c \
	prom_panic.c \
	prom_phandle.c \
	prom_printf.c \
	prom_prop.c \
	prom_putchar.c \
	prom_reboot.c \
	prom_sparc.c \
	prom_stdin.c \
	prom_stdout.c \
	prom_string.c \
	promif_emul.c \
	promif_interp.c \
	promif_io.c \
	promif_mon.c \
	promif_node.c \
	promif_prop.c \
	promif_reboot.c \
	promif_stree.c

KMDBSRCS += \
	kaif.c \
	kaif_activate.c \
	kaif_start_isadep.c \
	kmdb_dpi_isadep.c \
	kmdb_fault_isadep.c \
	kmdb_kdi_isadep.c \
	kmdb_makecontext.c \
	kmdb_promif_isadep.c \
	kvm_isadep.c

KMDBML += \
	kmdb_asmutil.s

KCTLSRCS += \
	kctl_isadep.c

KCTLML += \
	kctl_asm.s

SACPPFLAGS = -D__sparc

STANDLIBS += \
	../../../sparc/v9/libstandctf/libstandctf.so \
	$(SRC)/lib/libumem/$(MACHDIR)/libstandumem.so \
	../../../sparc/v9/libstand/libstand.a

KMDBLIBS = $(STANDLIBS) ../../../sparc/v9/mdb_ks/kmod/mdb_ks

MAPFILE_SOURCES = \
	$(MAPFILE_SOURCES_COMMON) \
	../../../sparc/kmdb/kmdb_dpi_isadep.h \
	$(MAPFILE_SOURCES_$(MACH))

%.fth: $(SRC)/cmd/mdb/sparc/kmdb/%.fdbg
	grep '^#' <$< >$(<F).c
	grep -v '^#' <$< >$(<F).tmp
	$(CC) $(CTFSTABSCFLAGS) $(CPPFLAGS) -g -c -o $(<F).o $(<F).c
	$(CTFCONVERT) $(CTFCVTFLAGS) $(<F).o
	$(CTFSTABS) -t forth -i $(<F).tmp -o $@ $(<F).o
	$(RM) $(<F).c $(<F).tmp $(<F).o

%.o: ../../../../../psm/promif/ieee1275/common/%.c
	$(COMPILE.c) $<
	$(CTFCONVERT_O)

%.o: ../../../../../psm/promif/ieee1275/sun4/%.c
	$(COMPILE.c) $<
	$(CTFCONVERT_O)

%.o: ../../../../../psm/promif/ieee1275/sun4u/%.c
	$(COMPILE.c) $<
	$(CTFCONVERT_O)

%.o: ../../../../../uts/sun4v/promif/%.c
	$(COMPILE.c) $<
	$(CTFCONVERT_O)

%.ln: ../../../../../psm/promif/ieee1275/common/%.c
	$(LINT.c) -c $<

%.ln: ../../../../../psm/promif/ieee1275/sun4/%.c
	$(LINT.c) -c $<

%.ln: ../../../../../psm/promif/ieee1275/sun4u/%.c
	$(LINT.c) -c $<

%.ln: ../../../../../uts/sun4v/promif/%.c
	$(LINT.c) -c $<