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 2017 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) $(DEF_BUILDS32)
106 ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
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
403 DRV_KMODS += amd8111s
418 # Virtio block driver
421 # Virtio network driver
425 # DTrace and DTrace Providers
429 DRV_KMODS += lockstat
432 DRV_KMODS += systrace
433 DRV_KMODS += fasttrap
437 # I/O framework test drivers
441 DRV_KMODS += tvhci tphci tclient
445 # Machine Specific Driver Modules (/kernel/drv):
448 DRV_KMODS += scsi_vhci
450 DRV_KMODS += pmcs8001fw
460 # PCMCIA specific module(s)
463 MISC_KMODS += cardbus
466 # SCSI Enclosure Services driver
471 # USB specific modules
480 DRV_KMODS += scsa2usb
507 MISC_KMODS += s1394 sbp2
508 DRV_KMODS += hci1394 scsa1394
510 DRV_KMODS += dcam1394
513 # InfiniBand pseudo drivers
515 DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs
516 DRV_KMODS += sol_umad
521 BRAND_KMODS += sn1_brand s10_brand
524 # Exec Class Modules (/kernel/exec):
526 EXEC_KMODS += elfexec intpexec shbinexec javaexec
529 # Scheduling Class Modules (/kernel/sched):
531 SCHED_KMODS += IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL SDC
534 # File System Modules (/kernel/fs):
536 FS_KMODS += autofs ctfs dcfs dev devfs fdfs fifofs hsfs lofs
537 FS_KMODS += mntfs namefs nfs objfs zfs zut
538 FS_KMODS += pcfs procfs sockfs specfs tmpfs udfs ufs sharefs
539 FS_KMODS += smbfs bootfs
542 # Streams Modules (/kernel/strmod):
544 STRMOD_KMODS += bufmod connld dedump ldterm pckt pfmod pipemod
545 STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod
546 STRMOD_KMODS += spppasyn spppcomp
547 STRMOD_KMODS += tirdwr ttcompat
548 STRMOD_KMODS += usbkbm
549 STRMOD_KMODS += usbms
550 STRMOD_KMODS += usbwcm
551 STRMOD_KMODS += usb_ah
552 STRMOD_KMODS += drcompat
553 STRMOD_KMODS += cryptmod
554 STRMOD_KMODS += vuid2ps2
555 STRMOD_KMODS += vuid3ps2
556 STRMOD_KMODS += vuidm3p
557 STRMOD_KMODS += vuidm4p
558 STRMOD_KMODS += vuidm5p
561 # 'System' Modules (/kernel/sys):
565 SYS_KMODS += exacctsys
566 SYS_KMODS += inst_sync
578 # 'Misc' Modules (/kernel/misc)
579 # MISC_KMODS are built both 32-bit and 64-bit
580 # MISC_KMODS_32 are built only 32-bit
581 # MISC_KMODS_64 are built only 64-bit
585 MISC_KMODS += agpmaster
587 MISC_KMODS += bootdev
590 MISC_KMODS += consconfig
596 MISC_KMODS += fssnap_if
599 MISC_KMODS += hidparser
609 MISC_KMODS += iommulib
611 MISC_KMODS += kbtrans
613 MISC_KMODS += kgssapi
614 MISC_KMODS += kmech_dummy
615 MISC_KMODS += kmech_krb5
616 MISC_KMODS += ksocket
620 MISC_KMODS += net80211
621 MISC_KMODS += nfs_dlboot
624 MISC_KMODS += pci_autoconfig
629 MISC_KMODS += rpcsec_gss
634 MISC_KMODS += sol_ofs
636 MISC_KMODS += strategy
637 MISC_KMODS += strplumb
640 MISC_KMODS += usba usba10 usbs49_fw
641 MISC_KMODS += scsi_vhci_f_sym_hds
642 MISC_KMODS += scsi_vhci_f_sym
643 MISC_KMODS += scsi_vhci_f_tpgs
644 MISC_KMODS += scsi_vhci_f_asym_sun
645 MISC_KMODS += scsi_vhci_f_tape
646 MISC_KMODS += scsi_vhci_f_tpgs_tape
648 MISC_KMODS += emlxs_fw
649 MISC_KMODS += qlc_fw_2200
650 MISC_KMODS += qlc_fw_2300
651 MISC_KMODS += qlc_fw_2400
652 MISC_KMODS += qlc_fw_2500
653 MISC_KMODS += qlc_fw_6322
654 MISC_KMODS += qlc_fw_8100
657 MISC_KMODS += klmmod klmops
660 # Software Cryptographic Providers (/kernel/crypto):
663 CRYPTO_KMODS += arcfour
664 CRYPTO_KMODS += blowfish
667 CRYPTO_KMODS += edonr
673 CRYPTO_KMODS += skein
674 CRYPTO_KMODS += swrand
677 # IP Policy Modules (/kernel/ipp)
680 IPP_KMODS += flowacct
684 IPP_KMODS += tswtclmt
687 # generic-unix module (/kernel/genunix):
689 GENUNIX_KMODS += genunix
692 # Modules eXcluded from the product:
696 # 'Dacf' Modules (/kernel/dacf):
700 # Performance Counter BackEnd modules (/usr/kernel/pcbe)
702 PCBE_KMODS += p123_pcbe p4_pcbe opteron_pcbe core_pcbe
705 # MAC-Type Plugin Modules (/kernel/mac)
707 MAC_KMODS += mac_6to4
708 MAC_KMODS += mac_ether
709 MAC_KMODS += mac_ipv4
710 MAC_KMODS += mac_ipv6
711 MAC_KMODS += mac_wifi
715 # socketmod (kernel/socketmod)
717 SOCKET_KMODS += sockpfp
718 SOCKET_KMODS += socksctp
719 SOCKET_KMODS += socksdp
720 SOCKET_KMODS += sockrds
721 SOCKET_KMODS += ksslf
724 # kiconv modules (/kernel/kiconv):
726 KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc
729 # 'Dacf' Modules (/kernel/dacf):
731 DACF_KMODS += net_dacf
734 # Ensure that the variable member of the cpu_t (cpu_m) is defined
735 # for the lint builds so as not to cause lint errors during the
736 # global cross check.
738 LINTFLAGS += -D_MACHDEP -I$(UTSBASE)/i86pc