Makefile.sparc.shared revision 5206:34f0b41fc3c5
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# 23# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28# This makefile contains the common definitions for all sparc 29# implementation architecture independent modules. 30# 31 32# 33# Define supported builds 34# 35DEF_BUILDS = $(DEF_BUILDS64) 36ALL_BUILDS = $(ALL_BUILDS64) 37 38# 39# Everybody needs to know how to build modstubs.o and to locate unix.o. 40# Note that unix.o must currently be selected from among the possible 41# "implementation architectures". Note further, that unix.o is only 42# used as an optional error check for undefines so (theoretically) 43# any "implementation architectures" could be used. We choose sun4u 44# because it is the reference port. 45# 46UNIX_DIR = $(UTSBASE)/sun4u/unix 47GENLIB_DIR = $(UTSBASE)/sun4u/genunix 48IPDRV_DIR = $(UTSBASE)/sparc/ip 49MODSTUBS_DIR = $(UNIX_DIR) 50DSF_DIR = $(UNIX_DIR) 51LINTS_DIR = $(OBJS_DIR) 52LINT_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR) 53 54UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o 55MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o 56GENLIB = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so 57 58LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 59GEN_LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 60 61LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 62GEN_LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 63 64LINT_LIB = $(LINT_LIB_$(CLASS)) 65GEN_LINT_LIB = $(GEN_LINT_LIB_$(CLASS)) 66 67LINT32_DIRS = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 68LINT32_FILES = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln) 69 70LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 71LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln) 72 73# 74# Include the makefiles which define build rule templates, the 75# collection of files per module, and a few specific flags. Note 76# that order is significant, just as with an include path. The 77# first build rule template which matches the files name will be 78# used. By including these in order from most machine dependent 79# to most machine independent, we allow a machine dependent file 80# to be used in preference over a machine independent version 81# (Such as a machine specific optimization, which preserves the 82# interfaces.) 83# 84include $(UTSBASE)/sparc/Makefile.files 85include $(UTSBASE)/sparc/v9/Makefile.files 86include $(UTSTREE)/sun/Makefile.files 87include $(UTSTREE)/common/Makefile.files 88 89# 90# ----- TRANSITIONAL SECTION -------------------------------------------------- 91# 92 93# 94# Not everything which *should* be a module is a module yet. The 95# following is a list of such objects which are currently part of 96# genunix but which might someday become kmods. This must be 97# defined before we include Makefile.uts, or else genunix's build 98# won't be as parallel as we might like. 99# 100NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS) 101 102# 103# ----- END OF TRANSITIONAL SECTION ------------------------------------------- 104# 105# Include machine independent rules. Note that this does not imply 106# that the resulting module from rules in Makefile.uts is machine 107# independent. Only that the build rules are machine independent. 108# 109include $(UTSBASE)/Makefile.uts 110 111# 112# machine specific optimization, override default in Makefile.master 113# 114XARCH_32 = -xarch=v8 115XARCH_64 = -xarch=v9 116XARCH = $(XARCH_$(CLASS)) 117 118COPTIMIZE_32 = -xO3 119COPTIMIZE_64 = -xO3 120COPTIMIZE = $(COPTIMIZE_$(CLASS)) 121 122CCMODE = -Xa 123 124CFLAGS_32 = -xcg92 125CFLAGS_64 = -xchip=ultra $(CCABS32) $(CCREGSYM) 126CFLAGS = $(CFLAGS_$(CLASS)) 127 128CFLAGS += $(XARCH) 129CFLAGS += $(COPTIMIZE) 130CFLAGS += $(EXTRA_CFLAGS) 131CFLAGS += $(XAOPT) 132CFLAGS += $(INLINES) -D_ASM_INLINES 133CFLAGS += $(CCMODE) 134CFLAGS += $(SPACEFLAG) 135CFLAGS += $(CERRWARN) 136CFLAGS += $(CTF_FLAGS) 137CFLAGS += $(C99MODE) 138CFLAGS += $(CCUNBOUND) 139CFLAGS += $(CCSTATICSYM) 140CFLAGS += $(IROPTFLAG) 141CFLAGS += $(CGLOBALSTATIC) 142CFLAGS += -xregs=no%float 143CFLAGS += -xstrconst 144 145ASFLAGS += $(XARCH) 146 147LINT_DEFS_32 = 148LINT_DEFS_64 = -Xarch=v9 149LINT_DEFS += $(LINT_DEFS_$(CLASS)) 150 151# 152# The following must be defined for all implementations: 153# 154# MODSTUBS: Module stubs source file. 155# 156MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s 157 158# 159# Define the actual specific platforms - obviously none. 160# 161MACHINE_DEFS = 162 163# 164# Debugging level 165# 166# Special knowledge of which special debugging options effect which 167# file is used to optimize the build if these flags are changed. 168# 169# XXX: The above could possibly be done for more flags and files, but 170# is left as an experiment to the interested reader. Be forewarned, 171# that excessive use could lead to maintenance difficulties. 172# 173DEBUG_DEFS_OBJ32 = 174DEBUG_DEFS_DBG32 = -DDEBUG 175DEBUG_DEFS_OBJ64 = 176DEBUG_DEFS_DBG64 = -DDEBUG 177DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE)) 178 179DEBUG_COND_OBJ32 :sh = echo \\043 180DEBUG_COND_DBG32 = 181DEBUG_COND_OBJ64 :sh = echo \\043 182DEBUG_COND_DBG64 = 183IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/ 184 185$(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE 186$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1 187 188# Comment these out if you don't want dispatcher lock statistics. 189 190# $(IF_DEBUG_OBJ)disp_lock.o := DEBUG_DEFS += -DDISP_LOCK_STATS 191 192# 193# This rather strange collection of definitions ensures that lint sees 194# 'struct cpu' containing a fully declared embedded 'struct machcpu' 195# 196# There's something deeply dissatisfying about this. 197# 198LINTMACHFLAGS = -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu 199$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS) 200$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS) 201$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS) 202$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS) 203 204# 205# Build `options'. These are mostly historical and the need for these 206# is largely removed by the module technology. However, the static 207# build will continue to require these. 208# 209OPTION_DEFS = -DC2_AUDIT 210 211# 212# Collect the preprocessor definitions to be associated with *all* 213# files. 214# 215ALL_DEFS = $(MACHINE_DEFS) $(DEBUG_DEFS) $(OPTION_DEFS) 216# 217# 218# The kernels modules which are "implementation architecture" 219# specific for this machine are enumerated below. Note that most 220# of these modules must exist (in one form or another) for each 221# architecture. 222# 223# Common Drivers (usually pseudo drivers) (/kernel/drv): 224# 225DRV_KMODS += aggr arp bl bofi clone cn conskbd consms cpuid 226DRV_KMODS += crypto cryptoadm devinfo dump 227DRV_KMODS += dtrace fasttrap fbt lockstat profile sdt systrace 228DRV_KMODS += fssnap icmp icmp6 ip ip6 ipsecah 229DRV_KMODS += ipsecesp iwscn keysock kmdb kstat ksyms llc1 230DRV_KMODS += lofi 231DRV_KMODS += log logindmux kssl mm nca physmem pm poll pool 232DRV_KMODS += pseudo ptc ptm pts ptsl ramdisk random rsm rts sad 233DRV_KMODS += sppp sppptun sy sysevent sysmsg 234DRV_KMODS += spdsock 235DRV_KMODS += tcp tcp6 tl tnf ttymux udp udp6 wc winlock zcons 236DRV_KMODS += ippctl sctp sctp6 237DRV_KMODS += dld 238DRV_KMODS += ipf 239DRV_KMODS += rpcib 240DRV_KMODS += vni vnic 241DRV_KMODS += xge 242DRV_KMODS += rds 243DRV_KMODS += chxge 244 245# 246# Don't build some of these for OpenSolaris, since they will be 247# replaced by binaries that are signed by Sun Release Engineering. 248# 249$(CLOSED_BUILD)DRV_KMODS += dca 250 251$(CLOSED_BUILD)CLOSED_DRV_KMODS += glm 252$(CLOSED_BUILD)CLOSED_DRV_KMODS += isp 253$(CLOSED_BUILD)CLOSED_DRV_KMODS += llc2 254$(CLOSED_BUILD)CLOSED_DRV_KMODS += mpt 255$(CLOSED_BUILD)CLOSED_DRV_KMODS += se 256$(CLOSED_BUILD)CLOSED_DRV_KMODS += rtls 257 258# 259# Hardware Drivers in common space 260# 261 262DRV_KMODS += afe 263DRV_KMODS += e1000g 264DRV_KMODS += mxfe 265DRV_KMODS += pcan 266DRV_KMODS += pcwl 267DRV_KMODS += rge 268$(CLOSED_BUILD)CLOSED_DRV_KMODS += ixgb 269 270# 271# Machine Specific Driver Modules (/kernel/drv): 272# 273DRV_KMODS += audio1575 audio810 audiohd audiocs audiots 274DRV_KMODS += bge bpp dmfe eri esp fas hme qfe 275DRV_KMODS += openeepr options sd ses st 276DRV_KMODS += ssd 277DRV_KMODS += ecpp 278DRV_KMODS += hid hubd ehci ohci uhci usb_mid usb_ia scsa2usb usbprn ugen 279DRV_KMODS += usbser usbsacm usbsksp usbsprl 280DRV_KMODS += usb_as usb_ac 281DRV_KMODS += usbskel 282DRV_KMODS += usbvc 283DRV_KMODS += hci1394 av1394 scsa1394 dcam1394 284DRV_KMODS += sbp2 285DRV_KMODS += ib ibd rdsib sdp 286DRV_KMODS += pci_pci px_pci pxb_plx pxb_bcm pcie 287DRV_KMODS += i8042 kb8042 mouse8042 288DRV_KMODS += fcode 289DRV_KMODS += socal 290DRV_KMODS += sgen 291DRV_KMODS += dad 292DRV_KMODS += scsi_vhci 293 294$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioens 295$(CLOSED_BUILD)CLOSED_DRV_KMODS += audiovia823x 296$(CLOSED_BUILD)CLOSED_DRV_KMODS += ifp 297$(CLOSED_BUILD)CLOSED_DRV_KMODS += uata 298$(CLOSED_BUILD)CLOSED_DRV_KMODS += usbser_edge 299 300# 301# I/O framework test drivers 302# 303DRV_KMODS += pshot 304DRV_KMODS += gen_drv 305DRV_KMODS += tvhci tphci tclient 306DRV_KMODS += emul64 307 308# 309# PCMCIA specific module(s) 310# 311DRV_KMODS += stp4020 pcs 312MISC_KMODS += busra cardbus dada pcmcia 313DRV_KMODS += pcata pcmem pcram 314DRV_KMODS += pcic 315DRV_KMODS += pem 316 317$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcelx 318$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcser 319 320# Add lvm 321# 322DRV_KMODS += md 323MISC_KMODS += md_mirror md_stripe md_hotspares md_raid md_trans md_notify 324MISC_KMODS += md_sp 325 326# 327# Exec Class Modules (/kernel/exec): 328# 329EXEC_KMODS += aoutexec elfexec intpexec javaexec 330 331# 332# Scheduling Class Modules (/kernel/sched): 333# 334SCHED_KMODS += RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL 335 336# 337# File System Modules (/kernel/fs): 338# 339FS_KMODS += dev devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs 340FS_KMODS += specfs udfs ufs autofs cachefs procfs sockfs mntfs 341FS_KMODS += ctfs objfs sharefs 342 343# 344# Streams Modules (/kernel/strmod): 345# 346STRMOD_KMODS += 6to4tun atun bufmod connld dedump ldterm ms pckt pfmod 347STRMOD_KMODS += pipemod ptem redirmod rpcmod rlmod telmod timod 348STRMOD_KMODS += spppasyn spppcomp 349STRMOD_KMODS += tirdwr ttcompat tun 350STRMOD_KMODS += usbkbm usbms usb_ah 351STRMOD_KMODS += drcompat 352STRMOD_KMODS += cryptmod 353STRMOD_KMODS += vuid3ps2 354 355# 356# 'System' Modules (/kernel/sys): 357# 358SYS_KMODS += c2audit 359SYS_KMODS += exacctsys 360SYS_KMODS += inst_sync kaio msgsys semsys shmsys sysacct pipe 361SYS_KMODS += doorfs pset acctctl portfs 362 363# 364# 'User' Modules (/kernel/misc): 365# 366MISC_KMODS += amsrc2 audiosup diaudio mixer 367MISC_KMODS += consconfig gld ipc nfs_dlboot nfssrv scsi 368MISC_KMODS += strplumb swapgeneric tlimod 369MISC_KMODS += krtld 370MISC_KMODS += rpcsec rpcsec_gss kgssapi kmech_dummy 371MISC_KMODS += kmech_krb5 372MISC_KMODS += fssnap_if 373MISC_KMODS += hidparser kbtrans usba usba10 usbs49_fw 374MISC_KMODS += s1394 375MISC_KMODS += hpcsvc pcihp pciehpc pcishpc 376MISC_KMODS += rsmops 377MISC_KMODS += kcf 378MISC_KMODS += ibcm 379MISC_KMODS += ibdm 380MISC_KMODS += ibmf 381MISC_KMODS += ibtl 382MISC_KMODS += idmap 383MISC_KMODS += hook 384MISC_KMODS += neti 385MISC_KMODS += ctf 386MISC_KMODS += mac dls 387MISC_KMODS += cmlb 388MISC_KMODS += tem 389MISC_KMODS += pcicfg.e fcodem fcpci 390MISC_KMODS += scsi_vhci_f_sym scsi_vhci_f_tpgs scsi_vhci_f_asym_sun 391 392$(CLOSED_BUILD)CLOSED_MISC_KMODS += amsrc1 393$(CLOSED_BUILD)CLOSED_MISC_KMODS += klmmod klmops 394$(CLOSED_BUILD)CLOSED_MISC_KMODS += phx 395$(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_lsi 396$(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_emc 397$(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_sym_emc 398 399# 400# Software Cryptographic Providers (/kernel/crypto): 401# 402# Don't build some of these for OpenSolaris, since they will be 403# replaced by binaries that are signed by Sun RE. 404# 405$(CLOSED_BUILD)CRYPTO_KMODS += aes 406$(CLOSED_BUILD)CRYPTO_KMODS += arcfour 407$(CLOSED_BUILD)CRYPTO_KMODS += blowfish 408$(CLOSED_BUILD)CRYPTO_KMODS += des 409CRYPTO_KMODS += md4 410CRYPTO_KMODS += md5 411CRYPTO_KMODS += rsa 412CRYPTO_KMODS += sha1 413CRYPTO_KMODS += sha2 414CRYPTO_KMODS += swrand 415 416# 417# IP Policy Modules (/kernel/ipp): 418# 419IPP_KMODS += dlcosmk 420IPP_KMODS += flowacct 421IPP_KMODS += ipgpc 422IPP_KMODS += dscpmk 423IPP_KMODS += tokenmt 424IPP_KMODS += tswtclmt 425 426# 427# 'Dacf' modules (/kernel/dacf) 428DACF_KMODS += consconfig_dacf 429 430# 431# SVVS Testing Modules (/kernel/strmod): 432# 433# These are streams and driver modules which are not to be 434# delivered with a released system. However, during development 435# it is convenient to build and install the SVVS kernel modules. 436# 437SVVS_KMODS += lmodb lmode lmodr lmodt lo tidg tivc tmux 438 439SVVS += svvs 440 441# 442# Modules eXcluded from the product: 443# 444XMODS += 445$(CLOSED_BUILD)CLOSED_XMODS = \ 446 daplt \ 447 sdpib \ 448 tavor \ 449 wsdrv 450 451# 452# 'Dacf' Modules (/kernel/dacf): 453# 454DACF_KMODS += usb_ac_dacf 455 456# 457# MAC-Type Plugin Modules (/kernel/mac) 458# 459MAC_KMODS += mac_ether 460MAC_KMODS += mac_wifi 461 462# 463# 'Devname' Modules (kernel/devname) 464# 465DEVNAME_KMODS += sdev_nsconfig_mod 466 467# 468# kiconv modules (/kernel/kiconv): 469# 470KICONV_KMODS += kiconv_emea 471