3 # The contents of this file are subject to the terms of the
4 # Common Development and Distribution License (the "License").
5 # You may not use this file except in compliance with the License.
7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8 # or http://www.opensolaris.org/os/licensing.
9 # See the License for the specific language governing permissions
10 # and limitations under the License.
12 # When distributing Covered Code, include this CDDL HEADER in each
13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14 # If applicable, add the following below this CDDL HEADER, with the
15 # fields enclosed by brackets "[]" replaced with your own identifying
16 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright (c) 2013 Andrew Stormont. All rights reserved.
24 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
25 # Copyright 2016 Joyent, Inc.
26 # Copyright 2016 Garrett D'Amore <garrett@damore.org>
27 # Copyright 2018 Nexenta Systems, Inc.
31 # This makefile contains the common definitions for all intel
32 # implementation architecture independent modules.
36 # Machine type (implementation architecture):
41 # Everybody needs to know how to build modstubs.o and to locate unix.o.
42 # Note that unix.o must currently be selected from among the possible
43 # "implementation architectures". Note further, that unix.o is only
44 # used as an optional error check for undefines so (theoretically)
45 # any "implementation architectures" could be used. We choose i86pc
46 # because it is the reference port.
48 UNIX_DIR = $(UTSBASE)/i86pc/unix
49 GENLIB_DIR = $(UTSBASE)/intel/genunix
50 IPDRV_DIR = $(UTSBASE)/intel/ip
51 MODSTUBS_DIR = $(UNIX_DIR)
52 DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
54 UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
55 GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
56 MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
59 # Include the makefiles which define build rule templates, the
60 # collection of files per module, and a few specific flags. Note
61 # that order is significant, just as with an include path. The
62 # first build rule template which matches the files name will be
63 # used. By including these in order from most machine dependent
64 # to most machine independent, we allow a machine dependent file
65 # to be used in preference over a machine independent version
66 # (Such as a machine specific optimization, which preserves the
69 include $(UTSBASE)/intel/Makefile.files
70 include $(UTSBASE)/common/Makefile.files
73 # ----- TRANSITIONAL SECTION --------------------------------------------------
77 # Not everything which *should* be a module is a module yet. The
78 # following is a list of such objects which are currently part of
79 # genunix but which might someday become kmods. This must be
80 # defined before we include Makefile.uts, or else genunix's build
81 # won't be as parallel as we might like.
83 NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS)
86 # ----- END OF TRANSITIONAL SECTION -------------------------------------------
88 # Include machine independent rules. Note that this does not imply
89 # that the resulting module from rules in Makefile.uts is machine
90 # independent. Only that the build rules are machine independent.
92 include $(UTSBASE)/Makefile.uts
95 # The following must be defined for all implementations:
97 MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
100 # Define supported builds
102 DEF_BUILDS = $(DEF_BUILDS64)
103 ALL_BUILDS = $(ALL_BUILDS64)
106 # kernel-specific optimizations; override default in Makefile.master
109 CFLAGS_XARCH_32 = $(i386_CFLAGS)
110 CFLAGS_XARCH_64 = $(amd64_CFLAGS)
111 CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
113 COPTFLAG_32 = $(COPTFLAG)
114 COPTFLAG_64 = $(COPTFLAG64)
115 COPTIMIZE = $(COPTFLAG_$(CLASS))
117 CFLAGS = $(CFLAGS_XARCH)
118 CFLAGS += $(COPTIMIZE)
119 CFLAGS += -D_ASM_INLINES
120 CFLAGS += $(CFLAGS_uts)
121 CFLAGS += -fstack-protector
123 ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
124 ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
125 ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
127 ASFLAGS += $(ASFLAGS_XARCH)
130 # Define the base directory for installation.
132 BASE_INS_DIR = $(ROOT)
137 # Special knowledge of which special debugging options affect which
138 # file is used to optimize the build if these flags are changed.
141 DEBUG_DEFS_DBG32 = -DDEBUG
143 DEBUG_DEFS_DBG64 = -DDEBUG
144 DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
146 DEBUG_COND_OBJ32 = $(POUND_SIGN)
148 DEBUG_COND_OBJ64 = $(POUND_SIGN)
150 IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
152 $(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
153 $(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
156 # Collect the preprocessor definitions to be associated with *all*
159 ALL_DEFS = $(DEBUG_DEFS) $(OPTION_DEFS)
162 # The kernels modules which are "implementation architecture"
163 # specific for this machine are enumerated below. Note that most
164 # of these modules must exist (in one form or another) for each
167 # Common Drivers (usually pseudo drivers) (/kernel/drv)
168 # DRV_KMODS are built both 32-bit and 64-bit
169 # DRV_KMODS_32 are built only 32-bit
170 # DRV_KMODS_64 are built only 64-bit
175 DRV_KMODS += amd64_gart
179 DRV_KMODS += agptarget
184 DRV_KMODS += audio1575
185 DRV_KMODS += audio810
186 DRV_KMODS += audiocmi
187 DRV_KMODS += audiocmihd
188 DRV_KMODS += audioemu10k
189 DRV_KMODS += audioens
191 DRV_KMODS += audioixp
193 DRV_KMODS += audiop16x
194 DRV_KMODS += audiopci
195 DRV_KMODS += audiosolo
197 DRV_KMODS += audiovia823x
215 DRV_KMODS += cryptoadm
219 DRV_KMODS += dlpistub
233 DRV_KMODS += intel_nb5000
234 DRV_KMODS += intel_nhm
242 DRV_KMODS += ipsecesp
252 DRV_KMODS += logindmux
255 DRV_KMODS += mouse8042
258 DRV_KMODS += nulldriver
262 DRV_KMODS += openeepr
265 DRV_KMODS += pit_beep
286 DRV_KMODS += signalfd
297 DRV_KMODS += sysevent
319 DRV_KMODS += vmxnet3s
323 # Common code drivers
338 DRV_KMODS += amd8111s
346 # Virtio block driver
350 # DTrace and DTrace Providers
354 DRV_KMODS += lockstat
357 DRV_KMODS += systrace
358 DRV_KMODS += fasttrap
362 # I/O framework test drivers
366 DRV_KMODS += tvhci tphci tclient
370 # Machine Specific Driver Modules (/kernel/drv):
373 DRV_KMODS += scsi_vhci
375 DRV_KMODS += pmcs8001fw
385 # SCSI Enclosure Services driver
390 # USB specific modules
399 DRV_KMODS += scsa2usb
426 MISC_KMODS += s1394 sbp2
427 DRV_KMODS += hci1394 scsa1394
429 DRV_KMODS += dcam1394
432 # InfiniBand pseudo drivers
434 DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs
435 DRV_KMODS += sol_umad
440 BRAND_KMODS += sn1_brand
443 # Exec Class Modules (/kernel/exec):
445 EXEC_KMODS += elfexec intpexec javaexec
448 # File System Modules (/kernel/fs):
451 FS_KMODS += procfs sharefs
455 # Streams Modules (/kernel/strmod):
457 STRMOD_KMODS += bufmod connld dedump ldterm pckt pfmod pipemod
458 STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod
459 STRMOD_KMODS += spppasyn spppcomp
460 STRMOD_KMODS += tirdwr ttcompat
461 STRMOD_KMODS += usbkbm
462 STRMOD_KMODS += usbms
463 STRMOD_KMODS += usbwcm
464 STRMOD_KMODS += usb_ah
465 STRMOD_KMODS += drcompat
466 STRMOD_KMODS += cryptmod
467 STRMOD_KMODS += vuid2ps2
468 STRMOD_KMODS += vuid3ps2
469 STRMOD_KMODS += vuidm3p
470 STRMOD_KMODS += vuidm4p
471 STRMOD_KMODS += vuidm5p
474 # 'System' Modules (/kernel/sys):
476 SYS_KMODS += exacctsys
477 SYS_KMODS += inst_sync
488 # 'Misc' Modules (/kernel/misc)
489 # MISC_KMODS are built both 32-bit and 64-bit
490 # MISC_KMODS_32 are built only 32-bit
491 # MISC_KMODS_64 are built only 64-bit
495 MISC_KMODS += agpmaster
497 MISC_KMODS += bootdev
500 MISC_KMODS += consconfig
505 MISC_KMODS += fssnap_if
508 MISC_KMODS += hidparser
518 MISC_KMODS += iommulib
520 MISC_KMODS += kbtrans
522 MISC_KMODS += kgssapi
523 MISC_KMODS += kmech_dummy
524 MISC_KMODS += kmech_krb5
525 MISC_KMODS += ksocket
528 MISC_KMODS += nfs_dlboot
531 MISC_KMODS += pci_autoconfig
535 MISC_KMODS += rpcsec_gss
540 MISC_KMODS += sol_ofs
541 MISC_KMODS += strategy
542 MISC_KMODS += strplumb
545 MISC_KMODS += usba usba10 usbs49_fw
546 MISC_KMODS += scsi_vhci_f_sym_hds
547 MISC_KMODS += scsi_vhci_f_sym
548 MISC_KMODS += scsi_vhci_f_tpgs
549 MISC_KMODS += scsi_vhci_f_asym_sun
550 MISC_KMODS += scsi_vhci_f_tape
551 MISC_KMODS += scsi_vhci_f_tpgs_tape
553 MISC_KMODS += emlxs_fw
554 MISC_KMODS += qlc_fw_2200
555 MISC_KMODS += qlc_fw_2300
556 MISC_KMODS += qlc_fw_2400
557 MISC_KMODS += qlc_fw_2500
558 MISC_KMODS += qlc_fw_6322
559 MISC_KMODS += qlc_fw_8100
562 MISC_KMODS += klmmod klmops
565 # Software Cryptographic Providers (/kernel/crypto):
568 CRYPTO_KMODS += arcfour
569 CRYPTO_KMODS += blowfish
572 CRYPTO_KMODS += edonr
578 CRYPTO_KMODS += skein
579 CRYPTO_KMODS += swrand
582 # IP Policy Modules (/kernel/ipp)
585 IPP_KMODS += flowacct
589 IPP_KMODS += tswtclmt
592 # generic-unix module (/kernel/genunix):
594 GENUNIX_KMODS += genunix
597 # Modules eXcluded from the product:
601 # 'Dacf' Modules (/kernel/dacf):
605 # Performance Counter BackEnd modules (/usr/kernel/pcbe)
607 PCBE_KMODS += p4_pcbe opteron_pcbe core_pcbe
610 # MAC-Type Plugin Modules (/kernel/mac)
612 MAC_KMODS += mac_6to4
613 MAC_KMODS += mac_ether
614 MAC_KMODS += mac_ipv4
615 MAC_KMODS += mac_ipv6
616 MAC_KMODS += mac_wifi
620 # kiconv modules (/kernel/kiconv):
622 KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc
625 # 'Dacf' Modules (/kernel/dacf):
627 DACF_KMODS += net_dacf