xref: /titanic_41/usr/src/cmd/mdb/intel/ia32/kmdb/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27
28#
29# Build and link kmdb
30#
31all: $(PROG) kmdb_modlinktest.o
32
33%.o: ../../kmdb/%.c
34	$(COMPILE.c) $<
35	$(CTFCONVERT_O)
36
37%.o: ../../mdb/%.c
38	$(COMPILE.c) $<
39	$(CTFCONVERT_O)
40
41%.ln: ../../kmdb/%.c
42	$(LINT.c) -c $<
43
44%.ln: ../../mdb/%.c
45	$(LINT.c) -c $<
46
47ROOT_MISC_DIR		= $(ROOT)/kernel/misc
48ROOT_MISC_DIR_64	= $(ROOT_MISC_DIR)/$(SUBDIR64)
49
50ROOTMISC		= $(ROOT_MISC_DIR)/$(PROG)
51ROOTMISC64		= $(ROOT_MISC_DIR_64)/$(PROG)
52
53include ../../../../Makefile.cmd
54include ../../Makefile.ia32
55include ../../../Makefile.kmdb
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
81kaif_off.h: ../../kmdb/kaif_off.in
82	$(OFFSETS_CREATE) <../../kmdb/kaif_off.in >$@
83
84kmdb_context_off.h: ../../kmdb/kmdb_context_off.in
85	$(OFFSETS_CREATE) <../../kmdb/kmdb_context_off.in >$@
86
87#
88# Installation targets
89#
90
91$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64):
92	-$(INS.dir.root.sys)
93
94$(ROOT_MISC_DIR)/%: 	% $(ROOT_MISC_DIR)
95	$(INS.file)
96
97$(ROOT_MISC_DIR_64)/%:	% $(ROOT_MISC_DIR_64)
98	$(INS.file)
99