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
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.
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]
23 # Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
28 # mdb_ks, as used in kmdb, requires some special care and feeding during the
29 # build process. This common Makefile allows us to avoid having to maintain
30 # two copies - one for SPARC, and one for Intel.
34 # mdb_ks shouldn't be installed as a standalone module for kmdb.
36 ROOTTGTS_kvm_type = mdb
39 # mdb_ks must be built before kmdb, and thus cannot use the link test, which
40 # can only be run after kmdb has been built.
45 # We need to override the module mapfile, since it would prevent us from
46 # exporting mdb_ks symbols.
51 # mdb_ks's init and fini routines won't be called as part of module (un)loading,
52 # because it'll be part of kmdb. As such, we need to call them directly.
53 # Calling _mdb_init and _mdb_fini directly seems vile, so we'll give them
54 # sensible prefixes first.
56 kmod/mdb_ks.o := CPPFLAGS += -D_mdb_init=mdb_ks_init -D_mdb_fini=mdb_ks_fini
58 CERRWARN += -_gcc=-Wno-type-limits