xref: /titanic_50/usr/src/cmd/mdb/intel/amd64/kmdb/Makefile (revision 554ff184129088135ad2643c1c9832174a17be88)
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%.o: $(SRC)/common/dis/i386/%.c
42	$(COMPILE.c) $<
43	$(CTFCONVERT_O)
44
45%.ln: ../../kmdb/%.c
46	$(LINT.c) -c $<
47
48%.ln: ../../mdb/%.c
49	$(LINT.c) -c $<
50
51%.ln: $(SRC)/common/dis/i386/%.c
52	$(LINT.c) -c $<
53
54ROOT_MISC_DIR		= $(ROOT)/kernel/misc
55ROOT_MISC_DIR_64	= $(ROOT_MISC_DIR)/$(SUBDIR64)
56
57ROOTMISC		= $(ROOT_MISC_DIR)/$(PROG)
58ROOTMISC64		= $(ROOT_MISC_DIR_64)/$(PROG)
59
60include ../../../../Makefile.cmd
61include ../../../../Makefile.cmd.64
62
63include ../../Makefile.amd64
64include ../../../Makefile.kmdb
65
66INCDIRS += $(SRC)/uts/i86pc $(SRC)/common/dis/i386
67
68CPPFLAGS += -DDIS_TEXT
69
70install: all $(ROOTMISC64)
71
72#
73# lint rules
74#
75
76.PARALLEL: lintkmdb lintprom lintkctl
77
78lint: lintkmdb lintprom lintkctl
79	$(LINT) $(ALLLINTFLAGS) $(KMDBOBJS:%.o=%.ln) $(PROMOBJS:%.o=%.ln)
80
81lintkmdb: $(KMDBOBJS:%.o=%.ln)
82	$(LINT) $(LINTFLAGS) $(KMDBOBJS:%.o=%.ln)
83
84lintprom: $(PROMOBJS:%.o=%.ln)
85	$(LINT) $(LINTFLAGS) $(PROMOBJS:%.o=%.ln)
86
87lintkctl: $(KCTLOBJS:%.o=%.ln)
88	$(LINT) $(ALLLINTFLAGS) $(KCTLOBJS:%.o=%.ln)
89
90kaif_off.h: ../../kmdb/kaif_off.in
91	$(OFFSETS_CREATE) <../../kmdb/kaif_off.in >$@
92
93kmdb_context_off.h: ../../kmdb/kmdb_context_off.in
94	$(OFFSETS_CREATE) <../../kmdb/kmdb_context_off.in >$@
95
96#
97# Installation targets
98#
99
100$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64):
101	-$(INS.dir.root.sys)
102
103$(ROOT_MISC_DIR)/%: 	% $(ROOT_MISC_DIR)
104	$(INS.file)
105
106$(ROOT_MISC_DIR_64)/%:	% $(ROOT_MISC_DIR_64)
107	$(INS.file)
108