xref: /titanic_50/usr/src/cmd/mdb/sun4v/Makefile.kmdb (revision 154b1f02449b21af9273efd1a7776a3fe65a0744)
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 2006 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_reboot.c \
49	prom_sparc.c \
50	prom_stdin.c \
51	prom_stdout.c \
52	prom_string.c \
53	promif_emul.c \
54	promif_interp.c \
55	promif_io.c \
56	promif_mon.c \
57	promif_node.c \
58	promif_prop.c \
59	promif_reboot.c \
60	promif_stree.c
61
62KMDBSRCS += \
63	kaif.c \
64	kaif_activate.c \
65	kaif_start_isadep.c \
66	kmdb_dpi_isadep.c \
67	kmdb_fault_isadep.c \
68	kmdb_kdi_isadep.c \
69	kmdb_makecontext.c \
70	kmdb_promif_isadep.c \
71	kvm_isadep.c
72
73KMDBML += \
74	kaif_enter.s \
75	kmdb_asmutil.s
76
77KCTLSRCS += \
78	kctl_isadep.c
79
80KCTLML += \
81	kctl_asm.s
82
83SACPPFLAGS = -D__sparc
84
85STANDLIBS += \
86	../../../sparc/v9/libstandctf/libstandctf.so \
87	$(SRC)/lib/libumem/$(MACHDIR)/libstandumem.so \
88	../../../sparc/v9/libstand/libstand.a
89
90KMDBLIBS = $(STANDLIBS) ../../../sparc/v9/mdb_ks/kmod/mdb_ks
91
92MAPFILE_SOURCES = \
93	../../../common/mdb/mdb_ctf.h \
94	../../../common/kmdb/kmdb_dpi.h \
95	../../../common/kmdb/kmdb_kctl.h \
96	../../../common/kmdb/kmdb_kdi.h \
97	../../../common/mdb/mdb_ks.h \
98	../../../common/mdb/mdb_modapi.h \
99	../../../common/mdb/mdb_param.h \
100	../../../common/kmdb/kmdb_wr.h \
101	../../../sparc/kmdb/kmdb_dpi_isadep.h \
102	$(MAPFILE_SOURCES_$(MACH))
103
104%.fth: $(SRC)/cmd/mdb/sparc/kmdb/%.fdbg
105	grep '^#' <$< >$(<F).c
106	grep -v '^#' <$< >$(<F).tmp
107	$(CC) $(CTFSTABSCFLAGS) $(CPPFLAGS) -g -c -o $(<F).o $(<F).c
108	$(CTFCONVERT) $(CTFCVTFLAGS) $(<F).o
109	$(CTFSTABS) -t forth -i $(<F).tmp -o $@ $(<F).o
110	$(RM) $(<F).c $(<F).tmp $(<F).o
111
112%.o: ../../../../../psm/promif/ieee1275/common/%.c
113	$(COMPILE.c) $<
114	$(CTFCONVERT_O)
115
116%.o: ../../../../../psm/promif/ieee1275/sun4/%.c
117	$(COMPILE.c) $<
118	$(CTFCONVERT_O)
119
120%.o: ../../../../../psm/promif/ieee1275/sun4u/%.c
121	$(COMPILE.c) $<
122	$(CTFCONVERT_O)
123
124%.o: ../../../../../uts/sun4v/promif/%.c
125	$(COMPILE.c) $<
126	$(CTFCONVERT_O)
127
128%.ln: ../../../../../psm/promif/ieee1275/common/%.c
129	$(LINT.c) -c $<
130
131%.ln: ../../../../../psm/promif/ieee1275/sun4/%.c
132	$(LINT.c) -c $<
133
134%.ln: ../../../../../psm/promif/ieee1275/sun4u/%.c
135	$(LINT.c) -c $<
136
137%.ln: ../../../../../uts/sun4v/promif/%.c
138	$(LINT.c) -c $<
139