1 # 2 # CDDL HEADER START 3 # 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. 7 # 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. 12 # 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] 18 # 19 # CDDL HEADER END 20 # 21 22 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 23 # Copyright (c) 2013 Andrew Stormont. All rights reserved. 24 25 26 # 27 # This makefile contains the common definitions for all sparc 28 # implementation architecture independent modules. 29 # 30 31 # 32 # Define supported builds 33 # 34 DEF_BUILDS = $(DEF_BUILDS64) 35 ALL_BUILDS = $(ALL_BUILDS64) 36 37 # 38 # Everybody needs to know how to build modstubs.o and to locate unix.o. 39 # Note that unix.o must currently be selected from among the possible 40 # "implementation architectures". Note further, that unix.o is only 41 # used as an optional error check for undefines so (theoretically) 42 # any "implementation architectures" could be used. We choose sun4u 43 # because it is the reference port. 44 # 45 UNIX_DIR = $(UTSBASE)/sun4u/unix 46 GENLIB_DIR = $(UTSBASE)/sun4u/genunix 47 IPDRV_DIR = $(UTSBASE)/sparc/ip 48 MODSTUBS_DIR = $(UNIX_DIR) 49 DSF_DIR = $(UNIX_DIR) 50 LINTS_DIR = $(OBJS_DIR) 51 LINT_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR) 52 53 UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o 54 MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o 55 GENLIB = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so 56 57 LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 58 GEN_LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 59 60 LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 61 GEN_LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 62 63 LINT_LIB = $(LINT_LIB_$(CLASS)) 64 GEN_LINT_LIB = $(GEN_LINT_LIB_$(CLASS)) 65 66 LINT32_DIRS = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 67 LINT32_FILES = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln) 68 69 LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 70 LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln) 71 72 # 73 # Include the makefiles which define build rule templates, the 74 # collection of files per module, and a few specific flags. Note 75 # that order is significant, just as with an include path. The 76 # first build rule template which matches the files name will be 77 # used. By including these in order from most machine dependent 78 # to most machine independent, we allow a machine dependent file 79 # to be used in preference over a machine independent version 80 # (Such as a machine specific optimization, which preserves the 81 # interfaces.) 82 # 83 include $(UTSBASE)/sparc/Makefile.files 84 include $(UTSBASE)/sparc/v9/Makefile.files 85 include $(UTSTREE)/sun/Makefile.files 86 include $(UTSTREE)/common/Makefile.files 87 88 # 89 # ----- TRANSITIONAL SECTION -------------------------------------------------- 90 # 91 92 # 93 # Not everything which *should* be a module is a module yet. The 94 # following is a list of such objects which are currently part of 95 # genunix but which might someday become kmods. This must be 96 # defined before we include Makefile.uts, or else genunix's build 97 # won't be as parallel as we might like. 98 # 99 NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(VCONS_CONF_OBJS) $(MOD_OBJS) 100 101 # 102 # ----- END OF TRANSITIONAL SECTION ------------------------------------------- 103 # 104 # Include machine independent rules. Note that this does not imply 105 # that the resulting module from rules in Makefile.uts is machine 106 # independent. Only that the build rules are machine independent. 107 # 108 include $(UTSBASE)/Makefile.uts 109 110 # 111 # machine specific optimization, override default in Makefile.master 112 # 113 XARCH_32 = -xarch=v8 114 XARCH_64 = -m64 115 XARCH = $(XARCH_$(CLASS)) 116 117 COPTIMIZE_32 = -xO3 118 COPTIMIZE_64 = -xO3 119 COPTIMIZE = $(COPTIMIZE_$(CLASS)) 120 121 CCMODE = -Xa 122 123 CFLAGS_32 = -xcg92 124 CFLAGS_64 = -xchip=ultra $(CCABS32) $(CCREGSYM) 125 CFLAGS = $(CFLAGS_$(CLASS)) 126 127 CFLAGS += $(XARCH) 128 CFLAGS += $(COPTIMIZE) 129 CFLAGS += $(EXTRA_CFLAGS) 130 CFLAGS += $(XAOPT) 131 CFLAGS += $(INLINES) -D_ASM_INLINES 132 CFLAGS += $(CCMODE) 133 CFLAGS += $(SPACEFLAG) 134 CFLAGS += $(CERRWARN) 135 CFLAGS += $(CTF_FLAGS_$(CLASS)) 136 CFLAGS += $(C99MODE) 137 CFLAGS += $(CCUNBOUND) 138 CFLAGS += $(CCSTATICSYM) 139 CFLAGS += $(CC32BITCALLERS) 140 CFLAGS += $(CCNOAUTOINLINE) 141 CFLAGS += $(IROPTFLAG) 142 CFLAGS += $(CGLOBALSTATIC) 143 CFLAGS += -xregs=no%float 144 CFLAGS += -xstrconst 145 CFLAGS += $(CSOURCEDEBUGFLAGS) 146 CFLAGS += $(CUSERFLAGS) 147 148 ASFLAGS += $(XARCH) 149 150 LINT_DEFS_32 = 151 LINT_DEFS_64 = -m64 152 LINT_DEFS += $(LINT_DEFS_$(CLASS)) 153 154 # 155 # The following must be defined for all implementations: 156 # 157 # MODSTUBS: Module stubs source file. 158 # 159 MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s 160 161 # 162 # Define the actual specific platforms - obviously none. 163 # 164 MACHINE_DEFS = 165 166 # 167 # Debugging level 168 # 169 # Special knowledge of which special debugging options effect which 170 # file is used to optimize the build if these flags are changed. 171 # 172 # XXX: The above could possibly be done for more flags and files, but 173 # is left as an experiment to the interested reader. Be forewarned, 174 # that excessive use could lead to maintenance difficulties. 175 # 176 DEBUG_DEFS_OBJ32 = 177 DEBUG_DEFS_DBG32 = -DDEBUG 178 DEBUG_DEFS_OBJ64 = 179 DEBUG_DEFS_DBG64 = -DDEBUG 180 DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE)) 181 182 DEBUG_COND_OBJ32 = $(POUND_SIGN) 183 DEBUG_COND_DBG32 = 184 DEBUG_COND_OBJ64 = $(POUND_SIGN) 185 DEBUG_COND_DBG64 = 186 IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/ 187 188 $(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE 189 $(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1 190 191 # Comment these out if you don't want dispatcher lock statistics. 192 193 # $(IF_DEBUG_OBJ)disp_lock.o := DEBUG_DEFS += -DDISP_LOCK_STATS 194 195 # 196 # Collect the preprocessor definitions to be associated with *all* 197 # files. 198 # 199 ALL_DEFS = $(MACHINE_DEFS) $(DEBUG_DEFS) $(OPTION_DEFS) 200 # 201 # 202 # The kernels modules which are "implementation architecture" 203 # specific for this machine are enumerated below. Note that most 204 # of these modules must exist (in one form or another) for each 205 # architecture. 206 # 207 # Common Drivers (usually pseudo drivers) (/kernel/drv): 208 # 209 DRV_KMODS += aggr arp audio bl blkdev bofi clone cn conskbd consms cpuid 210 DRV_KMODS += crypto cryptoadm devinfo dump 211 DRV_KMODS += dtrace fasttrap fbt lockstat profile sdt systrace dcpc 212 DRV_KMODS += fssnap icmp icmp6 ip ip6 ipnet ipsecah 213 DRV_KMODS += ipsecesp iptun iwscn keysock kmdb kstat ksyms llc1 214 DRV_KMODS += lofi 215 DRV_KMODS += log logindmux kssl mm nca physmem pm poll pool 216 DRV_KMODS += pseudo ptc ptm pts ptsl ramdisk random rsm rts sad 217 DRV_KMODS += simnet softmac sppp sppptun sy sysevent sysmsg 218 DRV_KMODS += spdsock 219 DRV_KMODS += tcp tcp6 tl tnf ttymux udp udp6 wc winlock zcons 220 DRV_KMODS += ippctl 221 DRV_KMODS += dld 222 DRV_KMODS += ipf 223 DRV_KMODS += rpcib 224 DRV_KMODS += dlpistub 225 DRV_KMODS += vnic 226 DRV_KMODS += xge 227 DRV_KMODS += rds 228 DRV_KMODS += rdsv3 229 DRV_KMODS += chxge 230 DRV_KMODS += smbsrv 231 DRV_KMODS += vscan 232 DRV_KMODS += nsmb 233 DRV_KMODS += fm 234 DRV_KMODS += nulldriver 235 DRV_KMODS += bridge trill 236 DRV_KMODS += bpf 237 DRV_KMODS += dca 238 239 $(CLOSED_BUILD)CLOSED_DRV_KMODS += glm 240 $(CLOSED_BUILD)CLOSED_DRV_KMODS += isp 241 $(CLOSED_BUILD)CLOSED_DRV_KMODS += mpt 242 $(CLOSED_BUILD)CLOSED_DRV_KMODS += qus 243 $(CLOSED_BUILD)CLOSED_DRV_KMODS += se 244 245 # 246 # Hardware Drivers in common space 247 # 248 249 DRV_KMODS += afe 250 DRV_KMODS += audio1575 251 DRV_KMODS += audioens 252 DRV_KMODS += audiols 253 DRV_KMODS += audiop16x 254 DRV_KMODS += audiopci 255 DRV_KMODS += audiots 256 DRV_KMODS += e1000g 257 DRV_KMODS += efe 258 DRV_KMODS += hxge 259 DRV_KMODS += mxfe 260 DRV_KMODS += pcan 261 DRV_KMODS += pcwl 262 DRV_KMODS += rge 263 DRV_KMODS += rtls 264 DRV_KMODS += sfe 265 DRV_KMODS += aac 266 DRV_KMODS += igb 267 DRV_KMODS += ixgbe 268 DRV_KMODS += vr 269 DRV_KMODS += mr_sas 270 $(CLOSED_BUILD)CLOSED_DRV_KMODS += ixgb 271 DRV_KMODS += yge 272 273 # 274 # Machine Specific Driver Modules (/kernel/drv): 275 # 276 DRV_KMODS += audiocs 277 DRV_KMODS += bge dmfe eri fas hme qfe 278 DRV_KMODS += openeepr options sd ses st 279 DRV_KMODS += ssd 280 DRV_KMODS += ecpp 281 DRV_KMODS += hid hubd ehci ohci uhci usb_mid usb_ia scsa2usb usbprn ugen 282 DRV_KMODS += usbser usbsacm usbsksp usbsprl 283 DRV_KMODS += usb_as usb_ac 284 DRV_KMODS += usbskel 285 DRV_KMODS += usbvc 286 DRV_KMODS += usbftdi 287 DRV_KMODS += wusb_df hwahc hwarc wusb_ca 288 DRV_KMODS += usbecm 289 DRV_KMODS += hci1394 av1394 scsa1394 dcam1394 290 DRV_KMODS += sbp2 291 DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs 292 DRV_KMODS += sol_umad 293 DRV_KMODS += pci_pci pcieb pcieb_bcm 294 DRV_KMODS += i8042 kb8042 mouse8042 295 DRV_KMODS += fcode 296 DRV_KMODS += mpt_sas 297 DRV_KMODS += socal 298 DRV_KMODS += sgen 299 DRV_KMODS += myri10ge 300 DRV_KMODS += smp 301 DRV_KMODS += dad 302 DRV_KMODS += scsi_vhci 303 DRV_KMODS += fcp 304 DRV_KMODS += fcip 305 DRV_KMODS += fcsm 306 DRV_KMODS += fp 307 DRV_KMODS += qlc 308 DRV_KMODS += qlge 309 DRV_KMODS += stmf 310 DRV_KMODS += stmf_sbd 311 DRV_KMODS += fct 312 DRV_KMODS += fcoe 313 DRV_KMODS += fcoet 314 DRV_KMODS += fcoei 315 DRV_KMODS += qlt 316 DRV_KMODS += iscsit 317 DRV_KMODS += pppt 318 DRV_KMODS += ncall nsctl sdbc nskern sv 319 DRV_KMODS += ii rdc rdcsrv rdcstub 320 DRV_KMODS += iscsi 321 DRV_KMODS += emlxs 322 DRV_KMODS += oce 323 DRV_KMODS += srpt 324 DRV_KMODS += pmcs 325 DRV_KMODS += pmcs8001fw 326 327 $(CLOSED_BUILD)CLOSED_DRV_KMODS += ifp 328 $(CLOSED_BUILD)CLOSED_DRV_KMODS += uata 329 $(CLOSED_BUILD)CLOSED_DRV_KMODS += usbser_edge 330 331 # 332 # I/O framework test drivers 333 # 334 DRV_KMODS += pshot 335 DRV_KMODS += gen_drv 336 DRV_KMODS += tvhci tphci tclient 337 DRV_KMODS += emul64 338 339 # 340 # PCMCIA specific module(s) 341 # 342 DRV_KMODS += pcs 343 MISC_KMODS += busra cardbus dada pcmcia 344 DRV_KMODS += pcata 345 DRV_KMODS += pcic 346 347 $(CLOSED_BUILD)CLOSED_DRV_KMODS += pcser 348 349 # Add lvm 350 # 351 DRV_KMODS += md 352 MISC_KMODS += md_mirror md_stripe md_hotspares md_raid md_trans md_notify 353 MISC_KMODS += md_sp 354 355 # 356 # Exec Class Modules (/kernel/exec): 357 # 358 EXEC_KMODS += aoutexec elfexec intpexec shbinexec javaexec 359 360 # 361 # Scheduling Class Modules (/kernel/sched): 362 # 363 SCHED_KMODS += RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL SDC 364 365 # 366 # File System Modules (/kernel/fs): 367 # 368 FS_KMODS += dev devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs 369 FS_KMODS += zut specfs udfs ufs autofs cachefs procfs sockfs mntfs 370 FS_KMODS += ctfs objfs sharefs dcfs smbfs 371 372 # 373 # Streams Modules (/kernel/strmod): 374 # 375 STRMOD_KMODS += bufmod connld dedump ldterm ms pckt pfmod 376 STRMOD_KMODS += pipemod ptem redirmod rpcmod rlmod telmod timod 377 STRMOD_KMODS += spppasyn spppcomp 378 STRMOD_KMODS += tirdwr ttcompat 379 STRMOD_KMODS += usbkbm usbms usbwcm usb_ah 380 STRMOD_KMODS += drcompat 381 STRMOD_KMODS += cryptmod 382 STRMOD_KMODS += vuid3ps2 383 384 # 385 # 'System' Modules (/kernel/sys): 386 # 387 SYS_KMODS += c2audit 388 SYS_KMODS += exacctsys 389 SYS_KMODS += inst_sync kaio msgsys semsys shmsys sysacct pipe 390 SYS_KMODS += doorfs pset acctctl portfs 391 392 # 393 # 'User' Modules (/kernel/misc): 394 # 395 MISC_KMODS += ac97 396 MISC_KMODS += bignum 397 MISC_KMODS += consconfig gld ipc nfs_dlboot nfssrv scsi 398 MISC_KMODS += strplumb swapgeneric tlimod 399 MISC_KMODS += rpcsec rpcsec_gss kgssapi kmech_dummy 400 MISC_KMODS += kmech_krb5 401 MISC_KMODS += fssnap_if 402 MISC_KMODS += hidparser kbtrans usba usba10 usbs49_fw 403 MISC_KMODS += s1394 404 MISC_KMODS += hpcsvc pcihp 405 MISC_KMODS += rsmops 406 MISC_KMODS += kcf 407 MISC_KMODS += ksocket 408 MISC_KMODS += ibcm 409 MISC_KMODS += ibdm 410 MISC_KMODS += ibdma 411 MISC_KMODS += ibmf 412 MISC_KMODS += ibtl 413 MISC_KMODS += sol_ofs 414 MISC_KMODS += idm 415 MISC_KMODS += idmap 416 MISC_KMODS += hook 417 MISC_KMODS += neti 418 MISC_KMODS += ctf 419 MISC_KMODS += mac dls 420 MISC_KMODS += cmlb 421 MISC_KMODS += tem 422 MISC_KMODS += pcicfg fcodem fcpci 423 MISC_KMODS += scsi_vhci_f_sym scsi_vhci_f_tpgs scsi_vhci_f_asym_sun 424 MISC_KMODS += scsi_vhci_f_sym_hds 425 MISC_KMODS += scsi_vhci_f_tape scsi_vhci_f_tpgs_tape 426 MISC_KMODS += fctl 427 MISC_KMODS += emlxs_fw 428 MISC_KMODS += qlc_fw_2200 429 MISC_KMODS += qlc_fw_2300 430 MISC_KMODS += qlc_fw_2400 431 MISC_KMODS += qlc_fw_2500 432 MISC_KMODS += qlc_fw_6322 433 MISC_KMODS += qlc_fw_8100 434 MISC_KMODS += spuni 435 MISC_KMODS += hwa1480_fw uwba 436 MISC_KMODS += mii 437 438 MISC_KMODS += klmmod klmops 439 440 $(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_lsi 441 $(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_emc 442 $(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_sym_emc 443 444 # 445 # Software Cryptographic Providers (/kernel/crypto): 446 # 447 CRYPTO_KMODS += aes 448 CRYPTO_KMODS += arcfour 449 CRYPTO_KMODS += blowfish 450 CRYPTO_KMODS += des 451 CRYPTO_KMODS += ecc 452 CRYPTO_KMODS += edonr 453 CRYPTO_KMODS += md4 454 CRYPTO_KMODS += md5 455 CRYPTO_KMODS += rsa 456 CRYPTO_KMODS += sha1 457 CRYPTO_KMODS += sha2 458 CRYPTO_KMODS += skein 459 CRYPTO_KMODS += swrand 460 461 # 462 # IP Policy Modules (/kernel/ipp): 463 # 464 IPP_KMODS += dlcosmk 465 IPP_KMODS += flowacct 466 IPP_KMODS += ipgpc 467 IPP_KMODS += dscpmk 468 IPP_KMODS += tokenmt 469 IPP_KMODS += tswtclmt 470 471 # 472 # 'Dacf' modules (/kernel/dacf) 473 DACF_KMODS += consconfig_dacf 474 475 # 476 # SVVS Testing Modules (/kernel/strmod): 477 # 478 # These are streams and driver modules which are not to be 479 # delivered with a released system. However, during development 480 # it is convenient to build and install the SVVS kernel modules. 481 # 482 SVVS_KMODS += lmodb lmode lmodr lmodt svvslo tidg tivc tmux 483 484 $(CLOSED_BUILD)SVVS += svvs 485 486 # 487 # Modules eXcluded from the product: 488 # 489 XMODS += 490 $(CLOSED_BUILD)CLOSED_XMODS = \ 491 sdpib \ 492 wsdrv 493 494 # 495 # 'Dacf' Modules (/kernel/dacf): 496 # 497 DACF_KMODS += net_dacf 498 499 # 500 # MAC-Type Plugin Modules (/kernel/mac) 501 # 502 MAC_KMODS += mac_6to4 503 MAC_KMODS += mac_ether 504 MAC_KMODS += mac_ipv4 505 MAC_KMODS += mac_ipv6 506 MAC_KMODS += mac_wifi 507 MAC_KMODS += mac_ib 508 509 # 510 # socketmod (kernel/socketmod) 511 # 512 SOCKET_KMODS += sockpfp 513 SOCKET_KMODS += socksctp 514 SOCKET_KMODS += socksdp 515 SOCKET_KMODS += sockrds 516 SOCKET_KMODS += ksslf 517 518 # 519 # kiconv modules (/kernel/kiconv): 520 # 521 KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc