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