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 2016 Joyent, Inc.
25 # Copyright 2016 Garrett D'Amore <garrett@damore.org>
26 # Copyright 2018 Nexenta Systems, Inc.
30 # This makefile contains the common definitions for all intel
31 # implementation architecture independent modules.
35 # Machine type (implementation architecture):
40 # Everybody needs to know how to build modstubs.o and to locate unix.o.
41 # Note that unix.o must currently be selected from among the possible
42 # "implementation architectures". Note further, that unix.o is only
43 # used as an optional error check for undefines so (theoretically)
44 # any "implementation architectures" could be used. We choose i86pc
45 # because it is the reference port.
47 UNIX_DIR = $(UTSBASE)/i86pc/unix
48 GENLIB_DIR = $(UTSBASE)/intel/genunix
49 IPDRV_DIR = $(UTSBASE)/intel/ip
50 MODSTUBS_DIR = $(UNIX_DIR)
51 DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
52 LINTS_DIR = $(OBJS_DIR)
53 LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
55 UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
56 GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
57 MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
58 LINT_LIB = $(UTSBASE)/i86pc/lint-libs/$(OBJS_DIR)/llib-lunix.ln
59 GEN_LINT_LIB = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
62 # Include the makefiles which define build rule templates, the
63 # collection of files per module, and a few specific flags. Note
64 # that order is significant, just as with an include path. The
65 # first build rule template which matches the files name will be
66 # used. By including these in order from most machine dependent
67 # to most machine independent, we allow a machine dependent file
68 # to be used in preference over a machine independent version
69 # (Such as a machine specific optimization, which preserves the
72 include $(UTSBASE)/intel/Makefile.files
73 include $(UTSBASE)/common/Makefile.files
76 # ----- TRANSITIONAL SECTION --------------------------------------------------
80 # Not everything which *should* be a module is a module yet. The
81 # following is a list of such objects which are currently part of
82 # genunix but which might someday become kmods. This must be
83 # defined before we include Makefile.uts, or else genunix's build
84 # won't be as parallel as we might like.
86 NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS)
89 # ----- END OF TRANSITIONAL SECTION -------------------------------------------
91 # Include machine independent rules. Note that this does not imply
92 # that the resulting module from rules in Makefile.uts is machine
93 # independent. Only that the build rules are machine independent.
95 include $(UTSBASE)/Makefile.uts
98 # The following must be defined for all implementations:
100 MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
103 # Define supported builds
105 DEF_BUILDS = $(DEF_BUILDS64)
106 ALL_BUILDS = $(ALL_BUILDS64)
109 # x86 or amd64 inline templates
111 INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il
112 INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il
113 INLINES += $(INLINES_$(CLASS))
116 # kernel-specific optimizations; override default in Makefile.master
119 CFLAGS_XARCH_32 = $(i386_CFLAGS)
120 CFLAGS_XARCH_64 = $(amd64_CFLAGS)
121 CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
123 COPTFLAG_32 = $(COPTFLAG)
124 COPTFLAG_64 = $(COPTFLAG64)
125 COPTIMIZE = $(COPTFLAG_$(CLASS))
127 CFLAGS = $(CFLAGS_XARCH)
128 CFLAGS += $(COPTIMIZE)
129 CFLAGS += $(INLINES) -D_ASM_INLINES
131 CFLAGS += $(SPACEFLAG)
132 CFLAGS += $(CCUNBOUND)
133 CFLAGS += $(CFLAGS_uts)
135 CFLAGS += -_gcc=-fstack-protector
137 ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
138 ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
139 ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
141 ASFLAGS += $(ASFLAGS_XARCH)
144 # Define the base directory for installation.
146 BASE_INS_DIR = $(ROOT)
151 # Special knowledge of which special debugging options affect which
152 # file is used to optimize the build if these flags are changed.
155 DEBUG_DEFS_DBG32 = -DDEBUG
157 DEBUG_DEFS_DBG64 = -DDEBUG
158 DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
160 DEBUG_COND_OBJ32 = $(POUND_SIGN)
162 DEBUG_COND_OBJ64 = $(POUND_SIGN)
164 IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
166 $(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
167 $(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
170 # Collect the preprocessor definitions to be associated with *all*
173 ALL_DEFS = $(DEBUG_DEFS) $(OPTION_DEFS)
176 # The kernels modules which are "implementation architecture"
177 # specific for this machine are enumerated below. Note that most
178 # of these modules must exist (in one form or another) for each
181 # Common Drivers (usually pseudo drivers) (/kernel/drv)
182 # DRV_KMODS are built both 32-bit and 64-bit
183 # DRV_KMODS_32 are built only 32-bit
184 # DRV_KMODS_64 are built only 64-bit
189 DRV_KMODS += amd64_gart
193 DRV_KMODS += agptarget
201 DRV_KMODS += audio1575
202 DRV_KMODS += audio810
203 DRV_KMODS += audiocmi
204 DRV_KMODS += audiocmihd
205 DRV_KMODS += audioemu10k
206 DRV_KMODS += audioens
208 DRV_KMODS += audioixp
210 DRV_KMODS += audiop16x
211 DRV_KMODS += audiopci
212 DRV_KMODS += audiosolo
214 DRV_KMODS += audiovia823x
226 DRV_KMODS += myri10ge
236 DRV_KMODS += cryptoadm
240 DRV_KMODS += dlpistub
255 DRV_KMODS += intel_nb5000
256 DRV_KMODS += intel_nhm
264 DRV_KMODS += ipsecesp
281 DRV_KMODS += logindmux
282 DRV_KMODS += mega_sas
285 DRV_KMODS += mouse8042
291 DRV_KMODS += nulldriver
296 DRV_KMODS += openeepr
301 DRV_KMODS += pit_beep
330 DRV_KMODS += signalfd
342 DRV_KMODS += sysevent
369 DRV_KMODS += stmf_sbd
377 DRV_KMODS += ncall nsctl sdbc nskern sv
378 DRV_KMODS += ii rdc rdcsrv rdcstub
380 DRV_KMODS += vmxnet3s
384 # Common code drivers
404 DRV_KMODS += amd8111s
419 # Virtio block driver
422 # Virtio network driver
426 # DTrace and DTrace Providers
430 DRV_KMODS += lockstat
433 DRV_KMODS += systrace
434 DRV_KMODS += fasttrap
438 # I/O framework test drivers
442 DRV_KMODS += tvhci tphci tclient
446 # Machine Specific Driver Modules (/kernel/drv):
449 DRV_KMODS += scsi_vhci
451 DRV_KMODS += pmcs8001fw
461 # PCMCIA specific module(s)
464 MISC_KMODS += cardbus
467 # SCSI Enclosure Services driver
472 # USB specific modules
481 DRV_KMODS += scsa2usb
508 MISC_KMODS += s1394 sbp2
509 DRV_KMODS += hci1394 scsa1394
511 DRV_KMODS += dcam1394
514 # InfiniBand pseudo drivers
516 DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs
517 DRV_KMODS += sol_umad
522 BRAND_KMODS += sn1_brand s10_brand
525 # Exec Class Modules (/kernel/exec):
527 EXEC_KMODS += elfexec intpexec shbinexec javaexec
530 # Scheduling Class Modules (/kernel/sched):
532 SCHED_KMODS += IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL SDC
535 # File System Modules (/kernel/fs):
537 FS_KMODS += autofs ctfs dcfs dev devfs fdfs fifofs hsfs lofs
538 FS_KMODS += mntfs namefs nfs objfs zfs zut
539 FS_KMODS += pcfs procfs sockfs specfs tmpfs udfs ufs sharefs
540 FS_KMODS += smbfs bootfs
543 # Streams Modules (/kernel/strmod):
545 STRMOD_KMODS += bufmod connld dedump ldterm pckt pfmod pipemod
546 STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod
547 STRMOD_KMODS += spppasyn spppcomp
548 STRMOD_KMODS += tirdwr ttcompat
549 STRMOD_KMODS += usbkbm
550 STRMOD_KMODS += usbms
551 STRMOD_KMODS += usbwcm
552 STRMOD_KMODS += usb_ah
553 STRMOD_KMODS += drcompat
554 STRMOD_KMODS += cryptmod
555 STRMOD_KMODS += vuid2ps2
556 STRMOD_KMODS += vuid3ps2
557 STRMOD_KMODS += vuidm3p
558 STRMOD_KMODS += vuidm4p
559 STRMOD_KMODS += vuidm5p
562 # 'System' Modules (/kernel/sys):
566 SYS_KMODS += exacctsys
567 SYS_KMODS += inst_sync
579 # 'Misc' Modules (/kernel/misc)
580 # MISC_KMODS are built both 32-bit and 64-bit
581 # MISC_KMODS_32 are built only 32-bit
582 # MISC_KMODS_64 are built only 64-bit
586 MISC_KMODS += agpmaster
588 MISC_KMODS += bootdev
591 MISC_KMODS += consconfig
597 MISC_KMODS += fssnap_if
600 MISC_KMODS += hidparser
610 MISC_KMODS += iommulib
612 MISC_KMODS += kbtrans
614 MISC_KMODS += kgssapi
615 MISC_KMODS += kmech_dummy
616 MISC_KMODS += kmech_krb5
617 MISC_KMODS += ksocket
621 MISC_KMODS += net80211
622 MISC_KMODS += nfs_dlboot
625 MISC_KMODS += pci_autoconfig
630 MISC_KMODS += rpcsec_gss
635 MISC_KMODS += sol_ofs
637 MISC_KMODS += strategy
638 MISC_KMODS += strplumb
641 MISC_KMODS += usba usba10 usbs49_fw
642 MISC_KMODS += scsi_vhci_f_sym_hds
643 MISC_KMODS += scsi_vhci_f_sym
644 MISC_KMODS += scsi_vhci_f_tpgs
645 MISC_KMODS += scsi_vhci_f_asym_sun
646 MISC_KMODS += scsi_vhci_f_tape
647 MISC_KMODS += scsi_vhci_f_tpgs_tape
649 MISC_KMODS += emlxs_fw
650 MISC_KMODS += qlc_fw_2200
651 MISC_KMODS += qlc_fw_2300
652 MISC_KMODS += qlc_fw_2400
653 MISC_KMODS += qlc_fw_2500
654 MISC_KMODS += qlc_fw_6322
655 MISC_KMODS += qlc_fw_8100
658 MISC_KMODS += klmmod klmops
661 # Software Cryptographic Providers (/kernel/crypto):
664 CRYPTO_KMODS += arcfour
665 CRYPTO_KMODS += blowfish
668 CRYPTO_KMODS += edonr
674 CRYPTO_KMODS += skein
675 CRYPTO_KMODS += swrand
678 # IP Policy Modules (/kernel/ipp)
681 IPP_KMODS += flowacct
685 IPP_KMODS += tswtclmt
688 # generic-unix module (/kernel/genunix):
690 GENUNIX_KMODS += genunix
693 # Modules eXcluded from the product:
697 # 'Dacf' Modules (/kernel/dacf):
701 # Performance Counter BackEnd modules (/usr/kernel/pcbe)
703 PCBE_KMODS += p4_pcbe opteron_pcbe core_pcbe
706 # MAC-Type Plugin Modules (/kernel/mac)
708 MAC_KMODS += mac_6to4
709 MAC_KMODS += mac_ether
710 MAC_KMODS += mac_ipv4
711 MAC_KMODS += mac_ipv6
712 MAC_KMODS += mac_wifi
716 # socketmod (kernel/socketmod)
718 SOCKET_KMODS += sockpfp
719 SOCKET_KMODS += socksctp
720 SOCKET_KMODS += socksdp
721 SOCKET_KMODS += sockrds
722 SOCKET_KMODS += ksslf
725 # kiconv modules (/kernel/kiconv):
727 KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc
730 # 'Dacf' Modules (/kernel/dacf):
732 DACF_KMODS += net_dacf
735 # Ensure that the variable member of the cpu_t (cpu_m) is defined
736 # for the lint builds so as not to cause lint errors during the
737 # global cross check.
739 LINTFLAGS += -D_MACHDEP -I$(UTSBASE)/i86pc