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 27# 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. 31# 32 33# 34# mdb_ks shouldn't be installed as a standalone module for kmdb. 35# 36ROOTTGTS_kvm_type = mdb 37 38# 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. 41# 42KMDB_LINKTEST = 43 44# 45# We need to override the module mapfile, since it would prevent us from 46# exporting mdb_ks symbols. 47# 48MAPFILE = 49 50# 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. 55# 56kmod/mdb_ks.o := CPPFLAGS += -D_mdb_init=mdb_ks_init -D_mdb_fini=mdb_ks_fini 57 58CERRWARN += -_gcc=-Wno-type-limits 59