sd: remove 'ssd' driver support
[unleashed/tickless.git] / usr / src / cmd / mdb / Makefile.kmdb
blobbf1ea177f0e4c00e584832605d0b991cd06c06e0
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23 # Use is subject to license terms.
25 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
28 .KEEP_STATE:
29 .SUFFIXES:
31 PROG = kmdbmod
33 include ../Makefile.kmdb
34 include ../../Makefile.kmdb
35 include ../../../Makefile.versions
36 include ../../../Makefile.tools
37 include ../../../Makefile.kmdb.files
39 OBJS += mdb_lex.o mdb_grammar.o
41 .NO_PARALLEL:
42 .PARALLEL: kmdb_modlinktest.o kmdb_terminfo.c $(ALLOBJS) $(ALLOBJS:%.o=%.ln)
44 SRCINCDIRS      += . .. ../.. ../../../common ../../../common/libstand
45 OSINCDIRS       += $(SRC)/uts/$(MMU) $(SRC)/uts/$(ISADIR)
47 INCDIRS = $(SRCINCDIRS) $(OSINCDIRS)
49 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
50 CPPFLAGS += -D_MDB -D_KMDB $(INCDIRS:%=-I%) $(ARCHOPTS)
52 C99MODE=        $(C99_ENABLE)
55 # kmdb is a kernel module, so we'll use the kernel's build flags.
56 CFLAGS += $(STAND_FLAGS_32)
57 CFLAGS64 += $(STAND_FLAGS_64)
59 ASFLAGS += -D_ASM $(INCDIRS:%=-I%) $(ARCHOPTS)
61 SUBDIR64_sparc          = sparcv9
62 SUBDIR64_i386           = amd64
63 SUBDIR64                = $(SUBDIR64_$(MACH))
66 # Terminal types supported by kmdb
68 SUPPORTED_TERMS = \
69         ansi \
70         at386 \
71         dtterm \
72         h19 \
73         sun \
74         sun-cmd \
75         sun-color \
76         vt100 \
77         vt52 \
78         wyse30 \
79         wyse50 \
80         wyse60 \
81         xterm \
82         xterms
84 # The prom interfaces (the prom_* files) are compiled with -D_KERNEL, which
85 # teaches them about the kernel version of the synchronization functions, while
86 # the core of kmdb, which is compiled without -D_KERNEL, knows about the
87 # userland versions. The same thing applies to the driver, parts of which
88 # are executed directly by the kernel, and other parts which are called by
89 # kmdb via the auxv.
91 CERRWARN += -Wno-uninitialized
92 CERRWARN += -Wno-unused-label
93 CERRWARN += -Wno-char-subscripts
94 CERRWARN += -Wno-clobbered
95 CERRWARN += -Wno-unused-variable
96 CERRWARN += -Wno-parentheses
98 MAPFILE = mapfile
99 MAPFILE_INTERMEDIATE = $(MAPFILE).i
100 MAPFILE_TEMPLATE = ../../../common/kmdb/mapfile_skel
101 MAPFILE_SOURCES_COMMON = \
102         ../../../common/kmdb/kmdb_dpi.h \
103         ../../../common/kmdb/kmdb_kctl.h \
104         ../../../common/kmdb/kmdb_kdi.h \
105         ../../../common/kmdb/kmdb_wr.h \
106         ../../../common/mdb/mdb_ctf.h \
107         ../../../common/mdb/mdb_ks.h \
108         ../../../common/mdb/mdb_modapi.h \
109         ../../../common/mdb/mdb_param.h \
110         ../../../common/mdb/mdb_whatis.h
112 kmdb_ctf_open.o kmdb_ctf_open.ln        := CPPFLAGS += -I$(SRC)/common/ctf
114 PROMTGTS        = $(PROMOBJS) $(PROMOBJS:%.o=%.ln)
115 VERSTGTS        = $(VERSOBJS) $(VERSOBJS:%.o=%.ln)
116 KCTLTGTS        = $(KCTLOBJS) $(KCTLOBJS:%.o=%.ln)
118 $(PROMTGTS) := CPPFLAGS += -D_BOOT -D_KERNEL -D_MACHDEP $(PROMINCDIRS:%=-I%) \
119         -Dassfail=kmdb_prom_assfail
121 $(VERSTGTS) := CPPFLAGS += -DKMDB_VERSION='$(KMDB_VERSION)'
123 $(KCTLTGTS) := CPPFLAGS += -D_KERNEL
124 $(KCTLTGTS) := ASFLAGS += -D_KERNEL
126 ffs.o ffs.ln := CPPFLAGS += -Dffs=mdb_ffs
128 $(ROOTMISC) $(ROOTMISC64) := FILEMODE = 0755
130 include ../../../Makefile.kmdb.targ