xref: /titanic_51/usr/src/cmd/mdb/sun4v/Makefile.kmdb (revision 1ae0874509b6811fdde1dfd46f0d93fd09867a3f)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*1ae08745Sheppo# Common Development and Distribution License (the "License").
6*1ae08745Sheppo# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*1ae08745Sheppo# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gatePROMSRCS += \
287c478bd9Sstevel@tonic-gate	prom_2path.c \
297c478bd9Sstevel@tonic-gate	prom_devname.c \
307c478bd9Sstevel@tonic-gate	prom_devtype.c \
317c478bd9Sstevel@tonic-gate	prom_enter.c \
327c478bd9Sstevel@tonic-gate	prom_env.c \
337c478bd9Sstevel@tonic-gate	prom_exit.c \
347c478bd9Sstevel@tonic-gate	prom_fb.c \
357c478bd9Sstevel@tonic-gate	prom_getchar.c \
367c478bd9Sstevel@tonic-gate	prom_init.c \
377c478bd9Sstevel@tonic-gate	prom_inpath.c \
387c478bd9Sstevel@tonic-gate	prom_interp.c \
397c478bd9Sstevel@tonic-gate	prom_io.c \
407c478bd9Sstevel@tonic-gate	prom_mmu.c \
417c478bd9Sstevel@tonic-gate	prom_node.c \
427c478bd9Sstevel@tonic-gate	prom_outpath.c \
437c478bd9Sstevel@tonic-gate	prom_panic.c \
447c478bd9Sstevel@tonic-gate	prom_phandle.c \
457c478bd9Sstevel@tonic-gate	prom_printf.c \
467c478bd9Sstevel@tonic-gate	prom_prop.c \
477c478bd9Sstevel@tonic-gate	prom_putchar.c \
48*1ae08745Sheppo	prom_reboot.c \
497c478bd9Sstevel@tonic-gate	prom_sparc.c \
507c478bd9Sstevel@tonic-gate	prom_stdin.c \
517c478bd9Sstevel@tonic-gate	prom_stdout.c \
52*1ae08745Sheppo	prom_string.c \
53*1ae08745Sheppo	promif_emul.c \
54*1ae08745Sheppo	promif_interp.c \
55*1ae08745Sheppo	promif_io.c \
56*1ae08745Sheppo	promif_mon.c \
57*1ae08745Sheppo	promif_node.c \
58*1ae08745Sheppo	promif_prop.c \
59*1ae08745Sheppo	promif_reboot.c \
60*1ae08745Sheppo	promif_stree.c
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gateKMDBSRCS += \
637c478bd9Sstevel@tonic-gate	kaif.c \
647c478bd9Sstevel@tonic-gate	kaif_activate.c \
657c478bd9Sstevel@tonic-gate	kaif_start_isadep.c \
667c478bd9Sstevel@tonic-gate	kmdb_dpi_isadep.c \
677c478bd9Sstevel@tonic-gate	kmdb_fault_isadep.c \
687c478bd9Sstevel@tonic-gate	kmdb_kdi_isadep.c \
697c478bd9Sstevel@tonic-gate	kmdb_makecontext.c \
707c478bd9Sstevel@tonic-gate	kmdb_promif_isadep.c \
717c478bd9Sstevel@tonic-gate	kvm_isadep.c
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gateKMDBML += \
747c478bd9Sstevel@tonic-gate	kaif_enter.s \
757c478bd9Sstevel@tonic-gate	kmdb_asmutil.s
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gateKCTLSRCS += \
787c478bd9Sstevel@tonic-gate	kctl_isadep.c
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gateKCTLML += \
817c478bd9Sstevel@tonic-gate	kctl_asm.s
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gateSACPPFLAGS = -D__sparc
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gateSTANDLIBS += \
867c478bd9Sstevel@tonic-gate	../../../sparc/v9/libstandctf/libstandctf.so \
877c478bd9Sstevel@tonic-gate	$(SRC)/lib/libumem/$(MACHDIR)/libstandumem.so \
887c478bd9Sstevel@tonic-gate	../../../sparc/v9/libstand/libstand.a
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gateKMDBLIBS = $(STANDLIBS) ../../../sparc/v9/mdb_ks/kmod/mdb_ks
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gateMAPFILE_SOURCES = \
937c478bd9Sstevel@tonic-gate	../../../common/mdb/mdb_ctf.h \
947c478bd9Sstevel@tonic-gate	../../../common/kmdb/kmdb_dpi.h \
957c478bd9Sstevel@tonic-gate	../../../common/kmdb/kmdb_kctl.h \
967c478bd9Sstevel@tonic-gate	../../../common/kmdb/kmdb_kdi.h \
977c478bd9Sstevel@tonic-gate	../../../common/mdb/mdb_ks.h \
987c478bd9Sstevel@tonic-gate	../../../common/mdb/mdb_modapi.h \
997c478bd9Sstevel@tonic-gate	../../../common/mdb/mdb_param.h \
1007c478bd9Sstevel@tonic-gate	../../../common/kmdb/kmdb_wr.h \
1017c478bd9Sstevel@tonic-gate	../../../sparc/kmdb/kmdb_dpi_isadep.h \
1027c478bd9Sstevel@tonic-gate	$(MAPFILE_SOURCES_$(MACH))
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gate%.fth: $(SRC)/cmd/mdb/sparc/kmdb/%.fdbg
1057c478bd9Sstevel@tonic-gate	grep '^#' <$< >$(<F).c
1067c478bd9Sstevel@tonic-gate	grep -v '^#' <$< >$(<F).tmp
1077c478bd9Sstevel@tonic-gate	$(CC) $(CTFSTABSCFLAGS) $(CPPFLAGS) -g -c -o $(<F).o $(<F).c
1087c478bd9Sstevel@tonic-gate	$(CTFCONVERT) $(CTFCVTFLAGS) $(<F).o
1097c478bd9Sstevel@tonic-gate	$(CTFSTABS) -t forth -i $(<F).tmp -o $@ $(<F).o
1107c478bd9Sstevel@tonic-gate	$(RM) $(<F).c $(<F).tmp $(<F).o
1117c478bd9Sstevel@tonic-gate
1127c478bd9Sstevel@tonic-gate%.o: ../../../../../psm/promif/ieee1275/common/%.c
1137c478bd9Sstevel@tonic-gate	$(COMPILE.c) $<
1147c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gate%.o: ../../../../../psm/promif/ieee1275/sun4/%.c
1177c478bd9Sstevel@tonic-gate	$(COMPILE.c) $<
1187c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1197c478bd9Sstevel@tonic-gate
1207c478bd9Sstevel@tonic-gate%.o: ../../../../../psm/promif/ieee1275/sun4u/%.c
1217c478bd9Sstevel@tonic-gate	$(COMPILE.c) $<
1227c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1237c478bd9Sstevel@tonic-gate
124*1ae08745Sheppo%.o: ../../../../../uts/sun4v/promif/%.c
125*1ae08745Sheppo	$(COMPILE.c) $<
126*1ae08745Sheppo	$(CTFCONVERT_O)
127*1ae08745Sheppo
1287c478bd9Sstevel@tonic-gate%.ln: ../../../../../psm/promif/ieee1275/common/%.c
1297c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1307c478bd9Sstevel@tonic-gate
1317c478bd9Sstevel@tonic-gate%.ln: ../../../../../psm/promif/ieee1275/sun4/%.c
1327c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gate%.ln: ../../../../../psm/promif/ieee1275/sun4u/%.c
1357c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
136*1ae08745Sheppo
137*1ae08745Sheppo%.ln: ../../../../../uts/sun4v/promif/%.c
138*1ae08745Sheppo	$(LINT.c) -c $<
139