xref: /titanic_41/usr/src/cmd/mdb/intel/ia32/kmdb/Makefile (revision 7ff178cd8db129d385d3177eb20744d3b6efc59b)
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
26#
27# Build and link kmdb
28#
29all: $(PROG) kmdb_modlinktest.o
30
31%.o: ../../kmdb/%.c
32	$(COMPILE.c) $<
33	$(CTFCONVERT_O)
34
35%.o: ../../mdb/%.c
36	$(COMPILE.c) $<
37	$(CTFCONVERT_O)
38
39%.ln: ../../kmdb/%.c
40	$(LINT.c) -c $<
41
42%.ln: ../../mdb/%.c
43	$(LINT.c) -c $<
44
45ROOT_MISC_DIR		= $(ROOT)/kernel/misc
46ROOT_MISC_DIR_64	= $(ROOT_MISC_DIR)/$(SUBDIR64)
47
48ROOTMISC		= $(ROOT_MISC_DIR)/$(PROG)
49ROOTMISC64		= $(ROOT_MISC_DIR_64)/$(PROG)
50
51include ../../../../Makefile.cmd
52include ../../Makefile.ia32
53include ../../../Makefile.kmdb
54
55STANDLIBS += $(ROOT)/usr/lib/libstanddisasm.so
56
57INCDIRS += $(SRC)/uts/i86pc
58
59CPPFLAGS += -DDIS_TEXT
60
61install: all $(ROOTMISC)
62
63#
64# lint rules
65#
66
67.PARALLEL: lintkmdb lintprom lintkctl
68
69lint: lintkmdb lintprom lintkctl
70	$(LINT) $(ALLLINTFLAGS) $(KMDBOBJS:%.o=%.ln) $(PROMOBJS:%.o=%.ln)
71
72lintkmdb: $(KMDBOBJS:%.o=%.ln)
73	$(LINT) $(LINTFLAGS) $(KMDBOBJS:%.o=%.ln)
74
75lintprom: $(PROMOBJS:%.o=%.ln)
76	$(LINT) $(LINTFLAGS) $(PROMOBJS:%.o=%.ln)
77
78lintkctl: $(KCTLOBJS:%.o=%.ln)
79	$(LINT) $(ALLLINTFLAGS) $(KCTLOBJS:%.o=%.ln)
80
81kmdb_context_off.h: ../../kmdb/kmdb_context_off.in
82	$(OFFSETS_CREATE) <../../kmdb/kmdb_context_off.in >$@
83
84#
85# Installation targets
86#
87
88$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64):
89	-$(INS.dir)
90
91$(ROOT_MISC_DIR)/%: 	% $(ROOT_MISC_DIR)
92	$(INS.file)
93
94$(ROOT_MISC_DIR_64)/%:	% $(ROOT_MISC_DIR_64)
95	$(INS.file)
96