6 # You may not use this file except in compliance with the License.
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 #
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 #
25 # Copyright (c) 2013 by Delphix. All rights reserved.
26 # Copyright 2015, Joyent, Inc.
27 #
28
29 .KEEP_STATE:
30 .SUFFIXES:
31
32 include $(SRC)/cmd/mdb/Makefile.tools
33
34 #
35 # Make sure we're getting a consistent execution environment for the
36 # embedded scripts.
37 #
38 SHELL= /usr/bin/ksh93
39
40 $(KMOD_SOURCES_DIFFERENT)KMODSRCS = $(MODSRCS)
41 $(KMOD_SOURCES_DIFFERENT)KMODASMSRCS = $(MODASMSRCS)
42
43 MODOBJS = $(MODSRCS:%.c=dmod/%.o) $(MODASMSRCS:%.s=dmod/%.o)
44 KMODOBJS = $(KMODSRCS:%.c=kmod/%.o) $(KMODASMSRCS:%.s=kmod/%.o)
45
46 MODNAME_cmd = if [ -n "$(MODULE_NAME)" ]; then print $(MODULE_NAME); else print $(MODULE)| sed -e 's:\.so$$::'; fi
106 # building with an LFS python, we attempt to use -isystem when it's
107 # available.
108 #
109 PYCPPFLAGS = -_gcc=-isystem -_gcc=$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)
110 PYCPPFLAGS += -_cc=-I$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)
111 PYLNFLAGS = -I$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)
112
113 kvm_TGTFLAGS = -D_KERNEL
114 proc_TGTFLAGS = -D_USER
115
116 CSTD = $(CSTD_GNU99)
117
118 CFLAGS += $(CCVERBOSE)
119 CFLAGS64 += $(CCVERBOSE)
120 CPPFLAGS += $($(MDBTGT)_TGTFLAGS) -I../../../common
121 LDFLAGS += $(ZTEXT)
122 LDFLAGS64 += $(ZTEXT)
123 ASFLAGS += -P
124 AS_CPPFLAGS += -D_ASM
125
126 # Module type-specific compiler flags
127 $(MODOBJS) := CFLAGS += $(C_BIGPICFLAGS) $(XREGSFLAG)
128 $(MODOBJS) := CFLAGS64 += $(C_BIGPICFLAGS) $(XREGSFLAG)
129 $(KMODOBJS) $(KLINTOBJS) := CPPFLAGS += -D_KMDB
130 $(KMODOBJS) := V9CODESIZE = $(CCABS32)
131 $(KMODOBJS) := DTS_ERRNO =
132
133 # Modules aren't allowed to export symbols
134 MAPFILE = $(SRC)/cmd/mdb/common/modules/conf/mapfile
135
136 # Modules typically make external references. To provide for -zdefs use
137 # and clean ldd(1) processing, explicitly define all external references.
138 MAPFILE-EXT = $(SRC)/cmd/mdb/common/modules/conf/mapfile-extern
139
140 #
141 # kmdb is a kernel module, so we'll use the kernel's build flags.
142 $(KMODOBJS) := CFLAGS64 += $(STAND_FLAGS_64)
143
144 #
145 # Override this to pull source files from another directory
|
6 # You may not use this file except in compliance with the License.
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 #
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 #
25 # Copyright (c) 2013 by Delphix. All rights reserved.
26 # Copyright (c) 2018, Joyent, Inc.
27 #
28
29 .KEEP_STATE:
30 .SUFFIXES:
31
32 include $(SRC)/cmd/mdb/Makefile.tools
33
34 #
35 # Make sure we're getting a consistent execution environment for the
36 # embedded scripts.
37 #
38 SHELL= /usr/bin/ksh93
39
40 $(KMOD_SOURCES_DIFFERENT)KMODSRCS = $(MODSRCS)
41 $(KMOD_SOURCES_DIFFERENT)KMODASMSRCS = $(MODASMSRCS)
42
43 MODOBJS = $(MODSRCS:%.c=dmod/%.o) $(MODASMSRCS:%.s=dmod/%.o)
44 KMODOBJS = $(KMODSRCS:%.c=kmod/%.o) $(KMODASMSRCS:%.s=kmod/%.o)
45
46 MODNAME_cmd = if [ -n "$(MODULE_NAME)" ]; then print $(MODULE_NAME); else print $(MODULE)| sed -e 's:\.so$$::'; fi
106 # building with an LFS python, we attempt to use -isystem when it's
107 # available.
108 #
109 PYCPPFLAGS = -_gcc=-isystem -_gcc=$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)
110 PYCPPFLAGS += -_cc=-I$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)
111 PYLNFLAGS = -I$(ADJUNCT_PROTO)/usr/include/python$(PYTHON_VERSION)
112
113 kvm_TGTFLAGS = -D_KERNEL
114 proc_TGTFLAGS = -D_USER
115
116 CSTD = $(CSTD_GNU99)
117
118 CFLAGS += $(CCVERBOSE)
119 CFLAGS64 += $(CCVERBOSE)
120 CPPFLAGS += $($(MDBTGT)_TGTFLAGS) -I../../../common
121 LDFLAGS += $(ZTEXT)
122 LDFLAGS64 += $(ZTEXT)
123 ASFLAGS += -P
124 AS_CPPFLAGS += -D_ASM
125
126 SMOFF += all_func_returns,index_overflow
127
128 # Module type-specific compiler flags
129 $(MODOBJS) := CFLAGS += $(C_BIGPICFLAGS) $(XREGSFLAG)
130 $(MODOBJS) := CFLAGS64 += $(C_BIGPICFLAGS) $(XREGSFLAG)
131 $(KMODOBJS) $(KLINTOBJS) := CPPFLAGS += -D_KMDB
132 $(KMODOBJS) := V9CODESIZE = $(CCABS32)
133 $(KMODOBJS) := DTS_ERRNO =
134
135 # Modules aren't allowed to export symbols
136 MAPFILE = $(SRC)/cmd/mdb/common/modules/conf/mapfile
137
138 # Modules typically make external references. To provide for -zdefs use
139 # and clean ldd(1) processing, explicitly define all external references.
140 MAPFILE-EXT = $(SRC)/cmd/mdb/common/modules/conf/mapfile-extern
141
142 #
143 # kmdb is a kernel module, so we'll use the kernel's build flags.
144 $(KMODOBJS) := CFLAGS64 += $(STAND_FLAGS_64)
145
146 #
147 # Override this to pull source files from another directory
|