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.
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.
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]
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 2015 Nexenta Systems, Inc. All rights reserved.
29 # This makefile contains the common definitions for all sparc
30 # implementation architecture independent modules.
34 # Define supported builds
36 DEF_BUILDS = $(DEF_BUILDS64)
37 ALL_BUILDS = $(ALL_BUILDS64)
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 sun4u
45 # because it is the reference port.
47 UNIX_DIR = $(UTSBASE)/sun4u/unix
48 GENLIB_DIR = $(UTSBASE)/sun4u/genunix
49 IPDRV_DIR = $(UTSBASE)/sparc/ip
50 MODSTUBS_DIR = $(UNIX_DIR)
52 LINTS_DIR = $(OBJS_DIR)
53 LINT_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
55 UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
56 MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
57 GENLIB = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so
59 LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
60 GEN_LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
62 LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
63 GEN_LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
65 LINT_LIB = $(LINT_LIB_$(CLASS))
66 GEN_LINT_LIB = $(GEN_LINT_LIB_$(CLASS))
68 LINT32_DIRS = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
69 LINT32_FILES = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln)
71 LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
72 LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
75 # Include the makefiles which define build rule templates, the
76 # collection of files per module, and a few specific flags. Note
77 # that order is significant, just as with an include path. The
78 # first build rule template which matches the files name will be
79 # used. By including these in order from most machine dependent
80 # to most machine independent, we allow a machine dependent file
81 # to be used in preference over a machine independent version
82 # (Such as a machine specific optimization, which preserves the
85 include $(UTSBASE)/sparc/Makefile.files
86 include $(UTSBASE)/sparc/v9/Makefile.files
87 include $(UTSBASE)/sun/Makefile.files
88 include $(UTSBASE)/common/Makefile.files
91 # ----- TRANSITIONAL SECTION --------------------------------------------------
95 # Not everything which *should* be a module is a module yet. The
96 # following is a list of such objects which are currently part of
97 # genunix but which might someday become kmods. This must be
98 # defined before we include Makefile.uts, or else genunix's build
99 # won't be as parallel as we might like.
101 NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS)
104 # ----- END OF TRANSITIONAL SECTION -------------------------------------------
106 # Include machine independent rules. Note that this does not imply
107 # that the resulting module from rules in Makefile.uts is machine
108 # independent. Only that the build rules are machine independent.
110 include $(UTSBASE)/Makefile.uts
113 # machine specific optimization, override default in Makefile.master
117 XARCH = $(XARCH_$(CLASS))
121 COPTIMIZE = $(COPTIMIZE_$(CLASS))
126 CFLAGS_64 = -xchip=ultra $(CCABS32) $(CCREGSYM)
127 CFLAGS = $(CFLAGS_$(CLASS))
130 CFLAGS += $(COPTIMIZE)
131 CFLAGS += $(EXTRA_CFLAGS)
133 CFLAGS += $(INLINES) -D_ASM_INLINES
135 CFLAGS += $(SPACEFLAG)
136 CFLAGS += $(CERRWARN)
137 CFLAGS += $(CTF_FLAGS_$(CLASS))
139 CFLAGS += $(CCUNBOUND)
140 CFLAGS += $(CCSTATICSYM)
141 CFLAGS += $(CC32BITCALLERS)
142 CFLAGS += $(CCNOAUTOINLINE)
143 CFLAGS += $(IROPTFLAG)
144 CFLAGS += $(CGLOBALSTATIC)
145 CFLAGS += -xregs=no%float
147 CFLAGS += $(CSOURCEDEBUGFLAGS)
148 CFLAGS += $(CUSERFLAGS)
154 LINT_DEFS += $(LINT_DEFS_$(CLASS))
157 # The following must be defined for all implementations:
159 # MODSTUBS: Module stubs source file.
161 MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s
164 # Define the actual specific platforms - obviously none.
171 # Special knowledge of which special debugging options effect which
172 # file is used to optimize the build if these flags are changed.
174 # XXX: The above could possibly be done for more flags and files, but
175 # is left as an experiment to the interested reader. Be forewarned,
176 # that excessive use could lead to maintenance difficulties.
179 DEBUG_DEFS_DBG32 = -DDEBUG
181 DEBUG_DEFS_DBG64 = -DDEBUG
182 DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
184 DEBUG_COND_OBJ32 = $(POUND_SIGN)
186 DEBUG_COND_OBJ64 = $(POUND_SIGN)
188 IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
190 $(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
191 $(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
193 # Comment these out if you don't want dispatcher lock statistics.
195 # $(IF_DEBUG_OBJ)disp_lock.o := DEBUG_DEFS += -DDISP_LOCK_STATS
198 # Collect the preprocessor definitions to be associated with *all*
201 ALL_DEFS = $(MACHINE_DEFS) $(DEBUG_DEFS) $(OPTION_DEFS)
204 # The kernels modules which are "implementation architecture"
205 # specific for this machine are enumerated below. Note that most
206 # of these modules must exist (in one form or another) for each
209 # Common Drivers (usually pseudo drivers) (/kernel/drv):
211 DRV_KMODS += aggr arp audio bl blkdev bofi clone cn conskbd consms cpuid
212 DRV_KMODS += crypto cryptoadm devinfo dump
213 DRV_KMODS += dtrace fasttrap fbt lockstat profile sdt systrace dcpc
214 DRV_KMODS += fssnap icmp icmp6 ip ip6 ipnet ipsecah
215 DRV_KMODS += ipsecesp iptun iwscn keysock kmdb kstat ksyms llc1
217 DRV_KMODS += log logindmux kssl mm nca physmem pm poll pool
218 DRV_KMODS += pseudo ptc ptm pts ptsl ramdisk random rsm rts sad
219 DRV_KMODS += simnet softmac sppp sppptun sy sysevent sysmsg
221 DRV_KMODS += tcp tcp6 tl tnf ttymux udp udp6 wc winlock zcons
227 DRV_KMODS += dlpistub
237 DRV_KMODS += nulldriver
238 DRV_KMODS += bridge trill
242 DRV_KMODS += signalfd
245 # Hardware Drivers in common space
249 DRV_KMODS += audio1575
250 DRV_KMODS += audioens
252 DRV_KMODS += audiop16x
253 DRV_KMODS += audiopci
271 # Machine Specific Driver Modules (/kernel/drv):
274 DRV_KMODS += bge dmfe eri fas hme qfe
275 DRV_KMODS += openeepr options sd ses st
278 DRV_KMODS += hid hubd ehci ohci uhci usb_mid usb_ia scsa2usb usbprn ugen
279 DRV_KMODS += usbser usbsacm usbsksp usbsprl
280 DRV_KMODS += usb_as usb_ac
285 DRV_KMODS += hci1394 av1394 scsa1394 dcam1394
287 DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs
288 DRV_KMODS += sol_umad
289 DRV_KMODS += pci_pci pcieb pcieb_bcm
290 DRV_KMODS += i8042 kb8042 mouse8042
295 DRV_KMODS += myri10ge
298 DRV_KMODS += scsi_vhci
306 DRV_KMODS += stmf_sbd
314 DRV_KMODS += ncall nsctl sdbc nskern sv
315 DRV_KMODS += ii rdc rdcsrv rdcstub
321 DRV_KMODS += pmcs8001fw
324 # I/O framework test drivers
328 DRV_KMODS += tvhci tphci tclient
332 # PCMCIA specific module(s)
335 MISC_KMODS += busra cardbus dada pcmcia
341 MISC_KMODS += md_mirror md_stripe md_hotspares md_raid md_trans md_notify
345 # Exec Class Modules (/kernel/exec):
347 EXEC_KMODS += aoutexec elfexec intpexec shbinexec javaexec
350 # Scheduling Class Modules (/kernel/sched):
352 SCHED_KMODS += RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL SDC
355 # File System Modules (/kernel/fs):
357 FS_KMODS += dev devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs
358 FS_KMODS += zut specfs udfs ufs autofs procfs sockfs mntfs
359 FS_KMODS += ctfs objfs sharefs dcfs smbfs bootfs
362 # Streams Modules (/kernel/strmod):
364 STRMOD_KMODS += bufmod connld dedump ldterm ms pckt pfmod
365 STRMOD_KMODS += pipemod ptem redirmod rpcmod rlmod telmod timod
366 STRMOD_KMODS += spppasyn spppcomp
367 STRMOD_KMODS += tirdwr ttcompat
368 STRMOD_KMODS += usbkbm usbms usbwcm usb_ah
369 STRMOD_KMODS += drcompat
370 STRMOD_KMODS += cryptmod
371 STRMOD_KMODS += vuid3ps2
374 # 'System' Modules (/kernel/sys):
377 SYS_KMODS += exacctsys
378 SYS_KMODS += inst_sync kaio msgsys semsys shmsys sysacct pipe
379 SYS_KMODS += doorfs pset acctctl portfs
382 # 'User' Modules (/kernel/misc):
386 MISC_KMODS += consconfig gld ipc nfs_dlboot nfssrv scsi
387 MISC_KMODS += strplumb swapgeneric tlimod
388 MISC_KMODS += rpcsec rpcsec_gss kgssapi kmech_dummy
389 MISC_KMODS += kmech_krb5
390 MISC_KMODS += fssnap_if
391 MISC_KMODS += hidparser kbtrans usba usba10 usbs49_fw
393 MISC_KMODS += hpcsvc pcihp
396 MISC_KMODS += ksocket
402 MISC_KMODS += sol_ofs
408 MISC_KMODS += mac dls
411 MISC_KMODS += pcicfg fcodem fcpci
412 MISC_KMODS += scsi_vhci_f_sym scsi_vhci_f_tpgs scsi_vhci_f_asym_sun
413 MISC_KMODS += scsi_vhci_f_sym_hds
414 MISC_KMODS += scsi_vhci_f_tape scsi_vhci_f_tpgs_tape
416 MISC_KMODS += emlxs_fw
417 MISC_KMODS += qlc_fw_2200
418 MISC_KMODS += qlc_fw_2300
419 MISC_KMODS += qlc_fw_2400
420 MISC_KMODS += qlc_fw_2500
421 MISC_KMODS += qlc_fw_6322
422 MISC_KMODS += qlc_fw_8100
426 MISC_KMODS += klmmod klmops
429 # Software Cryptographic Providers (/kernel/crypto):
432 CRYPTO_KMODS += arcfour
433 CRYPTO_KMODS += blowfish
436 CRYPTO_KMODS += edonr
442 CRYPTO_KMODS += skein
443 CRYPTO_KMODS += swrand
446 # IP Policy Modules (/kernel/ipp):
449 IPP_KMODS += flowacct
453 IPP_KMODS += tswtclmt
456 # 'Dacf' modules (/kernel/dacf)
457 DACF_KMODS += consconfig_dacf
460 # SVVS Testing Modules (/kernel/strmod):
462 # These are streams and driver modules which are not to be
463 # delivered with a released system. However, during development
464 # it is convenient to build and install the SVVS kernel modules.
466 SVVS_KMODS += lmodb lmode lmodr lmodt svvslo tidg tivc tmux
469 # Modules eXcluded from the product:
474 # 'Dacf' Modules (/kernel/dacf):
476 DACF_KMODS += net_dacf
479 # MAC-Type Plugin Modules (/kernel/mac)
481 MAC_KMODS += mac_6to4
482 MAC_KMODS += mac_ether
483 MAC_KMODS += mac_ipv4
484 MAC_KMODS += mac_ipv6
485 MAC_KMODS += mac_wifi
489 # socketmod (kernel/socketmod)
491 SOCKET_KMODS += sockpfp
492 SOCKET_KMODS += socksctp
493 SOCKET_KMODS += socksdp
494 SOCKET_KMODS += sockrds
495 SOCKET_KMODS += ksslf
498 # kiconv modules (/kernel/kiconv):
500 KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc
503 # Ensure that the variable member of the cpu_t (cpu_m) is defined
504 # for the lint builds so as not to cause lint errors during the
505 # global cross check.
507 $(LINTFLAGSUPPRESS)LINTFLAGS += -D_MACHDEP -I$(UTSBASE)/sun4 \
508 -I$(UTSBASE)/sun4u -I$(UTSBASE)/sfmmu