xref: /titanic_44/usr/src/cmd/mdb/sun4u/Makefile.kmdb (revision 22eb7cb54d8a6bcf6fe2674cb4b1f0cf2d85cfb6)
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
27PROMSRCS += \
28	prom_2path.c \
29	prom_devname.c \
30	prom_devtype.c \
31	prom_enter.c \
32	prom_env.c \
33	prom_exit.c \
34	prom_fb.c \
35	prom_getchar.c \
36	prom_init.c \
37	prom_inpath.c \
38	prom_interp.c \
39	prom_io.c \
40	prom_mmu.c \
41	prom_node.c \
42	prom_outpath.c \
43	prom_panic.c \
44	prom_phandle.c \
45	prom_printf.c \
46	prom_prop.c \
47	prom_putchar.c \
48	prom_sparc.c \
49	prom_stdin.c \
50	prom_stdout.c \
51	prom_string.c
52
53KMDBSRCS += \
54	kaif.c \
55	kaif_activate.c \
56	kaif_start_isadep.c \
57	kmdb_dpi_isadep.c \
58	kmdb_fault_isadep.c \
59	kmdb_kdi_isadep.c \
60	kmdb_makecontext.c \
61	kmdb_promif_isadep.c \
62	kvm_isadep.c
63
64KMDBML += \
65	kmdb_asmutil.s
66
67KCTLSRCS += \
68	kctl_isadep.c
69
70KCTLML += \
71	kctl_asm.s
72
73SACPPFLAGS = -D__sparc
74
75STANDLIBS += \
76	../../../sparc/v9/libstandctf/libstandctf.so \
77	$(SRC)/lib/libumem/$(MACHDIR)/libstandumem.so \
78	../../../sparc/v9/libstand/libstand.a
79
80KMDBLIBS = $(STANDLIBS) ../../../sparc/v9/mdb_ks/kmod/mdb_ks
81
82MAPFILE_SOURCES = \
83	../../../common/mdb/mdb_ctf.h \
84	../../../common/kmdb/kmdb_dpi.h \
85	../../../common/kmdb/kmdb_kctl.h \
86	../../../common/kmdb/kmdb_kdi.h \
87	../../../common/mdb/mdb_ks.h \
88	../../../common/mdb/mdb_modapi.h \
89	../../../common/mdb/mdb_param.h \
90	../../../common/kmdb/kmdb_wr.h \
91	../../../sparc/kmdb/kmdb_dpi_isadep.h \
92	$(MAPFILE_SOURCES_$(MACH))
93
94%.fth: $(SRC)/cmd/mdb/sparc/kmdb/%.fdbg
95	grep '^#' <$< >$(<F).c
96	grep -v '^#' <$< >$(<F).tmp
97	$(CC) $(CTFSTABSCFLAGS) $(CPPFLAGS) -g -c -o $(<F).o $(<F).c
98	$(CTFCONVERT) $(CTFCVTFLAGS) $(<F).o
99	$(CTFSTABS) -t forth -i $(<F).tmp -o $@ $(<F).o
100	$(RM) $(<F).c $(<F).tmp $(<F).o
101
102%.o: ../../../../../psm/promif/ieee1275/common/%.c
103	$(COMPILE.c) $<
104	$(CTFCONVERT_O)
105
106%.o: ../../../../../psm/promif/ieee1275/sun4/%.c
107	$(COMPILE.c) $<
108	$(CTFCONVERT_O)
109
110%.o: ../../../../../psm/promif/ieee1275/sun4u/%.c
111	$(COMPILE.c) $<
112	$(CTFCONVERT_O)
113
114%.ln: ../../../../../psm/promif/ieee1275/common/%.c
115	$(LINT.c) -c $<
116
117%.ln: ../../../../../psm/promif/ieee1275/sun4/%.c
118	$(LINT.c) -c $<
119
120%.ln: ../../../../../psm/promif/ieee1275/sun4u/%.c
121	$(LINT.c) -c $<
122