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# 34DEF_BUILDS = $(DEF_BUILDS64) 35ALL_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# 45UNIX_DIR = $(UTSBASE)/sun4u/unix 46GENLIB_DIR = $(UTSBASE)/sun4u/genunix 47IPDRV_DIR = $(UTSBASE)/sparc/ip 48MODSTUBS_DIR = $(UNIX_DIR) 49DSF_DIR = $(UNIX_DIR) 50LINTS_DIR = $(OBJS_DIR) 51LINT_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR) 52 53UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o 54MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o 55GENLIB = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so 56 57LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 58GEN_LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 59 60LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 61GEN_LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 62 63LINT_LIB = $(LINT_LIB_$(CLASS)) 64GEN_LINT_LIB = $(GEN_LINT_LIB_$(CLASS)) 65 66LINT32_DIRS = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 67LINT32_FILES = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln) 68 69LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 70LINT64_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# 83include $(UTSBASE)/sparc/Makefile.files 84include $(UTSBASE)/sparc/v9/Makefile.files 85include $(UTSBASE)/sun/Makefile.files 86include $(UTSBASE)/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# 99NOT_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# 108include $(UTSBASE)/Makefile.uts 109 110# 111# machine specific optimization, override default in Makefile.master 112# 113XARCH_32 = -xarch=v8 114XARCH_64 = -m64 115XARCH = $(XARCH_$(CLASS)) 116 117COPTIMIZE_32 = -xO3 118COPTIMIZE_64 = -xO3 119COPTIMIZE = $(COPTIMIZE_$(CLASS)) 120 121CCMODE = -Xa 122 123CFLAGS_32 = -xcg92 124CFLAGS_64 = -xchip=ultra $(CCABS32) $(CCREGSYM) 125CFLAGS = $(CFLAGS_$(CLASS)) 126 127CFLAGS += $(XARCH) 128CFLAGS += $(COPTIMIZE) 129CFLAGS += $(EXTRA_CFLAGS) 130CFLAGS += $(XAOPT) 131CFLAGS += $(INLINES) -D_ASM_INLINES 132CFLAGS += $(CCMODE) 133CFLAGS += $(SPACEFLAG) 134CFLAGS += $(CERRWARN) 135CFLAGS += $(CTF_FLAGS_$(CLASS)) 136CFLAGS += $(C99MODE) 137CFLAGS += $(CCUNBOUND) 138CFLAGS += $(CCSTATICSYM) 139CFLAGS += $(CC32BITCALLERS) 140CFLAGS += $(CCNOAUTOINLINE) 141CFLAGS += $(IROPTFLAG) 142CFLAGS += $(CGLOBALSTATIC) 143CFLAGS += -xregs=no%float 144CFLAGS += -xstrconst 145CFLAGS += $(CSOURCEDEBUGFLAGS) 146CFLAGS += $(CUSERFLAGS) 147 148ASFLAGS += $(XARCH) 149 150LINT_DEFS_32 = 151LINT_DEFS_64 = -m64 152LINT_DEFS += $(LINT_DEFS_$(CLASS)) 153 154# 155# The following must be defined for all implementations: 156# 157# MODSTUBS: Module stubs source file. 158# 159MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s 160 161# 162# Define the actual specific platforms - obviously none. 163# 164MACHINE_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# 176DEBUG_DEFS_OBJ32 = 177DEBUG_DEFS_DBG32 = -DDEBUG 178DEBUG_DEFS_OBJ64 = 179DEBUG_DEFS_DBG64 = -DDEBUG 180DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE)) 181 182DEBUG_COND_OBJ32 = $(POUND_SIGN) 183DEBUG_COND_DBG32 = 184DEBUG_COND_OBJ64 = $(POUND_SIGN) 185DEBUG_COND_DBG64 = 186IF_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# 199ALL_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# 209DRV_KMODS += aggr arp audio bl blkdev bofi clone cn conskbd consms cpuid 210DRV_KMODS += crypto cryptoadm devinfo dump 211DRV_KMODS += dtrace fasttrap fbt lockstat profile sdt systrace dcpc 212DRV_KMODS += fssnap icmp icmp6 ip ip6 ipnet ipsecah 213DRV_KMODS += ipsecesp iptun iwscn keysock kmdb kstat ksyms llc1 214DRV_KMODS += lofi 215DRV_KMODS += log logindmux kssl mm nca physmem pm poll pool 216DRV_KMODS += pseudo ptc ptm pts ptsl ramdisk random rsm rts sad 217DRV_KMODS += simnet softmac sppp sppptun sy sysevent sysmsg 218DRV_KMODS += spdsock 219DRV_KMODS += tcp tcp6 tl tnf ttymux udp udp6 wc winlock zcons 220DRV_KMODS += ippctl 221DRV_KMODS += dld 222DRV_KMODS += ipd 223DRV_KMODS += ipf 224DRV_KMODS += rpcib 225DRV_KMODS += dlpistub 226DRV_KMODS += vnic 227DRV_KMODS += xge 228DRV_KMODS += rds 229DRV_KMODS += rdsv3 230DRV_KMODS += chxge 231DRV_KMODS += smbsrv 232DRV_KMODS += vscan 233DRV_KMODS += nsmb 234DRV_KMODS += fm 235DRV_KMODS += nulldriver 236DRV_KMODS += bridge trill 237DRV_KMODS += bpf 238DRV_KMODS += dca 239 240# 241# Hardware Drivers in common space 242# 243 244DRV_KMODS += afe 245DRV_KMODS += audio1575 246DRV_KMODS += audioens 247DRV_KMODS += audiols 248DRV_KMODS += audiop16x 249DRV_KMODS += audiopci 250DRV_KMODS += audiots 251DRV_KMODS += bnxe 252DRV_KMODS += e1000g 253DRV_KMODS += efe 254DRV_KMODS += hxge 255DRV_KMODS += mxfe 256DRV_KMODS += rge 257DRV_KMODS += rtls 258DRV_KMODS += sfe 259DRV_KMODS += aac 260DRV_KMODS += igb 261DRV_KMODS += ixgbe 262DRV_KMODS += vr 263DRV_KMODS += mr_sas 264DRV_KMODS += yge 265 266# 267# Machine Specific Driver Modules (/kernel/drv): 268# 269DRV_KMODS += audiocs 270DRV_KMODS += bge dmfe eri fas hme qfe 271DRV_KMODS += openeepr options sd ses st 272DRV_KMODS += ssd 273DRV_KMODS += ecpp 274DRV_KMODS += hid hubd ehci ohci uhci usb_mid usb_ia scsa2usb usbprn ugen 275DRV_KMODS += usbser usbsacm usbsksp usbsprl 276DRV_KMODS += usb_as usb_ac 277DRV_KMODS += usbskel 278DRV_KMODS += usbvc 279DRV_KMODS += usbftdi 280DRV_KMODS += usbecm 281DRV_KMODS += hci1394 av1394 scsa1394 dcam1394 282DRV_KMODS += sbp2 283DRV_KMODS += ib ibp eibnx eoib rdsib sdp iser daplt hermon tavor sol_ucma sol_uverbs 284DRV_KMODS += sol_umad 285DRV_KMODS += pci_pci pcieb pcieb_bcm 286DRV_KMODS += i8042 kb8042 mouse8042 287DRV_KMODS += fcode 288DRV_KMODS += mpt_sas 289DRV_KMODS += socal 290DRV_KMODS += sgen 291DRV_KMODS += myri10ge 292DRV_KMODS += smp 293DRV_KMODS += dad 294DRV_KMODS += scsi_vhci 295DRV_KMODS += fcp 296DRV_KMODS += fcip 297DRV_KMODS += fcsm 298DRV_KMODS += fp 299DRV_KMODS += qlc 300DRV_KMODS += qlge 301DRV_KMODS += stmf 302DRV_KMODS += stmf_sbd 303DRV_KMODS += fct 304DRV_KMODS += fcoe 305DRV_KMODS += fcoet 306DRV_KMODS += fcoei 307DRV_KMODS += qlt 308DRV_KMODS += iscsit 309DRV_KMODS += pppt 310DRV_KMODS += ncall nsctl sdbc nskern sv 311DRV_KMODS += ii rdc rdcsrv rdcstub 312DRV_KMODS += iscsi 313DRV_KMODS += emlxs 314DRV_KMODS += oce 315DRV_KMODS += srpt 316DRV_KMODS += pmcs 317DRV_KMODS += pmcs8001fw 318 319# 320# I/O framework test drivers 321# 322DRV_KMODS += pshot 323DRV_KMODS += gen_drv 324DRV_KMODS += tvhci tphci tclient 325DRV_KMODS += emul64 326 327# 328# PCMCIA specific module(s) 329# 330DRV_KMODS += pcs 331MISC_KMODS += busra cardbus dada pcmcia 332DRV_KMODS += pcic 333 334# Add lvm 335# 336DRV_KMODS += md 337MISC_KMODS += md_mirror md_stripe md_hotspares md_raid md_trans md_notify 338MISC_KMODS += md_sp 339 340# 341# Exec Class Modules (/kernel/exec): 342# 343EXEC_KMODS += aoutexec elfexec intpexec shbinexec javaexec 344 345# 346# Scheduling Class Modules (/kernel/sched): 347# 348SCHED_KMODS += RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL SDC 349 350# 351# File System Modules (/kernel/fs): 352# 353FS_KMODS += dev devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs 354FS_KMODS += zut specfs udfs ufs autofs cachefs procfs sockfs mntfs zev 355FS_KMODS += getgen 356FS_KMODS += ctfs objfs sharefs dcfs smbfs 357 358# 359# Streams Modules (/kernel/strmod): 360# 361STRMOD_KMODS += bufmod connld dedump ldterm ms pckt pfmod 362STRMOD_KMODS += pipemod ptem redirmod rpcmod rlmod telmod timod 363STRMOD_KMODS += spppasyn spppcomp 364STRMOD_KMODS += tirdwr ttcompat 365STRMOD_KMODS += usbkbm usbms usbwcm usb_ah 366STRMOD_KMODS += drcompat 367STRMOD_KMODS += cryptmod 368STRMOD_KMODS += vuid3ps2 369 370# 371# 'System' Modules (/kernel/sys): 372# 373SYS_KMODS += c2audit 374SYS_KMODS += exacctsys 375SYS_KMODS += inst_sync kaio msgsys semsys shmsys sysacct pipe 376SYS_KMODS += doorfs pset acctctl portfs 377 378# 379# 'User' Modules (/kernel/misc): 380# 381MISC_KMODS += ac97 382MISC_KMODS += bignum 383MISC_KMODS += consconfig gld ipc nfs_dlboot nfssrv scsi 384MISC_KMODS += strplumb swapgeneric tlimod 385MISC_KMODS += rpcsec rpcsec_gss kgssapi kmech_dummy 386MISC_KMODS += kmech_krb5 387MISC_KMODS += fssnap_if 388MISC_KMODS += hidparser kbtrans usba usba10 usbs49_fw 389MISC_KMODS += s1394 390MISC_KMODS += hpcsvc pcihp 391MISC_KMODS += rsmops 392MISC_KMODS += kcf 393MISC_KMODS += ksocket 394MISC_KMODS += ibcm 395MISC_KMODS += ibdm 396MISC_KMODS += ibdma 397MISC_KMODS += ibmf 398MISC_KMODS += ibtl 399MISC_KMODS += sol_ofs 400MISC_KMODS += idm 401MISC_KMODS += idmap 402MISC_KMODS += hook 403MISC_KMODS += neti 404MISC_KMODS += ctf 405MISC_KMODS += mac dls 406MISC_KMODS += cmlb 407MISC_KMODS += tem 408MISC_KMODS += pcicfg fcodem fcpci 409MISC_KMODS += scsi_vhci_f_sym scsi_vhci_f_tpgs scsi_vhci_f_asym_sun 410MISC_KMODS += scsi_vhci_f_sym_hds 411MISC_KMODS += scsi_vhci_f_tape scsi_vhci_f_tpgs_tape 412MISC_KMODS += fctl 413MISC_KMODS += emlxs_fw 414MISC_KMODS += qlc_fw_2200 415MISC_KMODS += qlc_fw_2300 416MISC_KMODS += qlc_fw_2400 417MISC_KMODS += qlc_fw_2500 418MISC_KMODS += qlc_fw_6322 419MISC_KMODS += qlc_fw_8100 420MISC_KMODS += spuni 421MISC_KMODS += mii 422 423MISC_KMODS += klmmod klmops 424 425# 426# Software Cryptographic Providers (/kernel/crypto): 427# 428CRYPTO_KMODS += aes 429CRYPTO_KMODS += arcfour 430CRYPTO_KMODS += blowfish 431CRYPTO_KMODS += des 432CRYPTO_KMODS += md4 433CRYPTO_KMODS += md5 434CRYPTO_KMODS += ecc 435CRYPTO_KMODS += rsa 436CRYPTO_KMODS += sha1 437CRYPTO_KMODS += sha2 438CRYPTO_KMODS += swrand 439 440# 441# IP Policy Modules (/kernel/ipp): 442# 443IPP_KMODS += dlcosmk 444IPP_KMODS += flowacct 445IPP_KMODS += ipgpc 446IPP_KMODS += dscpmk 447IPP_KMODS += tokenmt 448IPP_KMODS += tswtclmt 449 450# 451# 'Dacf' modules (/kernel/dacf) 452DACF_KMODS += consconfig_dacf 453 454# 455# SVVS Testing Modules (/kernel/strmod): 456# 457# These are streams and driver modules which are not to be 458# delivered with a released system. However, during development 459# it is convenient to build and install the SVVS kernel modules. 460# 461SVVS_KMODS += lmodb lmode lmodr lmodt svvslo tidg tivc tmux 462 463# 464# Modules eXcluded from the product: 465# 466XMODS += 467 468# 469# 'Dacf' Modules (/kernel/dacf): 470# 471DACF_KMODS += net_dacf 472 473# 474# MAC-Type Plugin Modules (/kernel/mac) 475# 476MAC_KMODS += mac_6to4 477MAC_KMODS += mac_ether 478MAC_KMODS += mac_ipv4 479MAC_KMODS += mac_ipv6 480MAC_KMODS += mac_wifi 481MAC_KMODS += mac_ib 482 483# 484# socketmod (kernel/socketmod) 485# 486SOCKET_KMODS += sockpfp 487SOCKET_KMODS += socksctp 488SOCKET_KMODS += socksdp 489SOCKET_KMODS += sockrds 490SOCKET_KMODS += ksslf 491 492# 493# kiconv modules (/kernel/kiconv): 494# 495KICONV_KMODS += kiconv_emea kiconv_ja kiconv_ko kiconv_sc kiconv_tc 496 497# 498# Ensure that the variable member of the cpu_t (cpu_m) is defined 499# for the lint builds so as not to cause lint errors during the 500# global cross check. 501# 502$(LINTFLAGSUPPRESS)LINTFLAGS += -D_MACHDEP -I$(UTSBASE)/sun4 \ 503 -I$(UTSBASE)/sun4u -I$(UTSBASE)/sfmmu 504