author | Yuri Pankov <yuri.pankov@nexenta.com> |
Tue, 30 Aug 2011 15:16:15 -0700 | |
changeset 13444 | c1ed50709bff |
parent 10738 | 6cd5e5169fec |
child 13834 | 58bc6f85b799 |
permissions | -rw-r--r-- |
0 | 1 |
# |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
1605
9633a802c459
6379114 kmdb needs to be stricter with its module linkage generation scripts
petede
parents:
524
diff
changeset
|
5 |
# Common Development and Distribution License (the "License"). |
9633a802c459
6379114 kmdb needs to be stricter with its module linkage generation scripts
petede
parents:
524
diff
changeset
|
6 |
# You may not use this file except in compliance with the License. |
0 | 7 |
# |
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. |
|
12 |
# |
|
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] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
|
21 |
# |
|
10207
87c40ea3fc4b
6864230 hiho, hiho, it'ch chtime for CH to go
jmcp <James.McPherson@Sun.COM>
parents:
7767
diff
changeset
|
22 |
# Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
0 | 23 |
# Use is subject to license terms. |
24 |
# |
|
13444
c1ed50709bff
294 ONNV terminal definitions are old and crufty
Yuri Pankov <yuri.pankov@nexenta.com>
parents:
10738
diff
changeset
|
25 |
# Copyright 2011 Nexenta Systems, Inc. All rights reserved. |
c1ed50709bff
294 ONNV terminal definitions are old and crufty
Yuri Pankov <yuri.pankov@nexenta.com>
parents:
10738
diff
changeset
|
26 |
# |
0 | 27 |
|
28 |
.KEEP_STATE: |
|
29 |
.SUFFIXES: |
|
30 |
||
31 |
PROG = kmdbmod |
|
32 |
||
33 |
include ../Makefile.kmdb |
|
34 |
include ../../Makefile.kmdb |
|
35 |
include ../../../Makefile.versions |
|
36 |
include ../../../Makefile.tools |
|
37 |
include ../../../Makefile.kmdb.files |
|
38 |
||
39 |
OBJS += mdb_lex.o mdb_grammar.o |
|
40 |
||
41 |
.NO_PARALLEL: |
|
42 |
.PARALLEL: kmdb_modlinktest.o kmdb_terminfo.c $(ALLOBJS) $(ALLOBJS:%.o=%.ln) |
|
43 |
||
44 |
SRCINCDIRS += . .. ../.. ../../../common ../../../common/libstand |
|
45 |
OSINCDIRS += $(SRC)/uts/$(MMU) $(SRC)/uts/$(ISADIR) |
|
46 |
||
47 |
INCDIRS = $(SRCINCDIRS) $(OSINCDIRS) |
|
48 |
||
49 |
# We don't want thread-specific errno's in kmdb, as we're single-threaded. |
|
50 |
DTS_ERRNO= |
|
51 |
||
52 |
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG |
|
53 |
CPPFLAGS += -D_MDB -D_KMDB $(INCDIRS:%=-I%) $(ARCHOPTS) |
|
54 |
||
55 |
# |
|
56 |
# kmdb is a kernel module, so we'll use the kernel's build flags. |
|
57 |
CFLAGS += $(STAND_FLAGS_32) |
|
58 |
CFLAGS64 += $(STAND_FLAGS_64) |
|
59 |
||
60 |
ASFLAGS += -P -D_ASM $(INCDIRS:%=-I%) $(ARCHOPTS) |
|
61 |
||
62 |
SUBDIR64_sparc = sparcv9 |
|
63 |
SUBDIR64_i386 = amd64 |
|
64 |
SUBDIR64 = $(SUBDIR64_$(MACH)) |
|
65 |
||
66 |
# |
|
67 |
# Terminal types supported by kmdb |
|
68 |
# |
|
69 |
SUPPORTED_TERMS = \ |
|
70 |
ansi \ |
|
71 |
at386 \ |
|
72 |
dtterm \ |
|
73 |
h19 \ |
|
74 |
sun \ |
|
75 |
sun-cmd \ |
|
76 |
sun-color \ |
|
77 |
vt100 \ |
|
78 |
vt52 \ |
|
79 |
wyse30 \ |
|
80 |
wyse50 \ |
|
81 |
wyse60 \ |
|
82 |
xterm \ |
|
83 |
xterms |
|
84 |
||
85 |
LINTFLAGS += -n -errtags=yes |
|
86 |
||
87 |
# The prom interfaces (the prom_* files) are compiled with -D_KERNEL, which |
|
88 |
# teaches them about the kernel version of the synchronization functions, while |
|
89 |
# the core of kmdb, which is compiled without -D_KERNEL, knows about the |
|
90 |
# userland versions. Even though nobody actually uses either one, lint |
|
91 |
# complains that both know about different versions. The same thing applies |
|
92 |
# to the driver, parts of which are executed directly by the kernel, and other |
|
93 |
# parts which are called by kmdb via the auxv. |
|
94 |
ALLLINTFLAGS = $(LINTFLAGS) \ |
|
95 |
-xerroff=E_FUNC_DECL_VAR_ARG2 \ |
|
96 |
-xerroff=E_INCONS_ARG_DECL \ |
|
97 |
-xerroff=E_INCONS_ARG_DECL2 \ |
|
7767
905db6a104b6
6755382 new "more linker like" version of lint2 exposes new lint warnings in ON
John Beck <John.Beck@Sun.COM>
parents:
2546
diff
changeset
|
98 |
-xerroff=E_INCONS_ARG_USED2 \ |
905db6a104b6
6755382 new "more linker like" version of lint2 exposes new lint warnings in ON
John Beck <John.Beck@Sun.COM>
parents:
2546
diff
changeset
|
99 |
-xerroff=E_INCONS_VAL_TYPE_DECL2 \ |
905db6a104b6
6755382 new "more linker like" version of lint2 exposes new lint warnings in ON
John Beck <John.Beck@Sun.COM>
parents:
2546
diff
changeset
|
100 |
-xerroff=E_INCONS_VAL_TYPE_USED2 |
0 | 101 |
|
102 |
MAPFILE = mapfile |
|
1605
9633a802c459
6379114 kmdb needs to be stricter with its module linkage generation scripts
petede
parents:
524
diff
changeset
|
103 |
MAPFILE_INTERMEDIATE = $(MAPFILE).i |
0 | 104 |
MAPFILE_TEMPLATE = ../../../common/kmdb/mapfile_skel |
10610
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
105 |
MAPFILE_SOURCES_COMMON = \ |
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
106 |
../../../common/kmdb/kmdb_dpi.h \ |
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
107 |
../../../common/kmdb/kmdb_kctl.h \ |
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
108 |
../../../common/kmdb/kmdb_kdi.h \ |
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
109 |
../../../common/kmdb/kmdb_wr.h \ |
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
110 |
../../../common/mdb/mdb_ctf.h \ |
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
111 |
../../../common/mdb/mdb_ks.h \ |
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
112 |
../../../common/mdb/mdb_modapi.h \ |
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
113 |
../../../common/mdb/mdb_param.h \ |
218c21980cfd
6881824 ::whatis needs to be faster, smarter, and modular
Jonathan Adams <Jonathan.Adams@Sun.COM>
parents:
10207
diff
changeset
|
114 |
../../../common/mdb/mdb_whatis.h |
0 | 115 |
|
116 |
mdb_lex.o mdb_grammar.o := CCVERBOSE = |
|
117 |
||
118 |
kmdb_ctf_open.o kmdb_ctf_open.ln := CPPFLAGS += -I$(SRC)/common/ctf |
|
119 |
||
120 |
PROMTGTS = $(PROMOBJS) $(PROMOBJS:%.o=%.ln) |
|
121 |
VERSTGTS = $(VERSOBJS) $(VERSOBJS:%.o=%.ln) |
|
122 |
KCTLTGTS = $(KCTLOBJS) $(KCTLOBJS:%.o=%.ln) |
|
123 |
||
124 |
$(PROMTGTS) := CPPFLAGS += -D_BOOT -D_KERNEL -D_MACHDEP $(PROMINCDIRS:%=-I%) \ |
|
125 |
-Dassfail=kmdb_prom_assfail |
|
126 |
||
127 |
$(VERSTGTS) := CPPFLAGS += -DKMDB_VERSION='$(KMDB_VERSION)' |
|
128 |
||
129 |
$(KCTLTGTS) := CPPFLAGS += -D_KERNEL |
|
130 |
$(KCTLTGTS) := ASFLAGS += -D_KERNEL |
|
131 |
||
2546 | 132 |
ffs.o ffs.ln := CPPFLAGS += -Dffs=mdb_ffs |
133 |
||
0 | 134 |
$(ROOTMISC) $(ROOTMISC64) := FILEMODE = 0755 |
135 |
||
136 |
include ../../../Makefile.kmdb.targ |