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 (c) 2015, Joyent, Inc. All rights reserved.
25 # Copyright 2016 Garrett D'Amore <garrett@damore.org>
26 # Copyright 2016 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
215 DRV_KMODS_32 += audiovia97
227 DRV_KMODS += myri10ge
237 DRV_KMODS += cryptoadm
241 DRV_KMODS += dlpistub
256 DRV_KMODS += intel_nb5000
257 DRV_KMODS += intel_nhm
265 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
370 DRV_KMODS += stmf_sbd
378 DRV_KMODS += ncall nsctl sdbc nskern sv
379 DRV_KMODS += ii rdc rdcsrv rdcstub
381 DRV_KMODS += vmxnet3s
385 # Common code drivers
404 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
497 MISC_KMODS += s1394 sbp2
498 DRV_KMODS += hci1394 scsa1394
500 DRV_KMODS += dcam1394
503 # InfiniBand pseudo drivers
505 DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs
506 DRV_KMODS += sol_umad
512 MISC_KMODS += md_stripe md_hotspares md_mirror md_raid md_trans md_notify
518 BRAND_KMODS += sn1_brand s10_brand
521 # Exec Class Modules (/kernel/exec):
523 EXEC_KMODS += elfexec intpexec shbinexec javaexec
526 # Scheduling Class Modules (/kernel/sched):
528 SCHED_KMODS += IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL SDC
531 # File System Modules (/kernel/fs):
533 FS_KMODS += autofs ctfs dcfs dev devfs fdfs fifofs hsfs lofs
534 FS_KMODS += mntfs namefs nfs objfs zfs zut
535 FS_KMODS += pcfs procfs sockfs specfs tmpfs udfs ufs sharefs
536 FS_KMODS += smbfs bootfs
539 # Streams Modules (/kernel/strmod):
541 STRMOD_KMODS += bufmod connld dedump ldterm pckt pfmod pipemod
542 STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod
543 STRMOD_KMODS += spppasyn spppcomp
544 STRMOD_KMODS += tirdwr ttcompat
545 STRMOD_KMODS += usbkbm
546 STRMOD_KMODS += usbms
547 STRMOD_KMODS += usbwcm
548 STRMOD_KMODS += usb_ah
549 STRMOD_KMODS += drcompat
550 STRMOD_KMODS += cryptmod
551 STRMOD_KMODS += vuid2ps2
552 STRMOD_KMODS += vuid3ps2
553 STRMOD_KMODS += vuidm3p
554 STRMOD_KMODS += vuidm4p
555 STRMOD_KMODS += vuidm5p
558 # 'System' Modules (/kernel/sys):
562 SYS_KMODS += exacctsys
563 SYS_KMODS += inst_sync
575 # 'Misc' Modules (/kernel/misc)
576 # MISC_KMODS are built both 32-bit and 64-bit
577 # MISC_KMODS_32 are built only 32-bit
578 # MISC_KMODS_64 are built only 64-bit
582 MISC_KMODS += agpmaster
584 MISC_KMODS += bootdev
587 MISC_KMODS += consconfig
593 MISC_KMODS += fssnap_if
596 MISC_KMODS += hidparser
606 MISC_KMODS += iommulib
608 MISC_KMODS += kbtrans
610 MISC_KMODS += kgssapi
611 MISC_KMODS += kmech_dummy
612 MISC_KMODS += kmech_krb5
613 MISC_KMODS += ksocket
617 MISC_KMODS += net80211
618 MISC_KMODS += nfs_dlboot
621 MISC_KMODS += pci_autoconfig
626 MISC_KMODS += rpcsec_gss
631 MISC_KMODS += sol_ofs
633 MISC_KMODS += strategy
634 MISC_KMODS += strplumb
637 MISC_KMODS += usba usba10 usbs49_fw
638 MISC_KMODS += scsi_vhci_f_sym_hds
639 MISC_KMODS += scsi_vhci_f_sym
640 MISC_KMODS += scsi_vhci_f_tpgs
641 MISC_KMODS += scsi_vhci_f_asym_sun
642 MISC_KMODS += scsi_vhci_f_tape
643 MISC_KMODS += scsi_vhci_f_tpgs_tape
645 MISC_KMODS += emlxs_fw
646 MISC_KMODS += qlc_fw_2200
647 MISC_KMODS += qlc_fw_2300
648 MISC_KMODS += qlc_fw_2400
649 MISC_KMODS += qlc_fw_2500
650 MISC_KMODS += qlc_fw_6322
651 MISC_KMODS += qlc_fw_8100
654 MISC_KMODS += klmmod klmops
657 # Software Cryptographic Providers (/kernel/crypto):
660 CRYPTO_KMODS += arcfour
661 CRYPTO_KMODS += blowfish
664 CRYPTO_KMODS += edonr
670 CRYPTO_KMODS += skein
671 CRYPTO_KMODS += swrand
674 # IP Policy Modules (/kernel/ipp)
677 IPP_KMODS += flowacct
681 IPP_KMODS += tswtclmt
684 # generic-unix module (/kernel/genunix):
686 GENUNIX_KMODS += genunix
689 # Modules eXcluded from the product:
693 # 'Dacf' Modules (/kernel/dacf):
697 # Performance Counter BackEnd modules (/usr/kernel/pcbe)
699 PCBE_KMODS += p123_pcbe p4_pcbe opteron_pcbe core_pcbe
702 # MAC-Type Plugin Modules (/kernel/mac)
704 MAC_KMODS += mac_6to4
705 MAC_KMODS += mac_ether
706 MAC_KMODS += mac_ipv4
707 MAC_KMODS += mac_ipv6
708 MAC_KMODS += mac_wifi
712 # socketmod (kernel/socketmod)
714 SOCKET_KMODS += sockpfp
715 SOCKET_KMODS += socksctp
716 SOCKET_KMODS += socksdp
717 SOCKET_KMODS += sockrds
718 SOCKET_KMODS += ksslf
721 # kiconv modules (/kernel/kiconv):
723 KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc
726 # 'Dacf' Modules (/kernel/dacf):
728 DACF_KMODS += net_dacf
731 # Ensure that the variable member of the cpu_t (cpu_m) is defined
732 # for the lint builds so as not to cause lint errors during the
733 # global cross check.
735 LINTFLAGS += -D_MACHDEP -I$(UTSBASE)/i86pc