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 (the "License").
|
---|
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 | #
|
---|
23 | # uts/i86pc/Makefile.i86pc
|
---|
24 | #
|
---|
25 | # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
---|
26 | # Use is subject to license terms.
|
---|
27 | #
|
---|
28 | # ident "@(#)Makefile.i86pc.shared 1.25 08/05/26 SMI"
|
---|
29 | #
|
---|
30 | # This makefile contains the common definitions for the i86pc unix
|
---|
31 | # and all i86pc implementation architecture dependent modules.
|
---|
32 | #
|
---|
33 |
|
---|
34 | #
|
---|
35 | # Machine type (implementation architecture):
|
---|
36 | #
|
---|
37 | PLATFORM = i86pc
|
---|
38 |
|
---|
39 | #
|
---|
40 | # uname -m value
|
---|
41 | #
|
---|
42 | UNAME_M = $(PLATFORM)
|
---|
43 |
|
---|
44 | #
|
---|
45 | # Everybody needs to know how to build modstubs.o and to locate unix.o
|
---|
46 | #
|
---|
47 | UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix
|
---|
48 | GENLIB_DIR = $(UTSBASE)/intel/genunix
|
---|
49 | MODSTUBS_DIR = $(UNIX_DIR)
|
---|
50 | DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
|
---|
51 | LINTS_DIR = $(OBJS_DIR)
|
---|
52 | LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
|
---|
53 | GEN_LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
|
---|
54 |
|
---|
55 | DTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o
|
---|
56 | DTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so
|
---|
57 |
|
---|
58 | SYM_MOD = $(OBJS_DIR)/unix.sym
|
---|
59 |
|
---|
60 | UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
|
---|
61 | MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
|
---|
62 | GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
|
---|
63 | LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
|
---|
64 | DBOOT_LINT_LIB = $(LINT_LIB_DIR)/llib-ldboot.ln
|
---|
65 | GEN_LINT_LIB = $(GEN_LINT_LIB_DIR)/llib-lgenunix.ln
|
---|
66 |
|
---|
67 | #
|
---|
68 | # Include the makefiles which define build rule templates, the
|
---|
69 | # collection of files per module, and a few specific flags. Note
|
---|
70 | # that order is significant, just as with an include path. The
|
---|
71 | # first build rule template which matches the files name will be
|
---|
72 | # used. By including these in order from most machine dependent
|
---|
73 | # to most machine independent, we allow a machine dependent file
|
---|
74 | # to be used in preference over a machine independent version
|
---|
75 | # (Such as a machine specific optimization, which preserves the
|
---|
76 | # interfaces.)
|
---|
77 | #
|
---|
78 | include $(UTSTREE)/$(PLATFORM)/Makefile.files
|
---|
79 | include $(UTSTREE)/intel/Makefile.files
|
---|
80 | include $(UTSTREE)/common/Makefile.files
|
---|
81 |
|
---|
82 | #
|
---|
83 | # Include machine independent rules. Note that this does not imply
|
---|
84 | # that the resulting module from rules in Makefile.uts is machine
|
---|
85 | # independent. Only that the build rules are machine independent.
|
---|
86 | #
|
---|
87 | include $(UTSBASE)/Makefile.uts
|
---|
88 |
|
---|
89 | #
|
---|
90 | # Define supported builds
|
---|
91 | #
|
---|
92 | DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32)
|
---|
93 | ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
|
---|
94 |
|
---|
95 | #
|
---|
96 | # x86 or amd64 inline templates
|
---|
97 | #
|
---|
98 | INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il \
|
---|
99 | $(UTSBASE)/$(PLATFORM)/ml/ia32.il
|
---|
100 | INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il \
|
---|
101 | $(UTSBASE)/$(PLATFORM)/ml/amd64.il
|
---|
102 | INLINES += $(INLINES_$(CLASS))
|
---|
103 |
|
---|
104 | #
|
---|
105 | # kernel-specific optimizations; override default in Makefile.master
|
---|
106 | #
|
---|
107 |
|
---|
108 | CFLAGS_XARCH_32 = $(i386_CFLAGS)
|
---|
109 | CFLAGS_XARCH_64 = $(amd64_CFLAGS)
|
---|
110 | CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
|
---|
111 |
|
---|
112 | COPTFLAG_32 = $(COPTFLAG)
|
---|
113 | COPTFLAG_64 = $(COPTFLAG64)
|
---|
114 | COPTIMIZE = $(COPTFLAG_$(CLASS))
|
---|
115 |
|
---|
116 | CFLAGS = $(CFLAGS_XARCH)
|
---|
117 | CFLAGS += $(COPTIMIZE)
|
---|
118 | CFLAGS += $(INLINES) -D_ASM_INLINES
|
---|
119 | CFLAGS += $(CCMODE)
|
---|
120 | CFLAGS += $(SPACEFLAG)
|
---|
121 | CFLAGS += $(CCUNBOUND)
|
---|
122 | CFLAGS += $(CFLAGS_uts)
|
---|
123 | CFLAGS += -xstrconst
|
---|
124 |
|
---|
125 | ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
|
---|
126 | ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
|
---|
127 | ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
|
---|
128 |
|
---|
129 | ASFLAGS += $(ASFLAGS_XARCH)
|
---|
130 |
|
---|
131 | AS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR)
|
---|
132 |
|
---|
133 | #
|
---|
134 | # The following must be defined for all implementations:
|
---|
135 | #
|
---|
136 | # MAPFILE: ld mapfile for the build of kernel/unix.
|
---|
137 | # MODSTUBS: Module stubs source file.
|
---|
138 | # GENASSYM_SRC: genassym.c
|
---|
139 | #
|
---|
140 | MAPFILE = $(UTSBASE)/$(PLATFORM)/conf/Mapfile
|
---|
141 | MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
|
---|
142 | GENASSYM_SRC = $(UTSBASE)/$(PLATFORM)/ml/genassym.c
|
---|
143 | OFFSETS_SRC = $(UTSBASE)/$(PLATFORM)/ml/offsets.in
|
---|
144 | PLATFORM_OFFSETS_32 = $(UTSBASE)/$(PLATFORM)/ml/mach_offsets.in
|
---|
145 | PLATFORM_OFFSETS_64 = $(UTSBASE)/intel/amd64/ml/mach_offsets.in
|
---|
146 | PLATFORM_OFFSETS_SRC = $(PLATFORM_OFFSETS_$(CLASS))
|
---|
147 | KDI_OFFSETS_SRC = $(UTSBASE)/intel/kdi/kdi_offsets.in
|
---|
148 |
|
---|
149 | #
|
---|
150 | # Define the actual specific platforms
|
---|
151 | #
|
---|
152 | MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP
|
---|
153 |
|
---|
154 | #
|
---|
155 | # Software workarounds for hardware "features"
|
---|
156 | #
|
---|
157 |
|
---|
158 | include $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
|
---|
159 |
|
---|
160 | #
|
---|
161 | # Debugging level
|
---|
162 | #
|
---|
163 | # Special knowledge of which special debugging options effect which
|
---|
164 | # file is used to optimize the build if these flags are changed.
|
---|
165 | #
|
---|
166 | # XXX: The above could possibly be done for more flags and files, but
|
---|
167 | # is left as an experiment to the interested reader. Be forewarned,
|
---|
168 | # that excessive use could lead to maintenance difficulties.
|
---|
169 | #
|
---|
170 | DEBUG_DEFS_OBJ32 =
|
---|
171 | DEBUG_DEFS_DBG32 = -DDEBUG
|
---|
172 | DEBUG_DEFS_OBJ64 =
|
---|
173 | DEBUG_DEFS_DBG64 = -DDEBUG
|
---|
174 | DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
|
---|
175 |
|
---|
176 | DEBUG_COND_OBJ32 :sh = echo \\043
|
---|
177 | DEBUG_COND_DBG32 =
|
---|
178 | DEBUG_COND_OBJ64 :sh = echo \\043
|
---|
179 | DEBUG_COND_DBG64 =
|
---|
180 | IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
|
---|
181 |
|
---|
182 | $(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG -DTRAPTRACE
|
---|
183 | $(IF_DEBUG_OBJ)syscall_asm.o := DEBUG_DEFS += -DSYSCALLTRACE -DTRAPTRACE
|
---|
184 | $(IF_DEBUG_OBJ)syscall_asm_amd64.o := DEBUG_DEFS += -DSYSCALLTRACE -DTRAPTRACE
|
---|
185 | $(IF_DEBUG_OBJ)fast_trap_asm.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
186 | $(IF_DEBUG_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
187 | $(IF_DEBUG_OBJ)intr.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
188 | $(IF_DEBUG_OBJ)locore.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
189 | $(IF_DEBUG_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
190 | $(IF_DEBUG_OBJ)machdep.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
191 | $(IF_DEBUG_OBJ)exception.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
192 | $(IF_DEBUG_OBJ)x_call.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
193 | $(IF_DEBUG_OBJ)mp_call.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
194 | $(IF_DEBUG_OBJ)cbe.o := DEBUG_DEFS += -DTRAPTRACE
|
---|
195 |
|
---|
196 | #
|
---|
197 | # Collect the preprocessor definitions to be associated with *all*
|
---|
198 | # files.
|
---|
199 | #
|
---|
200 | ALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
|
---|
201 | $(OPTION_DEFS)
|
---|
202 | GENASSYM_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS) \
|
---|
203 | -_gcc=-fno-eliminate-unused-debug-symbols \
|
---|
204 | -_gcc=-fno-eliminate-unused-debug-types
|
---|
205 |
|
---|
206 | #
|
---|
207 | # ----- TRANSITIONAL SECTION --------------------------------------------------
|
---|
208 | #
|
---|
209 |
|
---|
210 | #
|
---|
211 | # Not everything which *should* be a module is a module yet. The
|
---|
212 | # following is a list of such objects which are currently part of
|
---|
213 | # the base kernel but should soon become kmods.
|
---|
214 | #
|
---|
215 | # XXX: $(KMACCT_OBJS) is neither in the MT kernel nor was it ever
|
---|
216 | # made into a module. If it is made MT safe before being made
|
---|
217 | # into a module, it should be added to this list. It was in
|
---|
218 | # this list pre ON-4.0.
|
---|
219 | #
|
---|
220 | #
|
---|
221 | MACH_NOT_YET_KMODS = $(AUTOCONF_OBJS)
|
---|
222 |
|
---|
223 | #
|
---|
224 | # ----- END OF TRANSITIONAL SECTION -------------------------------------------
|
---|
225 | #
|
---|
226 |
|
---|
227 | #
|
---|
228 | # The kernels modules which are "implementation architecture"
|
---|
229 | # specific for this machine are enumerated below. Note that most
|
---|
230 | # of these modules must exist (in one form or another) for each
|
---|
231 | # architecture.
|
---|
232 | #
|
---|
233 | # Machine Specific Driver Modules (/kernel/drv)
|
---|
234 | # DRV_KMODS are built both 32-bit and 64-bit
|
---|
235 | # DRV_KMODS_32 are built only 32-bit
|
---|
236 | # DRV_KMODS_64 are built only 64-bit
|
---|
237 | #
|
---|
238 | DRV_KMODS += rootnex
|
---|
239 | DRV_KMODS += isa
|
---|
240 | DRV_KMODS += pcplusmp
|
---|
241 | DRV_KMODS += cpc
|
---|
242 | DRV_KMODS += pci
|
---|
243 | DRV_KMODS += npe
|
---|
244 | DRV_KMODS += pci-ide
|
---|
245 | DRV_KMODS += xsvc
|
---|
246 | DRV_KMODS += mc-amd
|
---|
247 | DRV_KMODS += tzmon
|
---|
248 | DRV_KMODS += battery
|
---|
249 | DRV_KMODS += pv_cmdk
|
---|
250 | DRV_KMODS += xdf
|
---|
251 | DRV_KMODS += xnf
|
---|
252 | DRV_KMODS += xpv
|
---|
253 | DRV_KMODS += xpvd
|
---|
254 |
|
---|
255 | DRV_KMODS += cpudrv
|
---|
256 |
|
---|
257 | #
|
---|
258 | # Platform Power Modules
|
---|
259 | #
|
---|
260 | DRV_KMODS += ppm acpippm
|
---|
261 |
|
---|
262 | $(CLOSED_BUILD)CLOSED_DRV_KMODS += memtest
|
---|
263 |
|
---|
264 | #
|
---|
265 | # CPU Modules
|
---|
266 | #
|
---|
267 | CPU_KMODS += amd_opteron
|
---|
268 | CPU_KMODS += generic_cpu
|
---|
269 | CPU_KMODS += authenticamd
|
---|
270 | CPU_KMODS += genuineintel
|
---|
271 | CPU_KMODS += intel_nb5000
|
---|
272 |
|
---|
273 | #
|
---|
274 | # Exec Class Modules (/kernel/exec):
|
---|
275 | #
|
---|
276 | EXEC_KMODS +=
|
---|
277 |
|
---|
278 | #
|
---|
279 | # Scheduling Class Modules (/kernel/sched):
|
---|
280 | #
|
---|
281 | SCHED_KMODS +=
|
---|
282 |
|
---|
283 | #
|
---|
284 | # File System Modules (/kernel/fs):
|
---|
285 | #
|
---|
286 | FS_KMODS +=
|
---|
287 |
|
---|
288 | #
|
---|
289 | # Streams Modules (/kernel/strmod):
|
---|
290 | #
|
---|
291 | STRMOD_KMODS +=
|
---|
292 |
|
---|
293 | #
|
---|
294 | # 'System' Modules (/kernel/sys):
|
---|
295 | #
|
---|
296 | SYS_KMODS +=
|
---|
297 |
|
---|
298 | #
|
---|
299 | # 'Misc' Modules (/kernel/misc):
|
---|
300 | #
|
---|
301 | MISC_KMODS += gfx_private pcie hvm_bootstrap vbi
|
---|
302 |
|
---|
303 | #
|
---|
304 | # 'Dacf' modules (/kernel/dacf)
|
---|
305 | #
|
---|
306 | DACF_KMODS += consconfig_dacf
|
---|
307 |
|
---|
308 | #
|
---|
309 | # 'Mach' Modules (/kernel/mach):
|
---|
310 | #
|
---|
311 | MACH_KMODS += uppc
|
---|
312 |
|
---|
313 | #
|
---|
314 | # CPR Misc Module.
|
---|
315 | #
|
---|
316 | MISC_KMODS += cpr
|
---|