xref: /illumos-gate/usr/src/cmd/mdb/Makefile.mdb_ks (revision 4eaa471005973e11a6110b69fe990530b3b95a38)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29#
30# mdb_ks, as used in kmdb, requires some special care and feeding during the
31# build process.  This common Makefile allows us to avoid having to maintain
32# two copies - one for SPARC, and one for Intel.
33#
34
35#
36# mdb_ks shouldn't be installed as a standalone module for kmdb.
37#
38ROOTTGTS_kvm_type = mdb
39
40#
41# mdb_ks must be built before kmdb, and thus cannot use the link test, which
42# can only be run after kmdb has been built.
43#
44KMDB_LINKTEST =
45
46#
47# We need to override the module mapfile, since it would prevent us from
48# exporting mdb_ks symbols.
49#
50MAPFILE =
51
52#
53# mdb_ks's init and fini routines won't be called as part of module (un)loading,
54# because it'll be part of kmdb.  As such, we need to call them directly.
55# Calling _mdb_init and _mdb_fini directly seems vile, so we'll give them
56# sensible prefixes first.
57#
58kmod/mdb_ks.o := CPPFLAGS += -D_mdb_init=mdb_ks_init -D_mdb_fini=mdb_ks_fini
59
60