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